[cvslog] Module eggdrop1.7: Change committed

cvslog cvs at tsss.org
Sun Dec 9 20:52:00 CST 2001


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2001-12-10 02:51:05 UTC
Commited by: Jeff Fisher <guppy at techmonkeys.org>

Modified files:
     eggdrop.complete.conf doc/html/mod-irc.html doc/settings/mod.irc
     modules/irc/chan.c modules/irc/irc.c modules/server/server.c
     modules/server/server.h modules/server/servmsg.c

Log message:

kick-fun and ban-fun have been removed as settings

---------------------- diff included ----------------------
Index: eggdrop1.7/doc/html/mod-irc.html
diff -u eggdrop1.7/doc/html/mod-irc.html:1.6 eggdrop1.7/doc/html/mod-irc.html:1.7
--- eggdrop1.7/doc/html/mod-irc.html:1.6	Wed Oct 10 08:15:59 2001
+++ eggdrop1.7/doc/html/mod-irc.html	Sun Dec  9 20:50:54 2001
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: mod-irc.html,v 1.6 2001/10/10 13:15:59 tothwolf Exp $ -->
+<!-- $Id: mod-irc.html,v 1.7 2001/12/10 02:50:54 guppy Exp $ -->
 
 <html>
   <head>
@@ -78,27 +78,6 @@
           <p>Set here the maximum number of bans you want eggdrop to put in a
           channel. Eggdrop wont place any more bans if this limit is
           reached.</p>
-        </dd>
-
-        <dt><strong><em>set kick-fun 0</em></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,
-          as it won&#39;t ban them, it can be at the origin of a nice
-          kick-flood.</p>
-
-          <p>Valid settings are 0 and 1.</p>
-        </dd>
-
-        <dt><strong><em>set ban-fun 0</em></strong></dt>
-
-        <dd>
-          <p>Set this to 1 if you want the bot to ban for control
-          character/ctcp avalanches to a channel. Can prevent the above
-          described kick-flood, but can also fill the banlist.</p>
-
-          <p>Valid settings are 0 and 1.</p>
         </dd>
 
         <dt><strong><em>set learn-users 0</em></strong></dt>
Index: eggdrop1.7/doc/settings/mod.irc
diff -u eggdrop1.7/doc/settings/mod.irc:1.4 eggdrop1.7/doc/settings/mod.irc:1.5
--- eggdrop1.7/doc/settings/mod.irc:1.4	Mon Nov 20 23:18:04 2000
+++ eggdrop1.7/doc/settings/mod.irc	Sun Dec  9 20:50:55 2001
@@ -31,20 +31,6 @@
     is reached.
 
 
-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, as it won't ban
-    them, it can be at the origin of a nice kick-flood.
-    Valid settings are 0 for OFF and 1 ON.
-
-
-set ban-fun 0
-    Set this to 1 if you want the bot to ban for control character/ctcp
-    avalanches to a channel. Can prevent the above described kick-flood,
-    but can also fill the banlist.
-    Valid settings are 0 for OFF and 1 ON.
-
-
 set learn-users 0
     If you want people to introduce themself to eggdrop via 'hello',
     set this to 1.
Index: eggdrop1.7/eggdrop.complete.conf
diff -u eggdrop1.7/eggdrop.complete.conf:1.58 eggdrop1.7/eggdrop.complete.conf:1.59
--- eggdrop1.7/eggdrop.complete.conf:1.58	Sun Dec  9 20:38:56 2001
+++ eggdrop1.7/eggdrop.complete.conf	Sun Dec  9 20:50:54 2001
@@ -1,7 +1,7 @@
 #! /path/to/executable/eggdrop
 # ^- set that to the directory eggdrop is in i.e. "#! /home/lamest/egg/eggdrop"
 #
-# $Id: eggdrop.complete.conf,v 1.58 2001/12/10 02:38:56 guppy Exp $
+# $Id: eggdrop.complete.conf,v 1.59 2001/12/10 02:50:54 guppy Exp $
 #
 # This config file includes all possible options you can
 # use to configure your bot properly.
@@ -793,17 +793,6 @@
 # There is a global limit for +b/+e/+I modes. This limit is set to 30 on
 # 2.10 irc servers.
 set max-modes 30
-
-# [0/1] Do you want the bot to kick for control character/ctcp avalanches
-# to a channel?
-# Remember that if it does, as it won't ban them, it can be at the origin
-# of a nice kick-flood
-set kick-fun 0
-
-# [0/1] Do you want the bot to ban for control character/ctcp avalanches
-# to a channel?
-# Can prevent the above described kick-flood, but can also fill the banlist
-set ban-fun 0
 
 # [0/1] let users introduce themselves to the bot via 'hello'?
 set learn-users 0
Index: eggdrop1.7/modules/irc/chan.c
diff -u eggdrop1.7/modules/irc/chan.c:1.4 eggdrop1.7/modules/irc/chan.c:1.5
--- eggdrop1.7/modules/irc/chan.c:1.4	Sat Dec  8 13:17:43 2001
+++ eggdrop1.7/modules/irc/chan.c	Sun Dec  9 20:50:55 2001
@@ -6,7 +6,7 @@
  *   user kickban, kick, op, deop
  *   idle kicking
  *
- * $Id: chan.c,v 1.4 2001/12/08 19:17:43 ite Exp $
+ * $Id: chan.c,v 1.5 2001/12/10 02:50:55 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1996,8 +1996,6 @@
   struct chanset_t *chan;
   int ignoring;
   struct userrec *u;
-  memberlist *m;
-  struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0};
 
   if (!strchr("&#!+@$", msg[0]))
     return 0;
@@ -2011,46 +2009,7 @@
   strncpyz(buf, from, sizeof buf);
   nick = strtok(buf, "!");
   uhost = strtok(NULL, "!");
-  /* 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 (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)))) &&	/* arthur2 */
-	!(use_exempts && ban_fun &&
-	  /* don't kickban if permanent exempted -- Eule */
-	  (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), origbotname,
-		_("that was fun, lets do it again!"), now + (60 * ban_time), 0);
-      }
-      if (kick_fun) {
-	/* This can induce kickflood - arthur2 */
-	dprintf(DP_SERVER, "KICK %s %s :%s\n", chan->name, nick,
-		_("that was fun, lets do it again!"));
-	m->flags |= SENTKICK;
-      }
-    }
-    if (!ignoring) {
-      putlog(LOG_MODES, "*", "Avalanche from %s!%s in %s - ignoring",
-	     nick, uhost, chan->dname);
-      /* FIXME: get rid of this mess */
-      p = strchr(uhost, '@');
-      if (p)
-	p++;
-      else
-	p = uhost;
-      simple_sprintf(buf2, "*!*@%s", p);
-      addignore(buf2, origbotname, "ctcp avalanche", now + (60 * ignore_time));
-    }
-    return 0;
-  }
+
   /* Check for CTCP: */
   ctcp_reply[0] = 0;
   p = strchr(msg, 1);
@@ -2133,9 +2092,7 @@
   char buf[UHOSTLEN], *nick, *uhost, *to, *realto, buf2[512], *p, *p1;
   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))
@@ -2151,34 +2108,7 @@
   nick = strtok(buf, "!");
   uhost = strtok(NULL, "!");
   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)))) &&	/* arthur2 */
-	!(use_exempts && ban_fun &&
-	  /* don't kickban if permanent exempted -- Eule */
-	  (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), origbotname,
-		_("that was fun, lets do it again!"), now + (60 * ban_time), 0);
-      }
-      if (kick_fun) {
-	/* This can induce kickflood - arthur2 */
-	dprintf(DP_SERVER, "KICK %s %s :%s\n", chan->name, nick,
-		_("that was fun, lets do it again!"));
-	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/modules/irc/irc.c
diff -u eggdrop1.7/modules/irc/irc.c:1.4 eggdrop1.7/modules/irc/irc.c:1.5
--- eggdrop1.7/modules/irc/irc.c:1.4	Sun Dec  9 20:38:57 2001
+++ eggdrop1.7/modules/irc/irc.c	Sun Dec  9 20:50:55 2001
@@ -2,7 +2,7 @@
  * irc.c -- part of irc.mod
  *   support for channels within the bot
  *
- * $Id: irc.c,v 1.4 2001/12/10 02:38:57 guppy Exp $
+ * $Id: irc.c,v 1.5 2001/12/10 02:50:55 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -67,8 +67,6 @@
 					   support at once?
 					   0 = 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;		/* To prevent mixing old/new modes */
 static int rfc_compliant = 1;		/* net-type changing modifies this */
@@ -771,8 +769,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/modules/server/server.c
diff -u eggdrop1.7/modules/server/server.c:1.3 eggdrop1.7/modules/server/server.c:1.4
--- eggdrop1.7/modules/server/server.c:1.3	Sun Dec  9 15:49:41 2001
+++ eggdrop1.7/modules/server/server.c	Sun Dec  9 20:50:55 2001
@@ -2,7 +2,7 @@
  * server.c -- part of server.mod
  *   basic irc server support
  *
- * $Id: server.c,v 1.3 2001/12/09 21:49:41 guppy Exp $
+ * $Id: server.c,v 1.4 2001/12/10 02:50:55 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1696,7 +1696,7 @@
   /* 16 - 19 */
   (Function) & trigger_on_ignore, /* int				*/
   (Function) check_tcl_ctcpr,
-  (Function) detect_avalanche,
+  (Function) 0,
   (Function) nuke_server,
   /* 20 - 23 */
   (Function) newserver,		/* char *				*/
Index: eggdrop1.7/modules/server/server.h
diff -u eggdrop1.7/modules/server/server.h:1.1 eggdrop1.7/modules/server/server.h:1.2
--- eggdrop1.7/modules/server/server.h:1.1	Sat Oct 27 11:34:52 2001
+++ eggdrop1.7/modules/server/server.h	Sun Dec  9 20:50:55 2001
@@ -1,7 +1,7 @@
 /*
  * server.h -- part of server.mod
  *
- * $Id: server.h,v 1.1 2001/10/27 16:34:52 ite Exp $
+ * $Id: server.h,v 1.2 2001/12/10 02:50:55 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -46,7 +46,7 @@
 /* 16 - 19 */
 #define trigger_on_ignore (*(int *)(server_funcs[16]))
 #define check_tcl_ctcpr ((int(*)(char*,char*,struct userrec*,char*,char*,char*,bind_table_t *))server_funcs[17])
-#define detect_avalanche ((int(*)(char *))server_funcs[18])
+/* #define detect_avalanche ((int(*)(char *))server_funcs[18]) -- removed useless feature */
 #define nuke_server ((void(*)(char *))server_funcs[19])
 /* 20 - 22 */
 #define newserver ((char *)(server_funcs[20]))
Index: eggdrop1.7/modules/server/servmsg.c
diff -u eggdrop1.7/modules/server/servmsg.c:1.3 eggdrop1.7/modules/server/servmsg.c:1.4
--- eggdrop1.7/modules/server/servmsg.c:1.3	Sun Dec  9 15:49:41 2001
+++ eggdrop1.7/modules/server/servmsg.c	Sun Dec  9 20:50:55 2001
@@ -1,7 +1,7 @@
 /*
  * servmsg.c -- part of server.mod
  *
- * $Id: servmsg.c,v 1.3 2001/12/09 21:49:41 guppy Exp $
+ * $Id: servmsg.c,v 1.4 2001/12/10 02:50:55 guppy Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -346,23 +346,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 *ignore, char *msg)
@@ -382,21 +365,7 @@
   strncpyz(buf, from, sizeof buf);
   nick = strtok(buf, "!");
   uhost = strtok(NULL, "!");
-  /* Only check if flood-ctcp is active */
-  if (flud_ctcp_thr && detect_avalanche(msg)) {
-    if (!ignoring) {
-      putlog(LOG_MODES, "*", "Avalanche from %s - ignoring", from);
-      /* FIXME: get rid of this mess */
-      p = strchr(uhost, '@');
-      if (p != NULL)
-	p++;
-      else
-	p = uhost;
-      simple_sprintf(ctcpbuf, "*!*@%s", p);
-      addignore(ctcpbuf, origbotname, "ctcp avalanche",
-		now + (60 * ignore_time));
-    }
-  }
+
   /* Check for CTCP: */
   ctcp_reply[0] = 0;
   p = strchr(msg, 1);
@@ -521,12 +490,7 @@
   strncpyz(buf, from, sizeof buf);
   nick = strtok(buf, "!");
   uhost = strtok(NULL, "!");
-  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