[cvslog] [CVS] Module eggdrop1.6: Change committed

cvs at eggheads.org cvs at eggheads.org
Thu Oct 1 09:52:44 CST 2009


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2009-10-01 15:52:44 UTC
Committer  : Rumen Stoyanov <pseudo at egg6.net>

Modified files:
     eggdrop.conf doc/Changes1.6 doc/tcl-commands.doc
     doc/html/mod-server.html doc/html/tcl-commands.html
     doc/settings/mod.server src/patch.h src/mod/server.mod/server.c
     src/mod/server.mod/tclserv.c src/mod/server.mod/help/server.help
     src/mod/server.mod/help/set/server.help

Log message:

Added a msg-rate config variable, to replace the current #define msgrate in server.mod.

Added new command [putnow] for bypassing the queueing system to be used instead of [putdccraw]. Equivalent to [putserv noqueue] in eggdrop 1.9.

Patch by: pseudo

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/Changes1.6
diff -u eggdrop1.6/doc/Changes1.6:1.33 eggdrop1.6/doc/Changes1.6:1.34
--- eggdrop1.6/doc/Changes1.6:1.33	Thu Oct  1 09:24:00 2009
+++ eggdrop1.6/doc/Changes1.6	Thu Oct  1 09:52:33 2009
@@ -1,4 +1,4 @@
-$Id: Changes1.6,v 1.33 2009/10/01 15:24:00 pseudo Exp $
+$Id: Changes1.6,v 1.34 2009/10/01 15:52:33 pseudo Exp $
 
 Eggdrop Changes (since version 1.6.0)
 
@@ -6,8 +6,14 @@
 
 1.6.20 (CVS):
 
+  - Added a msg-rate config variable, to replace the current #define msgrate
+    in server.mod.
+  - Added new command [putnow] for bypassing the queueing system to be used
+    instead of [putdccraw]. Equivalent to [putserv noqueue] in eggdrop 1.9.
+    Patch by: pseudo
+
   - Fixed a reversed pointer check in join_notes().
-    Fixes Bugzilla Bug # 455: "Possible segment violation in join_notes"
+    Fixes Bugzilla Bug # 455 "Possible segment violation in join_notes"
     Patch by: pseudo
 
   - Made eggdrop request ban/invite exception lists when (half)opped,
Index: eggdrop1.6/doc/html/mod-server.html
diff -u eggdrop1.6/doc/html/mod-server.html:1.38 eggdrop1.6/doc/html/mod-server.html:1.39
--- eggdrop1.6/doc/html/mod-server.html:1.38	Sat Feb 16 15:40:59 2008
+++ eggdrop1.6/doc/html/mod-server.html	Thu Oct  1 09:52:33 2009
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: mod-server.html,v 1.38 2008/02/16 21:40:59 guppy Exp $ -->
+<!-- $Id: mod-server.html,v 1.39 2009/10/01 15:52:33 pseudo Exp $ -->
 
 <html>
   <head>
@@ -157,6 +157,14 @@
           with &#39;.jump&#39; or in &#39;set servers&#39;.</p>
         </dd>
 
+        <dt><strong>set msg-rate 2</strong></dt>
+
+        <dd>
+          <p>Number of seconds to wait between transmitting queued lines to
+          the server. Lower this value at your own risk.  ircd is known to
+          start flood control at 512 bytes/2 seconds.</p>
+        </dd>
+
         <dt><strong>set server-cycle-wait 60</strong></dt>
 
         <dd>
Index: eggdrop1.6/doc/html/tcl-commands.html
diff -u eggdrop1.6/doc/html/tcl-commands.html:1.58 eggdrop1.6/doc/html/tcl-commands.html:1.59
--- eggdrop1.6/doc/html/tcl-commands.html:1.58	Sat May 16 05:25:28 2009
+++ eggdrop1.6/doc/html/tcl-commands.html	Thu Oct  1 09:52:33 2009
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: tcl-commands.html,v 1.58 2009/05/16 11:25:28 tothwolf Exp $ -->
+<!-- $Id: tcl-commands.html,v 1.59 2009/10/01 15:52:33 pseudo Exp $ -->
 
 <html>
   <head>
@@ -128,6 +128,19 @@
           <p><strong>Module:</strong> server</p>
         </dd>
 
+        <dt><strong><a name="cmd_putnow"></a>putnow &lt;text&gt;</strong></dt>*
+
+        <dd>
+          <p><strong>Description:</strong> sends unqueued text to the server
+          immediately.
+          Use with caution, as the bot may easily flood itself off
+          the server.</p>
+
+          <p><strong>Returns:</strong> nothing</p>
+
+          <p><strong>Module:</strong> server</p>
+        </dd>
+
         <dt><strong><a name="cmd_putkick"></a>putkick &lt;channel&gt; &lt;nick,nick,...&gt;
         [reason]</strong></dt>
 
Index: eggdrop1.6/doc/settings/mod.server
diff -u eggdrop1.6/doc/settings/mod.server:1.38 eggdrop1.6/doc/settings/mod.server:1.39
--- eggdrop1.6/doc/settings/mod.server:1.38	Sat Feb 16 15:41:01 2008
+++ eggdrop1.6/doc/settings/mod.server	Thu Oct  1 09:52:33 2009
@@ -1,4 +1,4 @@
-$Id: mod.server,v 1.38 2008/02/16 21:41:01 guppy Exp $
+$Id: mod.server,v 1.39 2009/10/01 15:52:33 pseudo Exp $
 
 Server Module
 Last revised: February 12, 2003
@@ -95,6 +95,10 @@
       Set the default port which should be used if none is specified with
       '.jump' or in 'set servers'.
 
+    set msg-rate 2
+      Number of seconds to wait between transmitting queued lines to the
+      server. Lower this value at your own risk.  ircd is known to start
+      flood control at 512 bytes/2 seconds.
 
     set server-cycle-wait 60
       This setting defines how long Eggdrop should wait before moving from one
Index: eggdrop1.6/doc/tcl-commands.doc
diff -u eggdrop1.6/doc/tcl-commands.doc:1.124 eggdrop1.6/doc/tcl-commands.doc:1.125
--- eggdrop1.6/doc/tcl-commands.doc:1.124	Sat May 16 05:25:27 2009
+++ eggdrop1.6/doc/tcl-commands.doc	Thu Oct  1 09:52:33 2009
@@ -1,4 +1,4 @@
-$Id: tcl-commands.doc,v 1.124 2009/05/16 11:25:27 tothwolf Exp $
+$Id: tcl-commands.doc,v 1.125 2009/10/01 15:52:33 pseudo Exp $
 
 Eggdrop Tcl Commands
 Last revised: August 02, 2004
@@ -50,6 +50,12 @@
     Returns: nothing
     Module: server
 
+| putnow <text>
+|   Description: sends unqueued text to the server immediately.
+|     Use with caution, as the bot may easily flood itself off the server.
+|   Returns: nothing
+|   Module: server
+
   putkick <channel> <nick,nick,...> [reason]
     Description: sends kicks to the server and tries to put as many nicks
       into one kick command as possible.
Index: eggdrop1.6/eggdrop.conf
diff -u eggdrop1.6/eggdrop.conf:1.55 eggdrop1.6/eggdrop.conf:1.56
--- eggdrop1.6/eggdrop.conf:1.55	Sat May 16 05:25:27 2009
+++ eggdrop1.6/eggdrop.conf	Thu Oct  1 09:52:33 2009
@@ -1,7 +1,7 @@
 #! /path/to/executable/eggdrop
 # ^- This should contain a fully qualified path to your Eggdrop executable.
 #
-# $Id: eggdrop.conf,v 1.55 2009/05/16 11:25:27 tothwolf Exp $
+# $Id: eggdrop.conf,v 1.56 2009/10/01 15:52:33 pseudo Exp $
 #
 # This is a sample Eggdrop configuration file which includes all possible
 # settings that can be used to configure your bot.
@@ -845,6 +845,11 @@
   another.example.com:7000:password
 }
 
+# Number of seconds to wait between transmitting queued lines to the server.
+# Lower this value at your own risk.  ircd is known to start flood control
+# at 512 bytes/2 seconds.
+set msg-rate 2
+
 # This setting makes the bot try to get his original nickname back if its
 # primary nickname is already in use.
 set keep-nick 1
Index: eggdrop1.6/src/mod/server.mod/help/server.help
diff -u eggdrop1.6/src/mod/server.mod/help/server.help:1.8 eggdrop1.6/src/mod/server.mod/help/server.help:1.9
--- eggdrop1.6/src/mod/server.mod/help/server.help:1.8	Fri Feb  4 08:15:27 2005
+++ eggdrop1.6/src/mod/server.mod/help/server.help	Thu Oct  1 09:52:34 2009
@@ -55,7 +55,7 @@
       %bcheck-mode-r    ctcp-mode           use-penalties%b
       %bdouble-server   double-mode         double-help%b
       %buse-fastdeq     nick-len            optimize-kicks%b
-      %bstack-limit     exclusive-binds%b
+      %bstack-limit     exclusive-binds     msg-rate%b
    (Use %b'.help set <variable>'%b for more info)
 %{help=all}%{+o|o}
 ###  %bserver module%b commands
Index: eggdrop1.6/src/mod/server.mod/help/set/server.help
diff -u eggdrop1.6/src/mod/server.mod/help/set/server.help:1.10 eggdrop1.6/src/mod/server.mod/help/set/server.help:1.11
--- eggdrop1.6/src/mod/server.mod/help/set/server.help:1.10	Fri Feb  4 08:15:27 2005
+++ eggdrop1.6/src/mod/server.mod/help/set/server.help	Thu Oct  1 09:52:34 2009
@@ -162,6 +162,11 @@
    %bdefault-port%b setting.
 
 see also: default-port
+%{help=set msg-rate}%{+n}
+###  %bset msg-rate%b <#seconds>
+   Number of seconds to wait between transmitting queued lines
+   to the server. Lower this value at your own risk.  ircd is
+   known to start flood control at 512 bytes/2 seconds.
 %{help=set botname}%{+n}
 ###  %bset botname%b
    This read-only variable returns the current nick!user at host of
@@ -186,4 +191,4 @@
      %bserverror-quit%b       %banswer-ctcp%b    %baltnick%b
      %btrigger-on-ignore%b    %bdefault-port%b   %brealname%b
      %bserver-cycle-wait%b    %bcheck-stoned%b   %bflood-msg%b
-     %bquiet-reject%b         %bkeep-nick
+     %bquiet-reject%b         %bkeep-nick%b      %bmsg-rate
Index: eggdrop1.6/src/mod/server.mod/server.c
diff -u eggdrop1.6/src/mod/server.mod/server.c:1.129 eggdrop1.6/src/mod/server.mod/server.c:1.130
--- eggdrop1.6/src/mod/server.mod/server.c:1.129	Sat May 16 08:16:07 2009
+++ eggdrop1.6/src/mod/server.mod/server.c	Thu Oct  1 09:52:33 2009
@@ -2,7 +2,7 @@
  * server.c -- part of server.mod
  *   basic irc server support
  *
- * $Id: server.c,v 1.129 2009/05/16 14:16:07 tothwolf Exp $
+ * $Id: server.c,v 1.130 2009/10/01 15:52:33 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -95,7 +95,8 @@
                                  * network. */
 static int kick_method;
 static int optimize_kicks;
-
+static int msgrate;             /* Number of seconds between sending
+                                 * queued lines to server. */
 
 static p_tcl_bind_list H_wall, H_raw, H_notc, H_msgm, H_msg, H_flud, H_ctcr,
                        H_ctcp;
@@ -119,12 +120,6 @@
 
 #define MAXPENALTY 10
 
-/* Number of seconds to wait between transmitting queued lines to the server
- * lower this value at your own risk.  ircd is known to start flood control
- * at 512 bytes/2 seconds.
- */
-#define msgrate 2
-
 /* Maximum messages to store in each queue. */
 static int maxqmsg;
 static struct msgq_head mq, hq, modeq;
@@ -1365,6 +1360,7 @@
   {"isjuped",           &nick_juped,                0},
   {"stack-limit",       &stack_limit,               0},
   {"exclusive-binds",   &exclusive_binds,           0},
+  {"msg-rate",          &msgrate,                   0},
   {NULL,                NULL,                       0}
 };
 
@@ -1895,6 +1891,7 @@
   optimize_kicks = 0;
   stack_limit = 4;
   realservername = 0;
+  msgrate = 2;
 
   server_table[4] = (Function) botname;
   module_register(MODULE_NAME, server_table, 1, 2);
Index: eggdrop1.6/src/mod/server.mod/tclserv.c
diff -u eggdrop1.6/src/mod/server.mod/tclserv.c:1.21 eggdrop1.6/src/mod/server.mod/tclserv.c:1.22
--- eggdrop1.6/src/mod/server.mod/tclserv.c:1.21	Sat Feb 16 15:41:10 2008
+++ eggdrop1.6/src/mod/server.mod/tclserv.c	Thu Oct  1 09:52:33 2009
@@ -1,7 +1,7 @@
 /*
  * tclserv.c -- part of server.mod
  *
- * $Id: tclserv.c,v 1.21 2008/02/16 21:41:10 guppy Exp $
+ * $Id: tclserv.c,v 1.22 2009/10/01 15:52:33 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -33,6 +33,25 @@
   return TCL_OK;
 }
 
+static int tcl_putnow STDVAR
+{
+  int len;
+  char s[511], *p;
+  
+  BADARGS(2, 2, " text");
+
+  strncpyz(s, argv[1], 511);
+  if ((p = strchr(s, '\n')))
+    *p = 0;
+  if ((p = strchr(s, '\r')))
+    *p = 0;
+  if (raw_log)
+    putlog(LOG_SRVOUT, "*", "[r->] %s", s);
+  len = strlen(s);
+  write_to_server(s, len);
+  return TCL_OK;
+}
+
 static int tcl_putquick STDVAR
 {
   char s[511], *p;
@@ -261,5 +280,6 @@
   {"puthelp",    tcl_puthelp},
   {"putserv",    tcl_putserv},
   {"putquick",   tcl_putquick},
+  {"putnow",     tcl_putnow},
   {NULL,         NULL}
 };
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.1211 eggdrop1.6/src/patch.h:1.1212
--- eggdrop1.6/src/patch.h:1.1211	Thu Oct  1 09:24:00 2009
+++ eggdrop1.6/src/patch.h	Thu Oct  1 09:52:33 2009
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.1211 2009/10/01 15:24:00 pseudo Exp $
+ * $Id: patch.h,v 1.1212 2009/10/01 15:52:33 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1254410097");            /* current unixtime */
+patch("1254410785");            /* current unixtime */
 /*
  *
  *
  */
-patch("dumbfix");
+patch("msgrate");
 /*
  *
  *
----------------------- End of diff -----------------------



More information about the Changes mailing list