[cvslog] (2002-10-23 04:06:33 UTC) Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Tue Oct 22 23:07:01 CST 2002


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2002-10-23 04:06:33 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

Modified files:
     eggdrop.conf doc/UPDATES1.6 src/mod/server.mod/server.c

Log message:

Added a stacking limit for fastdeq. Patch by Eule.

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.421 eggdrop1.6/doc/UPDATES1.6:1.422
--- eggdrop1.6/doc/UPDATES1.6:1.421	Tue Oct 22 23:03:04 2002
+++ eggdrop1.6/doc/UPDATES1.6	Tue Oct 22 23:06:22 2002
@@ -1,10 +1,11 @@
-$Id: UPDATES1.6,v 1.421 2002/10/23 04:03:04 wcc Exp $
+$Id: UPDATES1.6,v 1.422 2002/10/23 04:06:22 wcc Exp $
 
 Changes in Eggdrop: (since v1.6.0)
 ----------------------------------
 
 1.6.13
 Found by  Fixed by  What...
+          Eule      added a stacking limit for fastdeq
           Borodulin fixed a UTF problem with scandinavian characters
           Eule      made the modes-per-line limit definable in src/chan.h
           BarkerJr  [ban/exempt/invite]-time were not being saved to the channel file
Index: eggdrop1.6/eggdrop.conf
diff -u eggdrop1.6/eggdrop.conf:1.3 eggdrop1.6/eggdrop.conf:1.4
--- eggdrop1.6/eggdrop.conf:1.3	Tue Oct 22 23:03:04 2002
+++ eggdrop1.6/eggdrop.conf	Tue Oct 22 23:06:22 2002
@@ -1,7 +1,7 @@
 #! /path/to/executable/eggdrop
 # ^- This should contain a fully qualified path to your Eggdrop executable.
 #
-# $Id: eggdrop.conf,v 1.3 2002/10/23 04:03:04 wcc Exp $
+# $Id: eggdrop.conf,v 1.4 2002/10/23 04:06:22 wcc Exp $
 #
 # This is a sample Eggdrop configuration file which includes all possible
 # settings that can be used to configure your bot.
@@ -897,6 +897,11 @@
 #       already parted the channel.
 # ATTENTION: Setting 2 is very CPU intensive.
 set optimize-kicks 1
+
+# If your network supports more recipients per command then 1, you can
+# change this behavior here. Set this to the number of recipients per
+# command, or set this to 0 for unlimited.
+set stack-limit 4
 
 ### SERVER MODULE - OTHER NETWORKS (net-type 5) ###
 
Index: eggdrop1.6/src/mod/server.mod/server.c
diff -u eggdrop1.6/src/mod/server.mod/server.c:1.81 eggdrop1.6/src/mod/server.mod/server.c:1.82
--- eggdrop1.6/src/mod/server.mod/server.c:1.81	Fri Jul 19 00:25:33 2002
+++ eggdrop1.6/src/mod/server.mod/server.c	Tue Oct 22 23:06:22 2002
@@ -2,7 +2,7 @@
  * server.c -- part of server.mod
  *   basic irc server support
  *
- * $Id: server.c,v 1.81 2002/07/19 05:25:33 wcc Exp $
+ * $Id: server.c,v 1.82 2002/10/23 04:06:22 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -113,6 +113,7 @@
 static void purge_kicks(struct msgq_head *);
 static int deq_kick(int);
 static void msgq_clear(struct msgq_head *qh);
+static int stack_limit;
 
 #include "servmsg.c"
 
@@ -394,7 +395,7 @@
   struct msgq *m, *nm;
   char msgstr[511], nextmsgstr[511], tosend[511], victims[511], stackable[511],
        *msg, *nextmsg, *cmd, *nextcmd, *to, *nextto, *stckbl;
-  int len, doit = 0, found = 0, who_count =0, stack_method = 1;
+  int len, doit = 0, found = 0, cmd_count =0, stack_method = 1;
 
   if (!use_fastdeq)
     return 0;
@@ -460,9 +461,8 @@
         && !strcmp(cmd, nextcmd) && !strcmp(msg, nextmsg)
         && ((strlen(cmd) + strlen(victims) + strlen(nextto)
 	     + strlen(msg) + 2) < 510)
-        && (egg_strcasecmp(cmd, "WHO") || who_count < MAXPENALTY - 1)) {
-      if (!egg_strcasecmp(cmd, "WHO"))
-        who_count++;
+        && (!stack_limit || cmd_count < stack_limit - 1)) {
+      cmd_count++;
       if (stack_method == 1)
       	simple_sprintf(victims, "%s,%s", victims, nextto);
       else
@@ -1362,6 +1362,7 @@
   {"nick-len",			&nick_len,			0},
   {"optimize-kicks",		&optimize_kicks,		0},
   {"isjuped",			&nick_juped,			0},
+  {"stack-limit",		&stack_limit,			0},
   {NULL,			NULL,				0}
 };
 
@@ -1888,6 +1889,7 @@
   nick_len = 9;
   kick_method = 1;
   optimize_kicks = 0;
+  stack_limit = 4;
 
   server_table[4] = (Function) botname;
   module_register(MODULE_NAME, server_table, 1, 2);
----------------------- End of diff -----------------------



More information about the Changes mailing list