Author: Kev <klmitch@mit.edu>
authorKevin L. Mitchell <klmitch@mit.edu>
Thu, 4 May 2000 17:43:47 +0000 (17:43 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Thu, 4 May 2000 17:43:47 +0000 (17:43 +0000)
Log message:

Glines from Uworld of the form "E GL * -<mask>" are now accepted, and
deactivate the G-line.  No thanks to Maniac-.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@235 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/m_gline.c

index df8800e45cdd5169fe9a247a4e83e888beb07648..194c3f8aad2bbbfba9b20f0daa67d307e1239109 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-05-04  Kevin L. Mitchell  <klmitch@mit.edu>
 
+       * ircd/m_gline.c (ms_gline): make G-lines of the form "GLINE *
+       -<mask>" be accepted
+
        * ircd/channel.c (send_channel_modes): deal with one of the last
        vestiges of sendbuf
 
 #
 # ChangeLog for ircu2.10.11
 #
-# $Id: ChangeLog,v 1.132 2000-05-04 17:28:29 kev Exp $
+# $Id: ChangeLog,v 1.133 2000-05-04 17:43:47 kev Exp $
 #
 # Insert new changes at beginning of the change list.
 #
index 2587c5ab1d297b87d25b166c2f7def8cc5bebb66..6f5e3d3165d66c02a0183abc2c1ff04a0f058382 100644 (file)
@@ -133,7 +133,7 @@ ms_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
   time_t expire_off, lastmod = 0;
   char *mask = parv[2], *target = parv[1], *reason;
 
-  if (parc == 5) {
+  if ((parc == 3 && *mask == '-') || parc == 5) {
     if (!find_conf_byhost(cptr->confs, sptr->name, CONF_UWORLD))
       return need_more_params(sptr, "GLINE");
 
@@ -151,7 +151,8 @@ ms_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
 
     if (!IsMe(acptr)) { /* manually propagate */
       if (!lastmod)
-       sendcmdto_one(sptr, CMD_GLINE, acptr, "%C %s %s :%s", acptr, mask,
+       sendcmdto_one(sptr, CMD_GLINE, acptr,
+                     (parc == 3) ? "%C %s" : "%C %s %s :%s", acptr, mask,
                      parv[3], reason);
       else
        sendcmdto_one(sptr, CMD_GLINE, acptr, "%C %s %s %s :%s", acptr, mask,
@@ -171,7 +172,7 @@ ms_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
   } else
     flags |= GLINE_ACTIVE;
 
-  expire_off = atoi(parv[3]);
+  expire_off = parc < 5 ? 0 : atoi(parv[3]);
 
   agline = gline_find(mask, GLINE_ANY | GLINE_EXACT);
 
@@ -187,7 +188,8 @@ ms_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
       return 0;
     else
       return gline_resend(cptr, agline); /* other server desynched WRT gline */
-  }
+  } else if (parc < 5)
+    return need_more_params(sptr, "GLINE");
 
   return gline_add(cptr, sptr, mask, reason, expire_off, lastmod, flags);
 }