1 Do not list privileges in /PRIVS related to local channels when local channels are disabled
2 by feature LOCAL_CHANNELS.
4 diff -r 081319e0fbcc ircd/client.c
5 --- a/ircd/client.c Thu Jan 22 16:29:29 2009 +0100
6 +++ b/ircd/client.c Thu Jan 22 17:39:47 2009 +0100
8 mb = msgq_make(to, rpl_str(RPL_PRIVS), cli_name(&me), cli_name(to),
11 - for (i = 0; privtab[i].name; i++)
12 + for (i = 0; privtab[i].name; i++) {
13 + /* dont report privs related to local channels when local channels are not enabled */
14 + /* TODO: this works.. but does not seem clean, there must be a better way.. */
15 + if ((!feature_bool(FEAT_LOCAL_CHANNELS)) &&
16 + (privtab[i].priv == PRIV_WALK_LCHAN || privtab[i].priv == PRIV_MODE_LCHAN ||
17 + privtab[i].priv == PRIV_DEOP_LCHAN || privtab[i].priv == PRIV_LOCAL_OPMODE ||
18 + privtab[i].priv == PRIV_FORCE_LOCAL_OPMODE))
20 if (HasPriv(client, privtab[i].priv))
21 msgq_append(0, mb, "%s%s", found1++ ? " " : "", privtab[i].name);
24 send_buffer(to, mb, 0); /* send response */