]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blame - privlocalchan.patch
badchanzombie.patch - remove redundant IsZombie() check.
[irc/quakenet/snircd-patchqueue.git] / privlocalchan.patch
CommitLineData
fcdbfbc2 1Do not list privileges in /PRIVS related to local channels when local channels are disabled
2by feature LOCAL_CHANNELS.
3
4diff -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);