]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blame - hidebanowner.patch
welcome.patch - add empty line at end of welcome.h
[irc/quakenet/snircd-patchqueue.git] / hidebanowner.patch
CommitLineData
715c825d
CP
1hide the owner of a ban in the channel banlist from non-chanops
2
3diff -r 67928388e226 ircd/channel.c
4--- a/ircd/channel.c Sun Jan 11 22:38:39 2009 +0000
5+++ b/ircd/channel.c Sun Jan 11 22:38:40 2009 +0000
6@@ -1243,13 +1243,18 @@
7 static void send_ban_list(struct Client* cptr, struct Channel* chptr)
8 {
9 struct Ban* lp;
10+ int showbanowner = 0;
11
12 assert(0 != cptr);
13 assert(0 != chptr);
14
15+ /* hide who set the ban from non-chanops */
16+ if (IsAnOper(cptr) || is_chan_op(cptr, chptr))
17+ showbanowner = 1;
18+
19 for (lp = chptr->banlist; lp; lp = lp->next)
20 send_reply(cptr, RPL_BANLIST, chptr->chname, lp->banstr,
21- lp->who, lp->when);
22+ showbanowner ? lp->who : "*", lp->when);
23
24 send_reply(cptr, RPL_ENDOFBANLIST, chptr->chname);
25 }