Committer  : klmitch
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Branch tags: u2_10_11_07
Commit time: 2004-09-11 15:26:58 UTC

Modified files:
  Tag: u2_10_11_07
     ChangeLog ircd/channel.c

Log message:

Author: Kev <[EMAIL PROTECTED]>
Log message:

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

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.290.2.130.2.14 ircu2.10/ChangeLog:1.290.2.130.2.15
--- ircu2.10/ChangeLog:1.290.2.130.2.14 Mon Aug 30 14:32:26 2004
+++ ircu2.10/ChangeLog  Sat Sep 11 08:26:47 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-08-31  Isomer <[EMAIL PROTECTED]>
        * ircd/m_account.c: Back out untested login-on-connect extensions,
        we'll relook at these for .12
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.73.2.15.2.1 ircu2.10/ircd/channel.c:1.73.2.15.2.2
--- ircu2.10/ircd/channel.c:1.73.2.15.2.1       Sat Jan 31 19:46:54 2004
+++ ircu2.10/ircd/channel.c     Sat Sep 11 08:26:48 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.73.2.15.2.1 2004/02/01 03:46:54 klmitch Exp $
+ * $Id: channel.c,v 1.73.2.15.2.2 2004/09/11 15:26:48 klmitch Exp $
  */
 #include "config.h"
 
@@ -1344,7 +1344,7 @@
     MODE_REGONLY,      'r',
 /*  MODE_KEY,          'k', */
 /*  MODE_BAN,          'b', */
-/*  MODE_LIMIT,                'l', */
+    MODE_LIMIT,                'l',
     0x0, 0x0
   };
   int i;
@@ -1729,6 +1729,11 @@
   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