]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blob - opernowildbadchan.patch
snircdumodescheckisanoper: check IsAnOper() (local or global) instead of IsOper(...
[irc/quakenet/snircd-patchqueue.git] / opernowildbadchan.patch
1 Disallow wildcards in badchan set by local oper, and for local badchan by remote oper.
2
3 diff -r 5eee2151f0b1 ircd/gline.c
4 --- a/ircd/gline.c Thu Jan 22 21:50:34 2009 +0100
5 +++ b/ircd/gline.c Thu Jan 22 22:05:00 2009 +0100
6 @@ -494,6 +494,13 @@
7 if (*userhost == '#' || *userhost == '&') {
8 if ((flags & GLINE_LOCAL) && !HasPriv(sptr, PRIV_LOCAL_BADCHAN))
9 return send_reply(sptr, ERR_NOPRIVILEGES);
10 +
11 + /* disallow wildcards in BADCHANs set by my oper
12 + * and in local BADCHANs set by remote oper
13 + */
14 + if ((MyUser(sptr) || (IsUser(sptr) && flags & GLINE_LOCAL)) &&
15 + string_has_wildcards(userhost))
16 + return send_reply(sptr, ERR_MASKTOOWIDE, userhost);
17
18 flags |= GLINE_BADCHAN;
19 user = userhost;