Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2007-10-30 01:20:03 UTC

Modified files:
  Tag: u2_10_12_branch
     ircd/m_gline.c ChangeLog

Log message:

Clean up / regularize parts of m*_gline().

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.207 ircu2.10/ChangeLog:1.710.2.208
--- ircu2.10/ChangeLog:1.710.2.207      Mon Oct 29 18:16:58 2007
+++ ircu2.10/ChangeLog  Mon Oct 29 18:19:52 2007
@@ -1,5 +1,10 @@
 2007-09-05  Michael Poole <[EMAIL PROTECTED]>
 
+       * ircd/m_gline.c (ms_gline): Remove dead branch when 4 < parc < 5.
+       (mo_gline): Consistently use the last argument as the reason.
+
+2007-09-05  Michael Poole <[EMAIL PROTECTED]>
+
        * ircd/Makefile.in: Fix dependencies for version.h generation.
 
 2007-08-20  Michael Poole <[EMAIL PROTECTED]>
Index: ircu2.10/ircd/m_gline.c
diff -u ircu2.10/ircd/m_gline.c:1.26.2.8 ircu2.10/ircd/m_gline.c:1.26.2.9
--- ircu2.10/ircd/m_gline.c:1.26.2.8    Fri Jul 20 16:32:19 2007
+++ ircu2.10/ircd/m_gline.c     Mon Oct 29 18:19:52 2007
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_gline.c,v 1.26.2.8 2007/07/20 23:32:19 klmitch Exp $
+ * $Id: m_gline.c,v 1.26.2.9 2007/10/30 01:19:52 entrope Exp $
  */
 
 /*
@@ -292,9 +292,6 @@
   case GLINE_MODIFY: /* modifying a G-line */
     /* convert expire and lastmod, look for lifetime and reason */
     if (parc > 4) { /* protect against fall-through from 4-param form */
-      if (parc < 5)
-       return need_more_params(sptr, "GLINE");
-
       expire = atoi(parv[3]); /* convert expiration and lastmod */
       expire = abs_expire(expire);
       lastmod = atoi(parv[4]);
@@ -418,7 +415,7 @@
     flags |= GLINE_EXPIRE; /* remember that we got an expire time */
 
     if (parc > 4) { /* also got a reason... */
-      reason = parv[4];
+      reason = parv[parc - 1];
       flags |= GLINE_REASON;
     }
 
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to