]> jfr.im git - irc/quakenet/snircd-patchqueue.git/commitdiff
add operglinenick.patch - allow oper to set glines in form of nick@* gline, but only...
authorwiebe <redacted>
Thu, 22 Jan 2009 23:31:36 +0000 (00:31 +0100)
committerwiebe <redacted>
Thu, 22 Jan 2009 23:31:36 +0000 (00:31 +0100)
operglinenick.patch [new file with mode: 0644]
series

diff --git a/operglinenick.patch b/operglinenick.patch
new file mode 100644 (file)
index 0000000..b491791
--- /dev/null
@@ -0,0 +1,16 @@
+Allow oper to set gline in the form of nick!*@*, but only
+when the nick part contains no wildcards.
+
+diff -r fcfbd0f17eef ircd/gline.c
+--- a/ircd/gline.c     Fri Jan 23 00:14:32 2009 +0100
++++ b/ircd/gline.c     Fri Jan 23 00:25:24 2009 +0100
+@@ -530,7 +530,8 @@
+     if (sizeof(uhmask) <
+       ircd_snprintf(0, uhmask, sizeof(uhmask), "%s@%s", user, host))
+       return send_reply(sptr, ERR_LONGMASK);
+-    else if (MyUser(sptr) || (IsUser(sptr) && flags & GLINE_LOCAL)) {
++    /* when the nick part contains no wildcards, let it through */
++    else if ((MyUser(sptr) || (IsUser(sptr) && flags & GLINE_LOCAL)) && string_has_wildcards(nick)) {
+       switch (gline_checkmask(host)) {
+       case CHECK_OVERRIDABLE: /* oper overrided restriction */
+       if (flags & GLINE_OPERFORCE)
diff --git a/series b/series
index f1d2eef9a9c8abac8872a07abc6dba54d5d112b5..a1ec3ebafc5b2345f8a518f041139c142e352853 100644 (file)
--- a/series
+++ b/series
@@ -23,4 +23,5 @@ whomatch.patch
 privlocalchan.patch
 burstwhotopic.patch
 opernowildbadchan.patch
+operglinenick.patch
 split.patch