]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blame - opernowildbadchan.patch
opername: refresh for changes by sethost.patch
[irc/quakenet/snircd-patchqueue.git] / opernowildbadchan.patch
CommitLineData
0c63b280 1Disallow wildcards in badchan set by local oper, and for local badchan by remote oper.
27347c8d 2
3diff -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;