]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blob - privlocalchan.patch
welcome.patch redone how messages are saved - split.patch small changes
[irc/quakenet/snircd-patchqueue.git] / privlocalchan.patch
1 Do not list privileges in /PRIVS related to local channels when local channels are disabled
2 by feature LOCAL_CHANNELS.
3
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
7 @@ -264,9 +264,17 @@
8 mb = msgq_make(to, rpl_str(RPL_PRIVS), cli_name(&me), cli_name(to),
9 cli_name(client));
10
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))
19 + continue;
20 if (HasPriv(client, privtab[i].priv))
21 msgq_append(0, mb, "%s%s", found1++ ? " " : "", privtab[i].name);
22 + }
23
24 send_buffer(to, mb, 0); /* send response */
25 msgq_clean(mb);