[cvslog] Module eggdrop1.6: Change committed

cvslog cvs at tsss.iavalley.cc.ia.us
Sun Dec 17 15:39:13 CST 2000


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2000-12-17 21:37:57 UTC

Modified files:
     doc/UPDATES1.6 src/patch.h src/mod/channels.mod/channels.c
     src/mod/channels.mod/tclchan.c src/mod/irc.mod/chan.c
     src/mod/irc.mod/mode.c

Log message:

TaKeDa's negative limit patch

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.34 eggdrop1.6/doc/UPDATES1.6:1.35
--- eggdrop1.6/doc/UPDATES1.6:1.34	Wed Dec 13 22:11:54 2000
+++ eggdrop1.6/doc/UPDATES1.6	Sun Dec 17 15:37:46 2000
@@ -4,6 +4,7 @@
 
 1.6.2
 Found by  Fixed by  What...
+          TaKeDa    we now understand negative limits (IRCnet allows this)
 TaKeDa    Fabian    Parameter missing for share.mod's status information and
                     a uff error message. Minor optimisations elsewhere.
           guppy     cleaned up Context; usage in the core
Index: eggdrop1.6/src/mod/channels.mod/channels.c
diff -u eggdrop1.6/src/mod/channels.mod/channels.c:1.44 eggdrop1.6/src/mod/channels.mod/channels.c:1.45
--- eggdrop1.6/src/mod/channels.mod/channels.c:1.44	Tue Nov 21 16:30:24 2000
+++ eggdrop1.6/src/mod/channels.mod/channels.c	Sun Dec 17 15:37:46 2000
@@ -2,7 +2,7 @@
  * channels.c -- part of channels.mod
  *   support for channels within the bot
  * 
- * $Id: channels.c,v 1.44 2000/11/21 22:30:24 guppy Exp $
+ * $Id: channels.c,v 1.45 2000/12/17 21:37:46 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -92,7 +92,7 @@
 
   /* Clear old modes */
   chan->mode_mns_prot = chan->mode_pls_prot = 0;
-  chan->limit_prot = (-1);
+  chan->limit_prot = 0;
   chan->key_prot[0] = 0;
   for (s = newsplit(&set); *s; s++) {
     i = 0;
@@ -135,7 +135,7 @@
       break;
     case 'l':
       i = CHANLIMIT;
-      chan->limit_prot = (-1);
+      chan->limit_prot = 0;
       if (pos) {
 	s1 = newsplit(&set);
 	if (s1[0])
@@ -177,9 +177,9 @@
     ok = 0;
     if (i == 0) {
       tst = chan->mode_pls_prot;
-      if ((tst) || (chan->limit_prot != (-1)) || (chan->key_prot[0]))
+      if ((tst) || (chan->limit_prot != 0) || (chan->key_prot[0]))
 	*p++ = '+';
-      if (chan->limit_prot != (-1)) {
+      if (chan->limit_prot != 0) {
 	*p++ = 'l';
 	sprintf(&s1[strlen(s1)], "%d ", chan->limit_prot);
       }
Index: eggdrop1.6/src/mod/channels.mod/tclchan.c
diff -u eggdrop1.6/src/mod/channels.mod/tclchan.c:1.39 eggdrop1.6/src/mod/channels.mod/tclchan.c:1.40
--- eggdrop1.6/src/mod/channels.mod/tclchan.c:1.39	Mon Nov 20 23:18:04 2000
+++ eggdrop1.6/src/mod/channels.mod/tclchan.c	Sun Dec 17 15:37:46 2000
@@ -1,7 +1,7 @@
 /* 
  * tclchan.c -- part of channels.mod
  * 
- * $Id: tclchan.c,v 1.39 2000/11/21 05:18:04 guppy Exp $
+ * $Id: tclchan.c,v 1.40 2000/12/17 21:37:46 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -1493,7 +1493,7 @@
  */
 static void init_channel(struct chanset_t *chan, int reset)
 {
-  chan->channel.maxmembers = (-1);
+  chan->channel.maxmembers = 0;
   chan->channel.mode = 0;
   chan->channel.members = 0;
   if (!reset) {
@@ -1588,8 +1588,8 @@
     /* Hells bells, why set *every* variable to 0 when we have bzero? */
     egg_bzero(chan, sizeof(struct chanset_t));
 
-    chan->limit_prot = (-1);
-    chan->limit = (-1);
+    chan->limit_prot = 0;
+    chan->limit = 0;
     chan->flood_pub_thr = gfld_chan_thr;
     chan->flood_pub_time = gfld_chan_time;
     chan->flood_ctcp_thr = gfld_ctcp_thr;
Index: eggdrop1.6/src/mod/irc.mod/chan.c
diff -u eggdrop1.6/src/mod/irc.mod/chan.c:1.61 eggdrop1.6/src/mod/irc.mod/chan.c:1.62
--- eggdrop1.6/src/mod/irc.mod/chan.c:1.61	Tue Dec  5 20:32:18 2000
+++ eggdrop1.6/src/mod/irc.mod/chan.c	Sun Dec 17 15:37:46 2000
@@ -6,7 +6,7 @@
  *   user kickban, kick, op, deop
  *   idle kicking
  * 
- * $Id: chan.c,v 1.61 2000/12/06 02:32:18 guppy Exp $
+ * $Id: chan.c,v 1.62 2000/12/17 21:37:46 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -101,12 +101,12 @@
     s[i++] = 'a';
   if (atr & CHANKEY)
     s[i++] = 'k';
-  if (chan->channel.maxmembers > -1)
+  if (chan->channel.maxmembers != 0)
     s[i++] = 'l';
   s[i] = 0;
   if (chan->channel.key[0])
     i += sprintf(s + i, " %s", chan->channel.key);
-  if (chan->channel.maxmembers > -1)
+  if (chan->channel.maxmembers != 0)
     sprintf(s + i, " %d", chan->channel.maxmembers);
   return s;
 }
@@ -659,12 +659,12 @@
       add_mode(chan, '+', 'q', "");
     else if ((mns & CHANQUIET) && (cur & CHANQUIET))
       add_mode(chan, '-', 'q', "");
-    if ((chan->limit_prot != -1) && (chan->channel.maxmembers == -1)) {
+    if ((chan->limit_prot != 0) && (chan->channel.maxmembers == 0)) {
       char s[50];
 
       sprintf(s, "%d", chan->limit_prot);
       add_mode(chan, '+', 'l', s);
-    } else if ((mns & CHANLIMIT) && (chan->channel.maxmembers >= 0))
+    } else if ((mns & CHANLIMIT) && (chan->channel.maxmembers != 0))
       add_mode(chan, '-', 'l', "");
     if (chan->key_prot[0]) {
       if (rfc_casecmp(chan->channel.key, chan->key_prot) != 0) {
Index: eggdrop1.6/src/mod/irc.mod/mode.c
diff -u eggdrop1.6/src/mod/irc.mod/mode.c:1.38 eggdrop1.6/src/mod/irc.mod/mode.c:1.39
--- eggdrop1.6/src/mod/irc.mod/mode.c:1.38	Fri Oct 27 14:38:09 2000
+++ eggdrop1.6/src/mod/irc.mod/mode.c	Sun Dec 17 15:37:46 2000
@@ -4,7 +4,7 @@
  *   channel mode changes and the bot's reaction to them
  *   setting and getting the current wanted channel modes
  * 
- * $Id: mode.c,v 1.38 2000/10/27 19:38:09 fabian Exp $
+ * $Id: mode.c,v 1.39 2000/12/17 21:37:46 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -82,7 +82,7 @@
    * a 13 char buffer for '-2147483647 \0'. We'll be overwriting the existing
    * terminating null in 'post', so makesure postsize >= 12.
    */
-  if (chan->limit != -1 && postsize >= 12) {
+  if (chan->limit != 0 && postsize >= 12) {
     if (plus != 1) {
       *p++ = '+', plus = 1;
     }
@@ -91,7 +91,7 @@
     /* 'sizeof(post) - 1' is used because we want to overwrite the old null */
     postsize -= sprintf(&post[(sizeof(post) - 1) - postsize], "%d ", chan->limit);
     
-    chan->limit = -1;
+    chan->limit = 0;
   }
   
   /* -k ? */
@@ -966,16 +966,16 @@
 	  if (ms2[0] == '-') {
 	    check_tcl_mode(nick, from, u, chan->dname, ms2, "");
 	    if (channel_active(chan)) {
-	      if ((reversing) && (chan->channel.maxmembers != (-1))) {
+	      if ((reversing) && (chan->channel.maxmembers != 0)) {
 		simple_sprintf(s, "%d", chan->channel.maxmembers);
 		add_mode(chan, '+', 'l', s);
-	      } else if ((chan->limit_prot != (-1)) && !glob_master(user) &&
+	      } else if ((chan->limit_prot != 0) && !glob_master(user) &&
 			 !chan_master(user)) {
 		simple_sprintf(s, "%d", chan->limit_prot);
 		add_mode(chan, '+', 'l', s);
 	      }
 	    }
-	    chan->channel.maxmembers = (-1);
+	    chan->channel.maxmembers = 0;
 	  } else {
 	    op = newsplit(&msg);
 	    fixcolon(op);
@@ -996,7 +996,7 @@
 	    }
 	    if ((chan->limit_prot != chan->channel.maxmembers) &&
 		(chan->mode_pls_prot & CHANLIMIT) &&
-		(chan->limit_prot != (-1)) &&	/* arthur2 */
+		(chan->limit_prot != 0) &&	/* arthur2 */
 		!glob_master(user) && !chan_master(user)) {
 	      simple_sprintf(s, "%d", chan->limit_prot);
 	      add_mode(chan, '+', 'l', s);
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.401 eggdrop1.6/src/patch.h:1.402
--- eggdrop1.6/src/patch.h:1.401	Wed Dec 13 22:11:54 2000
+++ eggdrop1.6/src/patch.h	Sun Dec 17 15:37:46 2000
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  * 
- * $Id: patch.h,v 1.401 2000/12/14 04:11:54 guppy Exp $
+ * $Id: patch.h,v 1.402 2000/12/17 21:37:46 guppy Exp $
  */
 /* 
  * Copyright (C) 1997  Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("976766282");		/* current unixtime */
+patch("977089053");		/* current unixtime */
 /*
  *
  *
  */
-patch("share_status_message");
+patch("negativelimit");
 /*
  *
  *
----------------------- End of diff -----------------------



More information about the Changes mailing list