[cvslog] (2005-08-23 02:38:54 UTC) Module eggdrop1.7: Change committed!

cvslog cvs at tsss.org
Mon Aug 22 20:38:54 CST 2005


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2005-08-23 02:38:54 UTC
Commited by: Jeff Fisher <guppy at techmonkeys.org>

Modified files:
     eggdrop.conf doc/html/mod-irc.html doc/settings/mod.irc
     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

Log message:

removed kick-fun/ban-fun

---------------------- diff included ----------------------
Index: eggdrop1.7/doc/html/mod-irc.html
diff -u eggdrop1.7/doc/html/mod-irc.html:1.2 eggdrop1.7/doc/html/mod-irc.html:1.3
--- eggdrop1.7/doc/html/mod-irc.html:1.2	Thu Jan 20 19:43:38 2005
+++ eggdrop1.7/doc/html/mod-irc.html	Mon Aug 22 21:38:44 2005
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: mod-irc.html,v 1.2 2005/01/21 01:43:38 wcc Exp $ -->
+<!-- $Id: mod-irc.html,v 1.3 2005/08/23 02:38:44 guppy 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.7/doc/settings/mod.irc
diff -u eggdrop1.7/doc/settings/mod.irc:1.2 eggdrop1.7/doc/settings/mod.irc:1.3
--- eggdrop1.7/doc/settings/mod.irc:1.2	Thu Jan 20 19:43:38 2005
+++ eggdrop1.7/doc/settings/mod.irc	Mon Aug 22 21:38:44 2005
@@ -1,4 +1,4 @@
-$Id: mod.irc,v 1.2 2005/01/21 01:43:38 wcc Exp $
+$Id: mod.irc,v 1.3 2005/08/23 02:38:44 guppy 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.7/eggdrop.conf
diff -u eggdrop1.7/eggdrop.conf:1.9 eggdrop1.7/eggdrop.conf:1.10
--- eggdrop1.7/eggdrop.conf:1.9	Sun Jul 31 14:42:49 2005
+++ eggdrop1.7/eggdrop.conf	Mon Aug 22 21:38:44 2005
@@ -1,7 +1,7 @@
 #! /path/to/executable/eggdrop
 # ^- This should contain a fully qualified path to your Eggdrop executable.
 #
-# $Id: eggdrop.conf,v 1.9 2005/07/31 19:42:49 wcc Exp $
+# $Id: eggdrop.conf,v 1.10 2005/08/23 02:38:44 guppy Exp $
 #
 # This is a sample Eggdrop configuration file which includes all possible
 # settings that can be used to configure your bot.
@@ -998,16 +998,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.7/src/mod/irc.mod/chan.c
diff -u eggdrop1.7/src/mod/irc.mod/chan.c:1.7 eggdrop1.7/src/mod/irc.mod/chan.c:1.8
--- eggdrop1.7/src/mod/irc.mod/chan.c:1.7	Sat Jul 30 22:49:35 2005
+++ eggdrop1.7/src/mod/irc.mod/chan.c	Mon Aug 22 21:38:44 2005
@@ -6,7 +6,7 @@
  *   user kickban, kick, op, deop
  *   idle kicking
  *
- * $Id: chan.c,v 1.7 2005/07/31 03:49:35 wcc Exp $
+ * $Id: chan.c,v 1.8 2005/08/23 02:38:44 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -2196,8 +2196,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. */
@@ -2214,42 +2212,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);
@@ -2354,9 +2317,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))
@@ -2371,30 +2332,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.7/src/mod/irc.mod/help/irc.help
diff -u eggdrop1.7/src/mod/irc.mod/help/irc.help:1.2 eggdrop1.7/src/mod/irc.mod/help/irc.help:1.3
--- eggdrop1.7/src/mod/irc.mod/help/irc.help:1.2	Fri Aug 27 22:24:46 2004
+++ eggdrop1.7/src/mod/irc.mod/help/irc.help	Mon Aug 22 21:38:44 2005
@@ -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-ident        keep-nick%b
-      %binclude-lk      prevent-mixing%b
+      %bno-chanrec-info ctcp-mode           strict-ident%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.7/src/mod/irc.mod/irc.c
diff -u eggdrop1.7/src/mod/irc.mod/irc.c:1.8 eggdrop1.7/src/mod/irc.mod/irc.c:1.9
--- eggdrop1.7/src/mod/irc.mod/irc.c:1.8	Sat Jul 30 22:49:35 2005
+++ eggdrop1.7/src/mod/irc.mod/irc.c	Mon Aug 22 21:38:44 2005
@@ -2,7 +2,7 @@
  * irc.c -- part of irc.mod
  *   support for channels within the bot
  *
- * $Id: irc.c,v 1.8 2005/07/31 03:49:35 wcc Exp $
+ * $Id: irc.c,v 1.9 2005/08/23 02:38:44 guppy 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. */
@@ -893,8 +891,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.7/src/mod/server.mod/server.c
diff -u eggdrop1.7/src/mod/server.mod/server.c:1.7 eggdrop1.7/src/mod/server.mod/server.c:1.8
--- eggdrop1.7/src/mod/server.mod/server.c:1.7	Sat Jul 30 22:49:35 2005
+++ eggdrop1.7/src/mod/server.mod/server.c	Mon Aug 22 21:38:44 2005
@@ -2,7 +2,7 @@
  * server.c -- part of server.mod
  *   basic irc server support
  *
- * $Id: server.c,v 1.7 2005/07/31 03:49:35 wcc Exp $
+ * $Id: server.c,v 1.8 2005/08/23 02:38:44 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1804,7 +1804,7 @@
   (Function) & trigger_on_ignore, /* int                                 */
   (Function) check_tcl_ctcpr,
   /* 16 - 19 */
-  (Function) detect_avalanche,
+  (Function) NULL,                /* was detect_avalanche                */
   (Function) nuke_server,
   (Function) newserver,           /* char *                              */
   (Function) & newserverport,     /* int                                 */
Index: eggdrop1.7/src/mod/server.mod/server.h
diff -u eggdrop1.7/src/mod/server.mod/server.h:1.4 eggdrop1.7/src/mod/server.mod/server.h:1.5
--- eggdrop1.7/src/mod/server.mod/server.h:1.4	Sat Jul 30 22:49:35 2005
+++ eggdrop1.7/src/mod/server.mod/server.h	Mon Aug 22 21:38:44 2005
@@ -1,7 +1,7 @@
 /*
  * server.h -- part of server.mod
  *
- * $Id: server.h,v 1.4 2005/07/31 03:49:35 wcc Exp $
+ * $Id: server.h,v 1.5 2005/08/23 02:38:44 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -46,7 +46,7 @@
 #define trigger_on_ignore (*(int *)(server_funcs[14]))
 #define check_tcl_ctcpr ((int(*)(char*,char*,struct userrec*,char*,char*,char*,p_tcl_bind_list))server_funcs[15])
 /* 16 - 19 */
-#define detect_avalanche ((int(*)(char *))server_funcs[16])
+/* was detect_avalanche - 16 */
 #define nuke_server ((void(*)(char *))server_funcs[17])
 #define newserver ((char *)(server_funcs[18]))
 #define newserverport (*(int *)(server_funcs[19]))
Index: eggdrop1.7/src/mod/server.mod/servmsg.c
diff -u eggdrop1.7/src/mod/server.mod/servmsg.c:1.5 eggdrop1.7/src/mod/server.mod/servmsg.c:1.6
--- eggdrop1.7/src/mod/server.mod/servmsg.c:1.5	Sun Jul 31 12:19:02 2005
+++ eggdrop1.7/src/mod/server.mod/servmsg.c	Mon Aug 22 21:38:44 2005
@@ -1,7 +1,7 @@
 /*
  * servmsg.c -- part of server.mod
  *
- * $Id: servmsg.c,v 1.5 2005/07/31 17:19:02 wcc Exp $
+ * $Id: servmsg.c,v 1.6 2005/08/23 02:38:44 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -426,23 +426,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)
@@ -460,22 +443,9 @@
   ignoring = match_ignore(from);
   to = newsplit(&msg);
   fixcolon(msg);
-  /* Only check if flood-ctcp is active */
   strcpy(uhost, from);
   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;
-      simple_sprintf(ctcpbuf, "*!*@%s", p);
-      addignore(ctcpbuf, botnetnick, "ctcp avalanche",
-                now + (60 * ignore_time));
-    }
-  }
+
   /* Check for CTCP: */
   ctcp_reply[0] = 0;
   p = strchr(msg, 1);
@@ -603,12 +573,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)) {
----------------------- End of diff -----------------------



More information about the Changes mailing list