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

cvs at eggheads.org cvs at eggheads.org
Sun Oct 24 07:22:52 CST 2010


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.8
Commit time: 2010-10-24 13:22:50 UTC
Committer  : Rumen Stoyanov <pseudo at egg6.net>

Modified files:
     eggdrop.conf doc/Changes1.8 doc/html/egg-core.html
     doc/html/mod-irc.html doc/html/mod-server.html
     doc/settings/core.settings doc/settings/mod.irc
     doc/settings/mod.server help/core.help help/set/cmds1.help
     src/patch.h src/tcl.c src/userrec.c src/mod/irc.mod/chan.c
     src/mod/irc.mod/irc.c src/mod/irc.mod/help/irc.help
     src/mod/server.mod/server.c src/mod/server.mod/server.h
     src/mod/server.mod/servmsg.c src/mod/server.mod/help/server.help
     src/mod/server.mod/help/set/server.help

Log message:

Removed the never-give-up, sort-users and kick-fun/ban-fun variables. Sorting users shouldn't be a challenge for CPUs nowadays. The rest are rarely used and can be scripted.

---------------------- diff included ----------------------
Index: eggdrop1.8/doc/Changes1.8
diff -u eggdrop1.8/doc/Changes1.8:1.24 eggdrop1.8/doc/Changes1.8:1.25
--- eggdrop1.8/doc/Changes1.8:1.24	Sun Oct 24 06:39:36 2010
+++ eggdrop1.8/doc/Changes1.8	Sun Oct 24 07:22:39 2010
@@ -1,4 +1,4 @@
-$Id: Changes1.8,v 1.24 2010/10/24 12:39:36 pseudo Exp $
+$Id: Changes1.8,v 1.25 2010/10/24 13:22:39 pseudo Exp $
 
 Eggdrop Changes (since version 1.8.0)
 
@@ -6,6 +6,11 @@
 
 1.8.0 (CVS):
 
+  - Removed the never-give-up, sort-users and kick-fun/ban-fun variables.
+    Sorting users shouldn't be a challenge for CPUs nowadays. The rest are
+    rarely used and can be scripted.
+    Patch by: guppy
+
   - Removed wire.mod and all references to it. Botnet and partyline encryption
     are now available using ssl.
     Patch by: guppy
Index: eggdrop1.8/doc/html/egg-core.html
diff -u eggdrop1.8/doc/html/egg-core.html:1.4 eggdrop1.8/doc/html/egg-core.html:1.5
--- eggdrop1.8/doc/html/egg-core.html:1.4	Sat Oct 23 05:16:12 2010
+++ eggdrop1.8/doc/html/egg-core.html	Sun Oct 24 07:22:39 2010
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: egg-core.html,v 1.4 2010/10/23 11:16:12 pseudo Exp $ -->
+<!-- $Id: egg-core.html,v 1.5 2010/10/24 13:22:39 pseudo Exp $ -->
 
 <html>
   <head>
@@ -476,14 +476,6 @@
           pidfile is specified, pid.(botnet-nick) will be used.</p>
         </dd>
 
-        <dt><strong>set sort-users 0</strong></dt>
-
-        <dd>
-          <p>If you want your userfile to be sorted upon saving, enable this
-          setting. This causes the bot to use a bit more CPU when saving the
-          userfile.</p>
-        </dd>
-
         <dt><strong>set help-path &quot;help/&quot;</strong></dt>
 
         <dd>
Index: eggdrop1.8/doc/html/mod-irc.html
diff -u eggdrop1.8/doc/html/mod-irc.html:1.1.1.1 eggdrop1.8/doc/html/mod-irc.html:1.2
--- eggdrop1.8/doc/html/mod-irc.html:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/doc/html/mod-irc.html	Sun Oct 24 07:22:39 2010
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: mod-irc.html,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $ -->
+<!-- $Id: mod-irc.html,v 1.2 2010/10/24 13:22:39 pseudo Exp $ -->
 
 <html>
   <head>
@@ -108,22 +108,6 @@
           features.</p>
         </dd>
 
-        <dt><strong>set kick-fun 0</strong></dt>
-
-        <dd>
-          <p>Set this to 1 if you want the bot to kick for control
-          character/ctcp avalanches to a channel. Remember that if it does,
-          it won&#39;t ban them. This can start kick floods.</p>
-        </dd>
-
-        <dt><strong>set ban-fun 0</strong></dt>
-
-        <dd>
-          <p>Set this to 1 if you want the bot to ban for control
-          character/ctcp avalanches to a channel. This can prevent kick
-          floods, but it also can fill the banlist.</p>
-        </dd>
-
         <dt><strong>set learn-users 0</strong></dt>
 
         <dd>
Index: eggdrop1.8/doc/html/mod-server.html
diff -u eggdrop1.8/doc/html/mod-server.html:1.2 eggdrop1.8/doc/html/mod-server.html:1.3
--- eggdrop1.8/doc/html/mod-server.html:1.2	Tue Oct 19 06:13:32 2010
+++ eggdrop1.8/doc/html/mod-server.html	Sun Oct 24 07:22:39 2010
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: mod-server.html,v 1.2 2010/10/19 12:13:32 pseudo Exp $ -->
+<!-- $Id: mod-server.html,v 1.3 2010/10/24 13:22:39 pseudo Exp $ -->
 
 <html>
   <head>
@@ -178,13 +178,6 @@
           this too low could result in your bot being K:Lined.</p>
         </dd>
 
-        <dt><strong>set never-give-up 1</strong></dt>
-
-        <dd>
-          <p>This settings makes the bot cycle forever through the server
-          list until it successfully connects to one.</p>
-        </dd>
-
         <dt><strong>set server-timeout 60</strong></dt>
 
         <dd>
Index: eggdrop1.8/doc/settings/core.settings
diff -u eggdrop1.8/doc/settings/core.settings:1.4 eggdrop1.8/doc/settings/core.settings:1.5
--- eggdrop1.8/doc/settings/core.settings:1.4	Sat Oct 23 05:16:12 2010
+++ eggdrop1.8/doc/settings/core.settings	Sun Oct 24 07:22:40 2010
@@ -1,4 +1,4 @@
-$Id: core.settings,v 1.4 2010/10/23 11:16:12 pseudo Exp $
+$Id: core.settings,v 1.5 2010/10/24 13:22:40 pseudo Exp $
 
 Eggdrop Core Settings
 Last revised: April 17, 2003
@@ -246,11 +246,6 @@
       specified, pid.(botnet-nick) will be used.
 
 
-    set sort-users 0
-      If you want your userfile to be sorted upon saving, enable this setting.
-      This causes the bot to use a bit more CPU when saving the userfile.
-
-
     set help-path "help/"
       Specify here where Eggdrop should look for help files. Don't modify this
       setting unless you know what you're doing!
Index: eggdrop1.8/doc/settings/mod.irc
diff -u eggdrop1.8/doc/settings/mod.irc:1.1.1.1 eggdrop1.8/doc/settings/mod.irc:1.2
--- eggdrop1.8/doc/settings/mod.irc:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/doc/settings/mod.irc	Sun Oct 24 07:22:40 2010
@@ -1,4 +1,4 @@
-$Id: mod.irc,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $
+$Id: mod.irc,v 1.2 2010/10/24 13:22:40 pseudo Exp $
 
 IRC Module
 Last revised: August 21, 2004
@@ -71,18 +71,6 @@
       +e/+I modes then you will be unable to use these features.
 
 
-    set kick-fun 0
-      Set this to 1 if you want the bot to kick for control character/ctcp
-      avalanches to a channel. Remember that if it does, it won't ban them.
-      This can start kick floods.
-
-
-    set ban-fun 0
-      Set this to 1 if you want the bot to ban for control character/ctcp
-      avalanches to a channel. This can prevent kick floods, but it also can
-      fill the banlist.
-
-
     set learn-users 0
       If you want people to be able to add themselves to the bot's userlist
       with the default userflags (defined above in the config file) via the
Index: eggdrop1.8/doc/settings/mod.server
diff -u eggdrop1.8/doc/settings/mod.server:1.2 eggdrop1.8/doc/settings/mod.server:1.3
--- eggdrop1.8/doc/settings/mod.server:1.2	Tue Oct 19 06:13:32 2010
+++ eggdrop1.8/doc/settings/mod.server	Sun Oct 24 07:22:40 2010
@@ -1,4 +1,4 @@
-$Id: mod.server,v 1.2 2010/10/19 12:13:32 pseudo Exp $
+$Id: mod.server,v 1.3 2010/10/24 13:22:40 pseudo Exp $
 
 Server Module
 Last revised: February 12, 2003
@@ -128,10 +128,6 @@
       your bot being K:Lined.
 
 
-    set never-give-up 1
-      This settings makes the bot cycle forever through the server list until
-      it successfully connects to one.
-
 
     set server-timeout 60
       Set here how long Eggdrop should wait for a response when connecting to
Index: eggdrop1.8/eggdrop.conf
diff -u eggdrop1.8/eggdrop.conf:1.7 eggdrop1.8/eggdrop.conf:1.8
--- eggdrop1.8/eggdrop.conf:1.7	Sun Oct 24 06:39:33 2010
+++ eggdrop1.8/eggdrop.conf	Sun Oct 24 07:22:39 2010
@@ -1,7 +1,7 @@
 #! /path/to/executable/eggdrop
 # ^- This should contain a fully qualified path to your Eggdrop executable.
 #
-# $Id: eggdrop.conf,v 1.7 2010/10/24 12:39:33 pseudo Exp $
+# $Id: eggdrop.conf,v 1.8 2010/10/24 13:22:39 pseudo Exp $
 #
 # This is a sample Eggdrop configuration file which includes all possible
 # settings that can be used to configure your bot.
@@ -207,10 +207,6 @@
 # specified, pid.(botnet-nick) will be used.
 #set pidfile "pid.LamestBot"
 
-# If you want your userfile to be sorted upon saving, enable this setting.
-# This causes the bot to use a bit more CPU when saving the userfile.
-set sort-users 0
-
 # Specify here where Eggdrop should look for help files. Don't modify this
 # setting unless you know what you're doing!
 set help-path "help/"
@@ -1021,10 +1017,6 @@
 # a flood. If you set this to 0:0, ctcp flood protection will be disabled.
 set flood-ctcp 3:60
 
-# This settings makes the bot cycle forever through the server list until
-# it successfully connects to one.
-set never-give-up 1
-
 # This setting defines how long Eggdrop should wait before moving from one
 # server to another on disconnect. If you set 0 here, Eggdrop will not wait
 # at all and will connect instantly. Setting this too low could result in
@@ -1173,16 +1165,6 @@
 # Do you want to enable invites (+I modes)?
 #set use-invites 0
 
-# Set this to 1 if you want the bot to kick for control character/ctcp
-# avalanches to a channel. Remember that if it does, it won't ban them.
-# This can start kick floods.
-set kick-fun 0
-
-# Set this to 1 if you want the bot to ban for control character/ctcp
-# avalanches to a channel. This can prevent kick floods, but it also can
-# fill the banlist.
-set ban-fun 0
-
 # If you want people to be able to add themselves to the bot's userlist
 # with the default userflags (defined above in the config file) via the
 # 'hello' msg command, set this to 1.
Index: eggdrop1.8/help/core.help
diff -u eggdrop1.8/help/core.help:1.5 eggdrop1.8/help/core.help:1.6
--- eggdrop1.8/help/core.help:1.5	Sun Oct 24 06:39:36 2010
+++ eggdrop1.8/help/core.help	Sun Oct 24 07:22:40 2010
@@ -185,7 +185,6 @@
 quick-logs
 logfile-suffix
 quiet-save
-sort-users
 remote-boots
 max-socks
 ident-timeout
Index: eggdrop1.8/help/set/cmds1.help
diff -u eggdrop1.8/help/set/cmds1.help:1.4 eggdrop1.8/help/set/cmds1.help:1.5
--- eggdrop1.8/help/set/cmds1.help:1.4	Sat Oct 23 05:16:12 2010
+++ eggdrop1.8/help/set/cmds1.help	Sun Oct 24 07:22:40 2010
@@ -218,11 +218,6 @@
    will also not be logged. In addition to this, you can disable the
    "Switching logfiles..." and the new date message at midnight, by
    setting this to 3.
-%{help=set sort-users}%{+n}
-###  %bset sort-users%b <0/1>
-   If you want your userfile to be sorted upon saving, enable this
-   setting. This causes the bot to use a bit more CPU when saving the
-   userfile.
 %{help=set remote-boots}%{+n}
 ###  %bset remote-boots%b <0/1>
    This setting defines whether or not people can boot users on the
Index: eggdrop1.8/src/mod/irc.mod/chan.c
diff -u eggdrop1.8/src/mod/irc.mod/chan.c:1.1.1.1 eggdrop1.8/src/mod/irc.mod/chan.c:1.2
--- eggdrop1.8/src/mod/irc.mod/chan.c:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/src/mod/irc.mod/chan.c	Sun Oct 24 07:22:40 2010
@@ -6,7 +6,7 @@
  *   user kickban, kick, op, deop
  *   idle kicking
  *
- * $Id: chan.c,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $
+ * $Id: chan.c,v 1.2 2010/10/24 13:22:40 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -2289,8 +2289,6 @@
   int ctcp_count = 0, ignoring;
   struct chanset_t *chan;
   struct userrec *u;
-  memberlist *m;
-  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 };
 
   /* Only handle if message is to a channel, or to @#channel. */
   /* FIXME: Properly handle ovNotices (@+#channel), vNotices (+#channel), etc. */
@@ -2307,42 +2305,7 @@
   strcpy(uhost, from);
   nick = splitnick(&uhost);
   ignoring = match_ignore(from);
-  /* Only check if flood-ctcp is active */
-  if (flud_ctcp_thr && detect_avalanche(msg)) {
-    u = get_user_by_host(from);
-    get_user_flagrec(u, &fr, chan->dname);
-    m = ismember(chan, nick);
-    /* Discard -- kick user if it was to the channel */
-    if (m && (me_op(chan) || (me_halfop(chan) && !chan_hasop(m))) &&
-        !chan_sentkick(m) && !chan_friend(fr) && !glob_friend(fr) &&
-        !(channel_dontkickops(chan) && (chan_op(fr) || (glob_op(fr) &&
-        !chan_deop(fr)))) && !(use_exempts && ban_fun &&
-        (u_match_mask(global_exempts, from) ||
-        u_match_mask(chan->exempts, from)))) {
-      if (ban_fun) {
-        check_exemptlist(chan, from);
-        u_addban(chan, quickban(chan, uhost), botnetnick, IRC_FUNKICK,
-                 now + (60 * chan->ban_time), 0);
-      }
-      if (kick_fun) {
-        /* This can induce kickflood - arthur2 */
-        dprintf(DP_SERVER, "KICK %s %s :%s\n", chan->name, nick, IRC_FUNKICK);
-        m->flags |= SENTKICK;
-      }
-    }
-    if (!ignoring) {
-      putlog(LOG_MODES, "*", "Avalanche from %s!%s in %s - ignoring",
-             nick, uhost, chan->dname);
-      p = strchr(uhost, '@');
-      if (p)
-        p++;
-      else
-        p = uhost;
-      simple_sprintf(buf2, "*!*@%s", p);
-      addignore(buf2, botnetnick, "ctcp avalanche", now + (60 * ignore_time));
-    }
-    return 0;
-  }
+
   /* Check for CTCP: */
   ctcp_reply[0] = 0;
   p = strchr(msg, 1);
@@ -2447,9 +2410,7 @@
   char *to, *realto, *nick, buf2[512], *p, *p1, buf[512], *uhost = buf;
   char *ctcp, *code;
   struct userrec *u;
-  memberlist *m;
   struct chanset_t *chan;
-  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 };
   int ignoring;
 
   if (!strchr(CHANMETA "@", *msg))
@@ -2464,30 +2425,7 @@
   strcpy(uhost, from);
   nick = splitnick(&uhost);
   u = get_user_by_host(from);
-  if (flud_ctcp_thr && detect_avalanche(msg)) {
-    get_user_flagrec(u, &fr, chan->dname);
-    m = ismember(chan, nick);
-    /* Discard -- kick user if it was to the channel */
-    if (me_op(chan) && m && !chan_sentkick(m) && !chan_friend(fr) &&
-        !glob_friend(fr) && !(channel_dontkickops(chan) && (chan_op(fr) ||
-        (glob_op(fr) && !chan_deop(fr)))) && !(use_exempts && ban_fun &&
-        (u_match_mask(global_exempts, from) ||
-        u_match_mask(chan->exempts, from)))) {
-      if (ban_fun) {
-        check_exemptlist(chan, from);
-        u_addban(chan, quickban(chan, uhost), botnetnick,
-                 IRC_FUNKICK, now + (60 * chan->ban_time), 0);
-      }
-      if (kick_fun) {
-        /* This can induce kickflood - arthur2 */
-        dprintf(DP_SERVER, "KICK %s %s :%s\n", chan->name, nick, IRC_FUNKICK);
-        m->flags |= SENTKICK;
-      }
-    }
-    if (!ignoring)
-      putlog(LOG_MODES, "*", "Avalanche from %s", from);
-    return 0;
-  }
+
   /* Check for CTCP: */
   p = strchr(msg, 1);
   while (p && *p) {
Index: eggdrop1.8/src/mod/irc.mod/help/irc.help
diff -u eggdrop1.8/src/mod/irc.mod/help/irc.help:1.1.1.1 eggdrop1.8/src/mod/irc.mod/help/irc.help:1.2
--- eggdrop1.8/src/mod/irc.mod/help/irc.help:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/src/mod/irc.mod/help/irc.help	Sun Oct 24 07:22:40 2010
@@ -219,9 +219,8 @@
       %bbounce-modes    use-354             bounce-invites%b
       %bmax-exempts     max-modes           bounce-exempts%b
       %bmax-invites     kick-method         modes-per-line%b
-      %bkick-fun        ban-fun             no-chanrec-info%b
-      %bctcp-mode       strict-host         keep-nick%b
-      %binclude-lk      prevent-mixing%b
+      %bno-chanrec-info ctcp-mode           strict-host%b
+      %bkeep-nick       include-lk          prevent-mixing%b
    (Use %b'.help set <variable>'%b for more info)
 %{help=all}%{+o|o}
 ###  %birc module%b commands
Index: eggdrop1.8/src/mod/irc.mod/irc.c
diff -u eggdrop1.8/src/mod/irc.mod/irc.c:1.2 eggdrop1.8/src/mod/irc.mod/irc.c:1.3
--- eggdrop1.8/src/mod/irc.mod/irc.c:1.2	Tue Jul 27 15:49:42 2010
+++ eggdrop1.8/src/mod/irc.mod/irc.c	Sun Oct 24 07:22:40 2010
@@ -2,7 +2,7 @@
  * irc.c -- part of irc.mod
  *   support for channels within the bot
  *
- * $Id: irc.c,v 1.2 2010/07/27 21:49:42 pseudo Exp $
+ * $Id: irc.c,v 1.3 2010/10/24 13:22:40 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -62,8 +62,6 @@
 static int kick_method = 1;     /* How many kicks does the IRC network support
                                  * at once? Use 0 for as many as possible.
                                  * (Ernst 18/3/1998) */
-static int kick_fun = 0;
-static int ban_fun = 0;
 static int keepnick = 1;        /* Keep nick */
 static int prevent_mixing = 1;  /* Prevent mixing old/new modes */
 static int rfc_compliant = 1;   /* Value depends on net-type. */
@@ -937,8 +935,6 @@
   {"mode-buf-length", &mode_buf_len,    0},
   {"use-354",         &use_354,         0},
   {"kick-method",     &kick_method,     0},
-  {"kick-fun",        &kick_fun,        0},
-  {"ban-fun",         &ban_fun,         0},
   {"invite-key",      &invite_key,      0},
   {"no-chanrec-info", &no_chanrec_info, 0},
   {"max-bans",        &max_bans,        0},
Index: eggdrop1.8/src/mod/server.mod/help/server.help
diff -u eggdrop1.8/src/mod/server.mod/help/server.help:1.2 eggdrop1.8/src/mod/server.mod/help/server.help:1.3
--- eggdrop1.8/src/mod/server.mod/help/server.help:1.2	Tue Oct 19 06:13:33 2010
+++ eggdrop1.8/src/mod/server.mod/help/server.help	Sun Oct 24 07:22:40 2010
@@ -51,13 +51,13 @@
 
    Config file variables for configuring the server module:
       %bservlimit       server-timeout      lowercase-ctcp%b
-      %bnever-give-up   keep-nick           check-stoned%b
+      %bmsg-rate        keep-nick           check-stoned%b
       %bserverror-quit  max-queue-msg       trigger-on-ignore%b
       %banswer-ctcp     server-cycle-wait   default-port%b
       %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     msg-rate%b
+      %bstack-limit     exclusive-binds%b
    (Use %b'.help set <variable>'%b for more info)
 %{help=all}%{+o|o}
 ###  %bserver module%b commands
Index: eggdrop1.8/src/mod/server.mod/help/set/server.help
diff -u eggdrop1.8/src/mod/server.mod/help/set/server.help:1.2 eggdrop1.8/src/mod/server.mod/help/set/server.help:1.3
--- eggdrop1.8/src/mod/server.mod/help/set/server.help:1.2	Tue Oct 19 06:13:33 2010
+++ eggdrop1.8/src/mod/server.mod/help/set/server.help	Sun Oct 24 07:22:40 2010
@@ -45,14 +45,6 @@
    This read-only variables returns the unix-time that the bot
    successfully connected to the server, so if you can read unix
    time, you'll be in luck ;)
-%{help=set never-give-up}%{+n}
-###  %bset never-give-up%b <0/1>
-   specifies whether the bot should loop forever.  if never-give-up
-   is set false, then the bot will shut down if it goes through the
-   entire server list once without getting a connection.  this is to
-   keep eggdrop from going through an endless loop, if, for example,
-   your machine gets disconnected from the rest of the net.  however,
-   some people prefer their bot to never shut down, no matter what.
 %{help=set keep-nick}%{+n}
 ###  %bset keep-nick%b <0/1>
    specifies whether the bot will keep trying to regain its nickname if
@@ -181,12 +173,12 @@
    This is a list of the Tcl variables the can be used to setup
    the server module, for a list of relevant commands type
    %b'.help server module'%b.
-     %bserver-online%b        %bservlimit%b      %bnick%b
-     %bnever-give-up%b        %bflood-ctcp%b     %bserver%b
+     %bquiet-reject%b        %bservlimit%b      %bnick%b
+     %bserver-online%b        %bflood-ctcp%b     %bserver%b
      %bmax-queue-msg%b        %bmsg-rate%b       %bbotnick%b
      %bserver-timeout%b       %binit-server%b    %bservers%b
      %blowercase-ctcp%b       %bnet-type%b       %bbotname%b
      %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
-     %bssl-verify-server%b    %bquiet-reject%b   %bkeep-nick%b
+     %bssl-verify-server%b    %bkeep-nick%b
Index: eggdrop1.8/src/mod/server.mod/server.c
diff -u eggdrop1.8/src/mod/server.mod/server.c:1.4 eggdrop1.8/src/mod/server.mod/server.c:1.5
--- eggdrop1.8/src/mod/server.mod/server.c:1.4	Tue Oct 19 06:13:33 2010
+++ eggdrop1.8/src/mod/server.mod/server.c	Sun Oct 24 07:22:40 2010
@@ -2,7 +2,7 @@
  * server.c -- part of server.mod
  *   basic irc server support
  *
- * $Id: server.c,v 1.4 2010/10/19 12:13:33 pseudo Exp $
+ * $Id: server.c,v 1.5 2010/10/24 13:22:40 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -66,7 +66,6 @@
 static char botrealname[121];   /* realname of bot */
 static int min_servs;           /* minimum number of servers to be around */
 static int server_timeout;      /* server timeout for connecting */
-static int never_give_up;       /* never give up when connecting to servers? */
 static struct server_list *serverlist;  /* old-style queue, still used by
                                          * server list */
 static int cycle_time;          /* cycle time till next server connect */
@@ -1401,7 +1400,6 @@
   {"server-timeout",    &server_timeout,            0},
   {"lowercase-ctcp",    &lowercase_ctcp,            0},
   {"server-online",     (int *) &server_online,     2},
-  {"never-give-up",     &never_give_up,             0},
   {"keep-nick",         &keepnick,                  0},
   {"check-stoned",      &check_stoned,              0},
   {"serverror-quit",    &serverror_quit,            0},
@@ -1929,7 +1927,7 @@
   /* 16 - 19 */
   (Function) & trigger_on_ignore, /* int                                */
   (Function) check_tcl_ctcpr,
-  (Function) detect_avalanche,
+  (Function) NULL,
   (Function) nuke_server,
   /* 20 - 23 */
   (Function) newserver,         /* char *                               */
@@ -1993,7 +1991,6 @@
   strcpy(botrealname, "A deranged product of evil coders");
   min_servs = 0;
   server_timeout = 60;
-  never_give_up = 0;
   serverlist = NULL;
   cycle_time = 0;
   default_port = 6667;
Index: eggdrop1.8/src/mod/server.mod/server.h
diff -u eggdrop1.8/src/mod/server.mod/server.h:1.2 eggdrop1.8/src/mod/server.mod/server.h:1.3
--- eggdrop1.8/src/mod/server.mod/server.h:1.2	Tue Oct 19 06:13:33 2010
+++ eggdrop1.8/src/mod/server.mod/server.h	Sun Oct 24 07:22:40 2010
@@ -1,7 +1,7 @@
 /*
  * server.h -- part of server.mod
  *
- * $Id: server.h,v 1.2 2010/10/19 12:13:33 pseudo Exp $
+ * $Id: server.h,v 1.3 2010/10/24 13:22:40 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -51,7 +51,7 @@
 /* 16 - 19 */
 #define trigger_on_ignore (*(int *)(server_funcs[16]))
 #define check_tcl_ctcpr ((int(*)(char*,char*,struct userrec*,char*,char*,char*,p_tcl_bind_list))server_funcs[17])
-#define detect_avalanche ((int(*)(char *))server_funcs[18])
+/* Was detect_avalanche */
 #define nuke_server ((void(*)(char *))server_funcs[19])
 /* 20 - 23 */
 #define newserver ((char *)(server_funcs[20]))
Index: eggdrop1.8/src/mod/server.mod/servmsg.c
diff -u eggdrop1.8/src/mod/server.mod/servmsg.c:1.3 eggdrop1.8/src/mod/server.mod/servmsg.c:1.4
--- eggdrop1.8/src/mod/server.mod/servmsg.c:1.3	Tue Oct 19 06:13:33 2010
+++ eggdrop1.8/src/mod/server.mod/servmsg.c	Sun Oct 24 07:22:40 2010
@@ -1,7 +1,7 @@
 /*
  * servmsg.c -- part of server.mod
  *
- * $Id: servmsg.c,v 1.3 2010/10/19 12:13:33 pseudo Exp $
+ * $Id: servmsg.c,v 1.4 2010/10/24 13:22:40 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -465,23 +465,6 @@
   return 0;
 }
 
-/* Check for more than 8 control characters in a line.
- * This could indicate: beep flood CTCP avalanche.
- */
-static int detect_avalanche(char *msg)
-{
-  int count = 0;
-  unsigned char *p;
-
-  for (p = (unsigned char *) msg; (*p) && (count < 8); p++)
-    if ((*p == 7) || (*p == 1))
-      count++;
-  if (count >= 8)
-    return 1;
-  else
-    return 0;
-}
-
 /* Got a private message.
  */
 static int gotmsg(char *from, char *msg)
@@ -499,22 +482,9 @@
   ignoring = match_ignore(from);
   to = newsplit(&msg);
   fixcolon(msg);
-  /* Only check if flood-ctcp is active */
   strncpyz(uhost, from, sizeof(buf));
   nick = splitnick(&uhost);
-  if (flud_ctcp_thr && detect_avalanche(msg)) {
-    if (!ignoring) {
-      putlog(LOG_MODES, "*", "Avalanche from %s - ignoring", from);
-      p = strchr(uhost, '@');
-      if (p != NULL)
-        p++;
-      else
-        p = uhost;
-      egg_snprintf(ctcpbuf, sizeof(ctcpbuf), "*!*@%s", p);
-      addignore(ctcpbuf, botnetnick, "ctcp avalanche",
-                now + (60 * ignore_time));
-    }
-  }
+ 
   /* Check for CTCP: */
   ctcp_reply[0] = 0;
   p = strchr(msg, 1);
@@ -646,12 +616,7 @@
   fixcolon(msg);
   strcpy(uhost, from);
   nick = splitnick(&uhost);
-  if (flud_ctcp_thr && detect_avalanche(msg)) {
-    /* Discard -- kick user if it was to the channel */
-    if (!ignoring)
-      putlog(LOG_MODES, "*", "Avalanche from %s", from);
-    return 0;
-  }
+
   /* Check for CTCP: */
   p = strchr(msg, 1);
   while ((p != NULL) && (*p)) {
@@ -1249,16 +1214,12 @@
 static void connect_server(void)
 {
   char pass[121], botserver[UHOSTLEN];
-  static int oldserv = -1;
   int servidx;
   unsigned int botserverport = 0;
 
   lastpingcheck = 0;
   trying_server = now;
   empty_msgq();
-  /* Start up the counter (always reset it if "never-give-up" is on) */
-  if ((oldserv < 0) || (never_give_up))
-    oldserv = curserv;
   if (newserverport) {          /* Jump to specified server */
     curserv = -1;             /* Reset server list */
     strcpy(botserver, newserver);
@@ -1267,7 +1228,6 @@
     newserver[0] = 0;
     newserverport = 0;
     newserverpass[0] = 0;
-    oldserv = -1;
   } else {
     if (curserv == -1)
       curserv = 999;
@@ -1349,7 +1309,6 @@
 
 static void server_resolve_success(int servidx)
 {
-  int oldserv = dcc[servidx].u.dns->ibuf;
   char pass[121];
 
   resolvserv = 0;
@@ -1370,8 +1329,6 @@
            strerror(errno));
 #endif
     lostdcc(servidx);
-    if (oldserv == curserv && !never_give_up)
-      fatal("NO SERVERS WILL ACCEPT MY CONNECTION.", 0);
   } else {
     dcc[servidx].sock = serv;
     /* Queue standard login */
Index: eggdrop1.8/src/patch.h
diff -u eggdrop1.8/src/patch.h:1.15 eggdrop1.8/src/patch.h:1.16
--- eggdrop1.8/src/patch.h:1.15	Sun Oct 24 06:39:36 2010
+++ eggdrop1.8/src/patch.h	Sun Oct 24 07:22:40 2010
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.15 2010/10/24 12:39:36 pseudo Exp $
+ * $Id: patch.h,v 1.16 2010/10/24 13:22:40 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1287923885");            /* current unixtime */
+patch("1287926464");            /* current unixtime */
 /*
  *
  *
  */
-patch("wireless");
+patch("nofun");
 /*
  *
  *
Index: eggdrop1.8/src/tcl.c
diff -u eggdrop1.8/src/tcl.c:1.5 eggdrop1.8/src/tcl.c:1.6
--- eggdrop1.8/src/tcl.c:1.5	Sat Oct 23 05:16:13 2010
+++ eggdrop1.8/src/tcl.c	Sun Oct 24 07:22:40 2010
@@ -4,7 +4,7 @@
  *   Tcl initialization
  *   getting and setting Tcl/eggdrop variables
  *
- * $Id: tcl.c,v 1.5 2010/10/23 11:16:13 pseudo Exp $
+ * $Id: tcl.c,v 1.6 2010/10/24 13:22:40 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -59,8 +59,8 @@
            ignore_time, reserved_port_min, reserved_port_max, max_logs,
            max_logsize, dcc_total, raw_log, identtimeout, dcc_sanitycheck,
            dupwait_timeout, egg_numver, share_unlinks, protect_telnet,
-           sort_users, strict_host, resolve_timeout, default_uflags,
-           userfile_perm, cidr_support;
+           strict_host, resolve_timeout, default_uflags, userfile_perm,
+           cidr_support;
 
 #ifdef IPV6
 extern char vhost6[];
@@ -558,7 +558,6 @@
   {"raw-log",               &raw_log,              1},
   {"protect-telnet",        &protect_telnet,       0},
   {"dcc-sanitycheck",       &dcc_sanitycheck,      0},
-  {"sort-users",            &sort_users,           0},
   {"ident-timeout",         &identtimeout,         0},
   {"share-unlinks",         &share_unlinks,        0},
   {"log-time",              &shtime,               0},
Index: eggdrop1.8/src/userrec.c
diff -u eggdrop1.8/src/userrec.c:1.1.1.1 eggdrop1.8/src/userrec.c:1.2
--- eggdrop1.8/src/userrec.c:1.1.1.1	Mon Jul 26 15:11:06 2010
+++ eggdrop1.8/src/userrec.c	Sun Oct 24 07:22:40 2010
@@ -4,7 +4,7 @@
  *   a bunch of functions to find and change user records
  *   change and check user (and channel-specific) flags
  *
- * $Id: userrec.c,v 1.1.1.1 2010/07/26 21:11:06 simple Exp $
+ * $Id: userrec.c,v 1.2 2010/10/24 13:22:40 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -39,7 +39,6 @@
 extern time_t now;
 
 int noshare = 1;                   /* don't send out to sharebots   */
-int sort_users = 0;                /* sort the userlist when saving */
 struct userrec *userlist = NULL;   /* user records are stored here  */
 struct userrec *lastuser = NULL;   /* last accessed user record     */
 maskrec *global_bans = NULL, *global_exempts = NULL, *global_invites = NULL;
@@ -561,8 +560,8 @@
   }
   if (!quiet_save)
     putlog(LOG_MISC, "*", USERF_WRITING);
-  if (sort_users)
-    sort_userlist();
+
+  sort_userlist();
   tt = now;
   strcpy(s1, ctime(&tt));
   fprintf(f, "#4v: %s -- %s -- written %s", ver, botnetnick, s1);
----------------------- End of diff -----------------------


More information about the Changes mailing list