[cvslog] Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Tue Sep 25 22:59:01 CST 2001


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2001-09-26 03:58:30 UTC
Commited by: Jeff Fisher <guppy at techmonkeys.org>

Modified files:
     doc/UPDATES1.6 doc/tcl-commands.doc
     src/mod/channels.mod/tclchan.c

Log message:

backported BarkerJr's -dynamicban patch and cleaned up a few while loops

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.183 eggdrop1.6/doc/UPDATES1.6:1.184
--- eggdrop1.6/doc/UPDATES1.6:1.183	Tue Sep 25 18:21:44 2001
+++ eggdrop1.6/doc/UPDATES1.6	Tue Sep 25 22:58:19 2001
@@ -1,10 +1,11 @@
-$Id: UPDATES1.6,v 1.183 2001/09/25 23:21:44 guppy Exp $
+$Id: UPDATES1.6,v 1.184 2001/09/26 03:58:19 guppy Exp $
 
 Changes in eggdrop: (since v1.6.0)
 ----------------------------------
 
 1.6.7
 Found by  Fixed by  What...
+          BarkerJr  backported a check for -dynamicbans to new[ban|exempt|invite]
           guppy     replaced old md5 routines with new ones (backport from 1.7)
           guppy     cleaned up our tcl information on .status (backport from 1.7)
           guppy     removed dcc-portrange since it was useless (backport from 1.7)
Index: eggdrop1.6/doc/tcl-commands.doc
diff -u eggdrop1.6/doc/tcl-commands.doc:1.53 eggdrop1.6/doc/tcl-commands.doc:1.54
--- eggdrop1.6/doc/tcl-commands.doc:1.53	Sun Aug 19 03:41:28 2001
+++ eggdrop1.6/doc/tcl-commands.doc	Tue Sep 25 22:58:19 2001
@@ -1012,14 +1012,14 @@
 
   (1)  MSG
        bind msg <flags> <command> <proc>
-       procname <nick> <user at host> <handle> <arg>
+       procname <nick> <user at host> <handle> <text>
 
        used for /msg commands; the first word of the user's msg is the
        command, and everything else becomes the argument string
 
   (2)  DCC
        bind dcc <flags> <command> <proc>
-       procname <handle> <idx> <arg>
+       procname <handle> <idx> <text>
 
        used for commands from a dcc chat on the party line; as in MSG, the
        command is the first word and everything else is the argument string;
@@ -1028,7 +1028,7 @@
 
   (3)  FIL
        bind fil <flags> <command> <proc>
-       procname <handle> <idx> <arg>
+       procname <handle> <idx> <text>
 
        the same as DCC, except this is triggered if the user is in the file
        area instead of the party line
@@ -1036,7 +1036,7 @@
 
   (4)  PUB
        bind pub <flags> <command> <proc>
-       procname <nick> <user at host> <handle> <channel> <arg>
+       procname <nick> <user at host> <handle> <channel> <text>
 
        used for commands given on a channel; just like MSG, the first word
        becomes the command and everything else is the argument string
@@ -1170,14 +1170,14 @@
 
   (16) CTCR
        bind ctcr <flags> <keyword-mask> <proc>
-       proc-name <nick> <user at host> <handle> <dest> <keyword> <arg...>
+       proc-name <nick> <user at host> <handle> <dest> <keyword> <text...>
 
        just like ctcp, but this is triggered for a ctcp-reply (ctcp
        embedded in a notice instead of a privmsg)
 
   (17) RAW   (stackable)
        bind raw <flags> <keyword-mask> <proc>
-       procname <from> <keyword> <arg...>
+       procname <from> <keyword> <text...>
 
        previous versions of eggdrop required a special compile option to
        enable this binding, but it's now standard; the mask is checked
@@ -1191,7 +1191,7 @@
 
   (18) BOT
        bind bot <flags> <command> <proc>
-       proc-name <from-bot> <command> <arg>
+       proc-name <from-bot> <command> <text>
 
        triggered by a message coming from another bot in the botnet; works
        similar to a DCC binding; the first word is the command and the rest
Index: eggdrop1.6/src/mod/channels.mod/tclchan.c
diff -u eggdrop1.6/src/mod/channels.mod/tclchan.c:1.49 eggdrop1.6/src/mod/channels.mod/tclchan.c:1.50
--- eggdrop1.6/src/mod/channels.mod/tclchan.c:1.49	Sun Sep 23 15:17:47 2001
+++ eggdrop1.6/src/mod/channels.mod/tclchan.c	Tue Sep 25 22:58:20 2001
@@ -1,7 +1,7 @@
 /*
  * tclchan.c -- part of channels.mod
  *
- * $Id: tclchan.c,v 1.49 2001/09/23 20:17:47 guppy Exp $
+ * $Id: tclchan.c,v 1.50 2001/09/26 03:58:20 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -28,11 +28,8 @@
 
   BADARGS(2, 2, " ban");
   if (u_delban(NULL, argv[1], 1) > 0) {
-    chan = chanset;
-    while (chan != NULL) {
+    for (chan = chanset; chan; chan = chan->next)
       add_mode(chan, '-', 'b', argv[1]);
-      chan = chan->next;
-    }
     Tcl_AppendResult(irp, "1", NULL);
   } else
     Tcl_AppendResult(irp, "0", NULL);
@@ -63,11 +60,8 @@
 
   BADARGS(2, 2, " exempt");
   if (u_delexempt(NULL,argv[1],1) > 0) {
-    chan = chanset;
-    while (chan != NULL) {
+    for (chan = chanset; chan; chan = chan->next)
       add_mode(chan, '-', 'e', argv[1]);
-      chan = chan->next;
-    }
     Tcl_AppendResult(irp, "1", NULL);
   } else
     Tcl_AppendResult(irp, "0", NULL);
@@ -98,11 +92,8 @@
 
   BADARGS(2, 2, " invite");
   if (u_delinvite(NULL,argv[1],1) > 0) {
-    chan = chanset;
-    while (chan != NULL) {
+    for (chan = chanset; chan; chan = chan->next)
       add_mode(chan, '-', 'I', argv[1]);
-      chan = chan->next;
-    }
     Tcl_AppendResult(irp, "1", NULL);
   } else
     Tcl_AppendResult(irp, "0", NULL);
@@ -526,7 +517,8 @@
       expire_time = now + (atoi(argv[5]) * 60);
   }
   if (u_addban(chan, ban, from, cmt, expire_time, sticky))
-    add_mode(chan, '+', 'b', ban);
+    if (sticky || !channel_dynamicbans(chan))
+      add_mode(chan, '+', 'b', ban);
   return TCL_OK;
 }
 
@@ -560,11 +552,9 @@
       expire_time = now + (atoi(argv[4]) * 60);
   }
   u_addban(NULL, ban, from, cmt, expire_time, sticky);
-  chan = chanset;
-  while (chan != NULL) {
-    add_mode(chan, '+', 'b', ban);
-    chan = chan->next;
-  }
+  for (chan = chanset; chan; chan = chan->next)
+    if (sticky || !channel_dynamicbans(chan))
+      add_mode(chan, '+', 'b', ban);
   return TCL_OK;
 }
 
@@ -603,7 +593,8 @@
       expire_time = now + (atoi(argv[5]) * 60);
   }
   if (u_addexempt(chan, exempt, from, cmt, expire_time,sticky))
-    add_mode(chan, '+', 'e', exempt);
+    if (sticky || !channel_dynamicexempts(chan))
+      add_mode(chan, '+', 'e', exempt);
   return TCL_OK;
 }
 
@@ -637,11 +628,9 @@
       expire_time = now + (atoi(argv[4]) * 60);
   }
   u_addexempt(NULL,exempt, from, cmt, expire_time,sticky);
-  chan = chanset;
-  while (chan != NULL) {
-    add_mode(chan, '+', 'e', exempt);
-    chan = chan->next;
-  }
+  for (chan = chanset; chan; chan = chan->next)
+    if (sticky || !channel_dynamicexempts(chan))
+      add_mode(chan, '+', 'e', exempt);
   return TCL_OK;
 }
 
@@ -680,7 +669,8 @@
       expire_time = now + (atoi(argv[5]) * 60);
   }
   if (u_addinvite(chan, invite, from, cmt, expire_time,sticky))
-    add_mode(chan, '+', 'I', invite);
+    if (sticky || !channel_dynamicinvites(chan))
+      add_mode(chan, '+', 'I', invite);
   return TCL_OK;
 }
 
@@ -714,11 +704,9 @@
       expire_time = now + (atoi(argv[4]) * 60);
   }
   u_addinvite(NULL,invite, from, cmt, expire_time,sticky);
-  chan = chanset;
-  while (chan != NULL) {
-     add_mode(chan, '+', 'I', invite);
-     chan = chan->next;
-  }
+  for (chan = chanset; chan; chan = chan->next)
+    if (sticky || !channel_dynamicinvites(chan))
+      add_mode(chan, '+', 'I', invite);
   return TCL_OK;
 }
 
----------------------- End of diff -----------------------



More information about the Changes mailing list