Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2004-09-11 15:51:51 UTC

Modified files:
     ChangeLog ircd/channel.c

Log message:

Fix bug #916138 so -l doesn't gobble an argument.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.457 ircu2.10/ChangeLog:1.458
--- ircu2.10/ChangeLog:1.457    Sat Sep 11 06:22:48 2004
+++ ircu2.10/ChangeLog  Sat Sep 11 08:51:41 2004
@@ -1,3 +1,14 @@
+2004-09-11  Kevin L Mitchell  <[EMAIL PROTECTED]>
+
+       * ircd/channel.c: removing limits shouldn't gobble an argument;
+       this was a subtle interaction issue with modebuf...fixed by adding
+       MODE_LIMIT to modebuf_flush_int() and short-circuiting
+       modebuf_mode_uint() to add MODE_LIMIT to mbuf->mb_rem in the
+       removal case.  Note that this is not proof against the sequence,
+       "modebuf_mode_uint(mbuf, MODE_ADD | MODE_LIMIT, 10);
+       modebuf_mode_uint(mbuf, MODE_DEL | MODE_LIMIT, 10);"
+       (Bug #916138)
+
 2004-09-11  Michael Poole <[EMAIL PROTECTED]>
 
        * include/supported.h: Kev pointed out I misinterpreted the
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.96 ircu2.10/ircd/channel.c:1.97
--- ircu2.10/ircd/channel.c:1.96        Fri Sep 10 19:06:04 2004
+++ ircu2.10/ircd/channel.c     Sat Sep 11 08:51:41 2004
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: channel.c,v 1.96 2004/09/11 02:06:04 entrope Exp $
+ * $Id: channel.c,v 1.97 2004/09/11 15:51:41 entrope Exp $
  */
 #include "config.h"
 
@@ -1524,7 +1524,7 @@
     MODE_WASDELJOINS,   'd',
 /*  MODE_KEY,          'k', */
 /*  MODE_BAN,          'b', */
-/*  MODE_LIMIT,                'l', */
+    MODE_LIMIT,                'l',
 /*  MODE_APASS,                'A', */
 /*  MODE_UPASS,                'u', */
     0x0, 0x0
@@ -1930,6 +1930,10 @@
   assert(0 != mbuf);
   assert(0 != (mode & (MODE_ADD | MODE_DEL)));
 
+  if (mode == (MODE_LIMIT | MODE_DEL)) {
+      mbuf->mb_rem |= mode;
+      return;
+  }
   MB_TYPE(mbuf, mbuf->mb_count) = mode;
   MB_UINT(mbuf, mbuf->mb_count) = uint;
 
----------------------- End of diff -----------------------

Reply via email to