[cvslog] (2002-08-02 23:50:50 UTC) Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Fri Aug 2 18:51:01 CST 2002


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2002-08-02 23:50:49 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

Modified files:
     eggdrop.advanced.conf eggdrop.complete.conf src/chan.h
     src/mod/channels.mod/channels.c src/mod/channels.mod/channels.h
     src/mod/channels.mod/cmdschan.c src/mod/channels.mod/tclchan.c
     src/mod/irc.mod/chan.c src/mod/irc.mod/cmdsirc.c
     src/mod/irc.mod/irc.c

Log message:

Made ban-time a channel int.

---------------------- diff included ----------------------
Index: eggdrop1.6/eggdrop.advanced.conf
diff -u eggdrop1.6/eggdrop.advanced.conf:1.52 eggdrop1.6/eggdrop.advanced.conf:1.53
--- eggdrop1.6/eggdrop.advanced.conf:1.52	Thu Jul 25 15:44:55 2002
+++ eggdrop1.6/eggdrop.advanced.conf	Fri Aug  2 18:50:37 2002
@@ -1,7 +1,7 @@
 #! /path/to/executable/eggdrop
 # ^- This should contain a fully qualified path to your Eggdrop executable.
 #
-# $Id: eggdrop.advanced.conf,v 1.52 2002/07/25 20:44:55 wcc Exp $
+# $Id: eggdrop.advanced.conf,v 1.53 2002/08/02 23:50:37 wcc Exp $
 #
 # This is a sample Eggdrop configuration file which includes many
 # settings that can be used to configure your bot.
@@ -341,26 +341,6 @@
 # Enter here the filename where dynamic channel settings are stored.
 set chanfile "LamestBot.chan"
 
-# Set here how long temporary bans will last (in minutes). If you
-# set this setting to 0, the bot will never remove them.
-set ban-time 120
-
-# Set here how long temporary exempts will last (in minutes). If you
-# set this setting to 0, the bot will never remove them. The bot will
-# check the exempts every X minutes, but will not remove the exempt if
-# a ban is set on the channel that matches that exempt. Once the ban is
-# removed, then the exempt will be removed the next time the bot checks.
-# Please note that this is an IRCnet feature.
-set exempt-time 60
-
-# Set here how long temporary invites will last (in minutes). If you
-# set this setting to 0, the bot will never remove them.
-# The bot will check the invites every X minutes, but will not remove
-# the invite if a channel is set to +i. Once the channel is -i then
-# the invite will be removed the next time the bot checks.
-# Please note that this is an IRCnet feature.
-set invite-time 60
-
 # Set this setting to 1 if you want your bot to expire bans/exempts/invites set
 # by other opped bots on the channel.
 set force-expire 0
@@ -386,6 +366,9 @@
 set global-chanmode "nt"
 set global-stopnethack-mode 0
 set global-revenge-mode 1
+set global-ban-time 120
+set global-exempt-time 60
+set global-invite-time 60
 
 set global-chanset {
         -autoop         -autovoice
@@ -412,6 +395,9 @@
   idle-kick 0
   stopnethack-mode 0
   revenge-mode 1
+  ban-time 120
+  exempt-time 60
+  invite-time 60
   aop-delay 5:30
   need-op { putserv "PRIVMSG #lamest :op me cos i'm lame!" }
   need-invite { putserv "PRIVMSG #lamest :let me in!" }
@@ -453,6 +439,26 @@
 #     1 Deop the user and give them the +d flag for the channel.
 #     2 Deop the user, give them the +d flag for the channel, and kick them.
 #     3 Deop the user, give them the +d flag for the channel, kick, and ban them.
+#
+# ban-time 120
+#   Set here how long temporary bans will last (in minutes). If you
+#   set this setting to 0, the bot will never remove them.
+#
+# exempt-time 60
+#   Set here how long temporary exempts will last (in minutes). If you
+#   set this setting to 0, the bot will never remove them. The bot will
+#   check the exempts every X minutes, but will not remove the exempt if
+#   a ban is set on the channel that matches that exempt. Once the ban is
+#   removed, then the exempt will be removed the next time the bot checks.
+#   Please note that this is an IRCnet feature.
+#
+# invite-time 60
+#   Set here how long temporary invites will last (in minutes). If you
+#   set this setting to 0, the bot will never remove them. The bot will
+#   check the invites every X minutes, but will not remove the invite if
+#   a channel is set to +i. Once the channel is -i then the invite will be
+#   removed the next time the bot checks. Please note that this is an IRCnet
+#   feature.
 #
 # aop-delay (minimum:maximum)
 # This is used for autoop, autohalfop, autovoice. If an op or voice joins a
Index: eggdrop1.6/eggdrop.complete.conf
diff -u eggdrop1.6/eggdrop.complete.conf:1.62 eggdrop1.6/eggdrop.complete.conf:1.63
--- eggdrop1.6/eggdrop.complete.conf:1.62	Thu Jul 25 15:44:55 2002
+++ eggdrop1.6/eggdrop.complete.conf	Fri Aug  2 18:50:37 2002
@@ -1,7 +1,7 @@
 #! /path/to/executable/eggdrop
 # ^- This should contain a fully qualified path to your Eggdrop executable.
 #
-# $Id: eggdrop.complete.conf,v 1.62 2002/07/25 20:44:55 wcc Exp $
+# $Id: eggdrop.complete.conf,v 1.63 2002/08/02 23:50:37 wcc Exp $
 #
 # This is a sample Eggdrop configuration file which includes all possible
 # settings that can be used to configure your bot.
@@ -416,26 +416,6 @@
 # Enter here the filename where dynamic channel settings are stored.
 set chanfile "LamestBot.chan"
 
-# Set here how long temporary bans will last (in minutes). If you
-# set this setting to 0, the bot will never remove them.
-set ban-time 120
-
-# Set here how long temporary exempts will last (in minutes). If you
-# set this setting to 0, the bot will never remove them. The bot will
-# check the exempts every X minutes, but will not remove the exempt if
-# a ban is set on the channel that matches that exempt. Once the ban is
-# removed, then the exempt will be removed the next time the bot checks.
-# Please note that this is an IRCnet feature.
-set exempt-time 60
-
-# Set here how long temporary invites will last (in minutes). If you
-# set this setting to 0, the bot will never remove them.
-# The bot will check the invites every X minutes, but will not remove
-# the invite if a channel is set to +i. Once the channel is -i then
-# the invite will be removed the next time the bot checks.
-# Please note that this is an IRCnet feature.
-set invite-time 60
-
 # Set this setting to 1 if you want your bot to expire bans/exempts/invites set
 # by other opped bots on the channel.
 set force-expire 0
@@ -461,6 +441,9 @@
 set global-chanmode "nt"
 set global-stopnethack-mode 0
 set global-revenge-mode 1
+set global-ban-time 120
+set global-exempt-time 60
+set global-invite-time 60
 
 set global-chanset {
         -autoop         -autovoice
@@ -487,6 +470,9 @@
   idle-kick 0
   stopnethack-mode 0
   revenge-mode 1
+  ban-time 120
+  exempt-time 60
+  invite-time 60
   aop-delay 5:30
   need-op { putserv "PRIVMSG #lamest :op me cos i'm lame!" }
   need-invite { putserv "PRIVMSG #lamest :let me in!" }
@@ -528,6 +514,26 @@
 #     1 Deop the user and give them the +d flag for the channel.
 #     2 Deop the user, give them the +d flag for the channel, and kick them.
 #     3 Deop the user, give them the +d flag for the channel, kick, and ban them.
+#
+# ban-time 120
+#   Set here how long temporary bans will last (in minutes). If you
+#   set this setting to 0, the bot will never remove them.
+#
+# exempt-time 60
+#   Set here how long temporary exempts will last (in minutes). If you
+#   set this setting to 0, the bot will never remove them. The bot will
+#   check the exempts every X minutes, but will not remove the exempt if
+#   a ban is set on the channel that matches that exempt. Once the ban is
+#   removed, then the exempt will be removed the next time the bot checks.
+#   Please note that this is an IRCnet feature.
+#
+# invite-time 60
+#   Set here how long temporary invites will last (in minutes). If you
+#   set this setting to 0, the bot will never remove them. The bot will
+#   check the invites every X minutes, but will not remove the invite if
+#   a channel is set to +i. Once the channel is -i then the invite will be
+#   removed the next time the bot checks. Please note that this is an IRCnet
+#   feature.
 #
 # aop-delay (minimum:maximum)
 # This is used for autoop, autohalfop, autovoice. If an op or voice joins a
Index: eggdrop1.6/src/chan.h
diff -u eggdrop1.6/src/chan.h:1.29 eggdrop1.6/src/chan.h:1.30
--- eggdrop1.6/src/chan.h:1.29	Wed Jun 19 16:13:38 2002
+++ eggdrop1.6/src/chan.h	Fri Aug  2 18:50:38 2002
@@ -3,7 +3,7 @@
  *   stuff common to chan.c and mode.c
  *   users.h needs to be loaded too
  *
- * $Id: chan.h,v 1.29 2002/06/19 21:13:38 wcc Exp $
+ * $Id: chan.h,v 1.30 2002/08/02 23:50:38 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -164,6 +164,9 @@
   int idle_kick;
   int stopnethack_mode;
   int revenge_mode;
+  int ban_time;
+  int invite_time;
+  int exempt_time;
   maskrec *bans,		/* temporary channel bans		*/
           *exempts,		/* temporary channel exempts		*/
           *invites;		/* temporary channel invites		*/
Index: eggdrop1.6/src/mod/channels.mod/channels.c
diff -u eggdrop1.6/src/mod/channels.mod/channels.c:1.67 eggdrop1.6/src/mod/channels.mod/channels.c:1.68
--- eggdrop1.6/src/mod/channels.mod/channels.c:1.67	Thu Jul 18 14:01:44 2002
+++ eggdrop1.6/src/mod/channels.mod/channels.c	Fri Aug  2 18:50:38 2002
@@ -2,7 +2,7 @@
  * channels.c -- part of channels.mod
  *   support for channels within the bot
  *
- * $Id: channels.c,v 1.67 2002/07/18 19:01:44 guppy Exp $
+ * $Id: channels.c,v 1.68 2002/08/02 23:50:38 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -32,11 +32,6 @@
 
 static int  setstatic;
 static int  use_info;
-static int  ban_time;
-static int  exempt_time;		/* If exempt_time = 0, never remove
-					   them */
-static int  invite_time;		/* If invite_time = 0, never remove
-					   them */
 static char chanfile[121];
 static int  chan_hack;
 static int  quiet_save;
@@ -47,6 +42,9 @@
 static int global_idle_kick;		/* Default idle-kick setting. */
 static int global_aop_min;
 static int global_aop_max;
+static int global_ban_time;
+static int global_exempt_time;
+static int global_invite_time;
 
 /* Global channel settings (drummer/dw) */
 static char glob_chanset[512];
@@ -686,9 +684,9 @@
     }
   }
   if (details) {
-    dprintf(idx, "    Bans last %d mins.\n", ban_time);
-    dprintf(idx, "    Exemptions last %d mins.\n", exempt_time);
-    dprintf(idx, "    Invitations last %d mins.\n", invite_time);
+    dprintf(idx, "    Bans last %d mins.\n", chan->ban_time);
+    dprintf(idx, "    Exemptions last %d mins.\n", chan->exempt_time);
+    dprintf(idx, "    Invitations last %d mins.\n", chan->invite_time);
   }
 }
 
@@ -787,13 +785,17 @@
 {
   {"share-greet",		NULL,				0},
   {"use-info",			&use_info,			0},
-  {"ban-time",			&ban_time,			0},
-  {"exempt-time",		&exempt_time,			0},
-  {"invite-time",		&invite_time,			0},
   {"quiet-save",		&quiet_save,			0},
   {"global-stopnethack-mode",	&global_stopnethack_mode,	0},
   {"global-revenge-mode",       &global_revenge_mode,           0},
   {"global-idle-kick",		&global_idle_kick,		0},
+  {"global-ban-time",		&global_ban_time,		0},
+  {"global-exempt-time",	&global_exempt_time,		0},
+  {"global-invite-time",	&global_invite_time,		0},
+  /* keeping [ban|exempt|invite]-time for compatability <Wcc[07/20/02]> */
+  {"ban-time",			&global_ban_time,		0},
+  {"exempt-time",		&global_exempt_time,		0},
+  {"invite-time",		&global_invite_time,		0},
   {NULL,			NULL,				0}
 };
 
@@ -868,7 +870,7 @@
   (Function) clear_channel,
   /* 16 - 19 */
   (Function) set_handle_laston,
-  (Function) & ban_time,
+  (Function) NULL, /* [17] used to be ban_time <Wcc[07/19/02]> */
   (Function) & use_info,
   (Function) get_handle_chaninfo,
   /* 20 - 23 */
@@ -877,9 +879,9 @@
   (Function) add_chanrec_by_handle,
   (Function) NULL, /* [23] used to be isexempted() <cybah> */
   /* 24 - 27 */
-  (Function) & exempt_time,
+  (Function) NULL, /* [24] used to be exempt_time <Wcc[07/19/02]> */
   (Function) NULL, /* [25] used to be isinvited() <cybah> */
-  (Function) & invite_time,
+  (Function) NULL, /* [26] used to be ban_time <Wcc[07/19/02]> */
   (Function) NULL,
   /* 28 - 31 */
   (Function) NULL, /* [28] used to be u_setsticky_exempt() <cybah> */
@@ -904,6 +906,10 @@
   /* 44 - 47 */
   (Function) expired_mask,
   (Function) remove_channel,
+  (Function) & global_ban_time,
+  (Function) & global_exempt_time,
+  /* 48 - 51 */
+  (Function) & global_invite_time,
 };
 
 char *channels_start(Function * global_funcs)
@@ -925,9 +931,6 @@
   global_aop_max = 30;
   setstatic = 0;
   use_info = 1;
-  ban_time = 60;
-  exempt_time = 0;
-  invite_time = 0;
   strcpy(chanfile, "chanfile");
   chan_hack = 0;
   quiet_save = 0;
@@ -935,6 +938,9 @@
   udef = NULL;
   global_stopnethack_mode = 0;
   global_revenge_mode = 1;
+  global_ban_time = 120;
+  global_exempt_time = 60;
+  global_invite_time = 60;
   strcpy(glob_chanset,
          "-enforcebans "
 	 "+dynamicbans "
Index: eggdrop1.6/src/mod/channels.mod/channels.h
diff -u eggdrop1.6/src/mod/channels.mod/channels.h:1.19 eggdrop1.6/src/mod/channels.mod/channels.h:1.20
--- eggdrop1.6/src/mod/channels.mod/channels.h:1.19	Tue Jan  1 23:04:53 2002
+++ eggdrop1.6/src/mod/channels.mod/channels.h	Fri Aug  2 18:50:38 2002
@@ -1,7 +1,7 @@
 /*
  * channels.h -- part of channels.mod
  *
- * $Id: channels.h,v 1.19 2002/01/02 05:04:53 guppy Exp $
+ * $Id: channels.h,v 1.20 2002/08/02 23:50:38 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -132,7 +132,7 @@
 #define clear_channel ((void (*)(struct chanset_t *, int))channels_funcs[15])
 /* 16 - 19 */
 #define set_handle_laston ((void (*)(char *,struct userrec *,time_t))channels_funcs[16])
-#define ban_time (*(int *)(channels_funcs[17]))
+/* *HOLE* channels_funcs[17] used to be ban_time <wcc[07/19/02]> */
 #define use_info (*(int *)(channels_funcs[18]))
 #define get_handle_chaninfo ((void (*)(char *, char *, char *))channels_funcs[19])
 /* 20 - 23 */
@@ -141,9 +141,9 @@
 #define add_chanrec_by_handle ((void (*)(struct userrec *, char *, char *))channels_funcs[22])
 /* *HOLE* channels_funcs[23] used to be isexempted() <cybah> */
 /* 24 - 27 */
-#define exempt_time (*(int *)(channels_funcs[24]))
+/* *HOLE* channels_funcs[24] used to be exempt_time <wcc[07/19/02]> */
 /* *HOLE* channels_funcs[25] used to be isinvited() by arthur2 <cybah> */
-#define invite_time (*(int *)(channels_funcs[26]))
+/* *HOLE* channels_funcs[26] used to be invite_time <wcc[07/19/02]> */
 /* *HOLE* channels_funcs[27] used to be u_match_exempt() by arthur2 <cybah> */
 /* 28 - 31 */
 /* *HOLE* channels_funcs[28] used to be u_setsticky_exempt() <cybah> */
@@ -168,6 +168,10 @@
 /* 44 - 47 */
 #define expired_mask ((int (*)(struct chanset_t *, char *))channels_funcs[44])
 #define remove_channel ((void (*)(struct chanset_t *))channels_funcs[45])
+#define global_ban_time (*(int *)(channels_funcs[46]))
+#define global_exempt_time (*(int *)(channels_funcs[47]))
+/* 48 - 51 */
+#define global_invite_time (*(int *)(channels_funcs[48]))
 
 #endif				/* MAKING_CHANNELS */
 
Index: eggdrop1.6/src/mod/channels.mod/cmdschan.c
diff -u eggdrop1.6/src/mod/channels.mod/cmdschan.c:1.56 eggdrop1.6/src/mod/channels.mod/cmdschan.c:1.57
--- eggdrop1.6/src/mod/channels.mod/cmdschan.c:1.56	Mon Jul 22 00:48:53 2002
+++ eggdrop1.6/src/mod/channels.mod/cmdschan.c	Fri Aug  2 18:50:38 2002
@@ -2,7 +2,7 @@
  * cmdschan.c -- part of channels.mod
  *   commands from a user via dcc that cause server interaction
  *
- * $Id: cmdschan.c,v 1.56 2002/07/22 05:48:53 guppy Exp $
+ * $Id: cmdschan.c,v 1.57 2002/08/02 23:50:38 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1212,6 +1212,18 @@
       dprintf(idx, "revenge-mode: %d\n", chan->revenge_mode);
     else
       dprintf(idx, "revenge-mode: 0\n");
+    if (chan->ban_time)
+      dprintf(idx, "ban-time: %d\n", chan->ban_time);
+    else
+      dprintf(idx, "ban-time: 0\n");
+    if (chan->exempt_time)
+      dprintf(idx, "exempt-time: %d\n", chan->exempt_time);
+    else
+      dprintf(idx, "exempt-time: 0\n");
+    if (chan->invite_time)
+      dprintf(idx, "invite-time: %d\n", chan->invite_time);
+    else
+      dprintf(idx, "invite-time: 0\n");
     /* Only bot owners can see/change these (they're TCL commands) */
     if (u->flags & USER_OWNER) {
       if (chan->need_op[0])
Index: eggdrop1.6/src/mod/channels.mod/tclchan.c
diff -u eggdrop1.6/src/mod/channels.mod/tclchan.c:1.61 eggdrop1.6/src/mod/channels.mod/tclchan.c:1.62
--- eggdrop1.6/src/mod/channels.mod/tclchan.c:1.61	Thu Jul 18 14:01:44 2002
+++ eggdrop1.6/src/mod/channels.mod/tclchan.c	Fri Aug  2 18:50:38 2002
@@ -1,7 +1,7 @@
 /*
  * tclchan.c -- part of channels.mod
  *
- * $Id: tclchan.c,v 1.61 2002/07/18 19:01:44 guppy Exp $
+ * $Id: tclchan.c,v 1.62 2002/08/02 23:50:38 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -510,7 +510,7 @@
   strncpyz(from, argv[3], sizeof from);
   strncpyz(cmt, argv[4], sizeof cmt);
   if (argc == 5)
-    expire_time = now + (60 * ban_time);
+    expire_time = now + (60 * chan->ban_time);
   else {
     if (atoi(argv[5]) == 0)
       expire_time = 0L;
@@ -546,7 +546,7 @@
   strncpyz(from, argv[2], sizeof from);
   strncpyz(cmt, argv[3], sizeof cmt);
   if (argc == 4)
-    expire_time = now + (60 * ban_time);
+    expire_time = now + (60 * global_ban_time);
   else {
     if (atoi(argv[4]) == 0)
       expire_time = 0L;
@@ -587,7 +587,7 @@
   strncpyz(from, argv[3], sizeof from);
   strncpyz(cmt, argv[4], sizeof cmt);
   if (argc == 5)
-    expire_time = now + (60 * exempt_time);
+    expire_time = now + (60 * chan->exempt_time);
   else {
     if (atoi(argv[5]) == 0)
       expire_time = 0L;
@@ -621,7 +621,7 @@
   strncpyz(from, argv[2], sizeof from);
   strncpyz(cmt, argv[3], sizeof cmt);
   if (argc == 4)
-    expire_time = now + (60 * exempt_time);
+    expire_time = now + (60 * global_exempt_time);
   else {
     if (atoi(argv[4]) == 0)
       expire_time = 0L;
@@ -661,7 +661,7 @@
   strncpyz(from, argv[3], sizeof from);
   strncpyz(cmt, argv[4], sizeof cmt);
   if (argc == 5)
-    expire_time = now + (60 * invite_time);
+    expire_time = now + (60 * chan->invite_time);
   else {
     if (atoi(argv[5]) == 0)
       expire_time = 0L;
@@ -695,7 +695,7 @@
   strncpyz(from, argv[2], sizeof from);
   strncpyz(cmt, argv[3], sizeof cmt);
   if (argc == 4)
-     expire_time = now + (60 * invite_time);
+     expire_time = now + (60 * global_invite_time);
   else {
     if (atoi(argv[4]) == 0)
       expire_time = 0L;
@@ -740,6 +740,12 @@
   Tcl_AppendElement(irp, s);
   simple_sprintf(s, "%d:%d", chan->aop_min, chan->aop_max);
   Tcl_AppendElement(irp, s);
+  simple_sprintf(s, "%d", chan->ban_time);
+  Tcl_AppendElement(irp, s);
+  simple_sprintf(s, "%d", chan->exempt_time);
+  Tcl_AppendElement(irp, s);
+  simple_sprintf(s, "%d", chan->invite_time);
+  Tcl_AppendElement(irp, s);
   if (chan->status & CHAN_ENFORCEBANS)
     Tcl_AppendElement(irp, "+enforcebans");
   else
@@ -884,6 +890,9 @@
   else if (CHECK("idle-kick"))     simple_sprintf(s, "%d", chan->idle_kick);
   else if (CHECK("stop-net-hack")) simple_sprintf(s, "%d", chan->stopnethack_mode);
   else if (CHECK("revenge-mode"))  simple_sprintf(s, "%d", chan->revenge_mode);
+  else if (CHECK("ban-time"))  simple_sprintf(s, "%d", chan->ban_time);
+  else if (CHECK("exempt-time"))  simple_sprintf(s, "%d", chan->exempt_time);
+  else if (CHECK("invite-time"))  simple_sprintf(s, "%d", chan->invite_time);
   else if (CHECK("flood-pub"))     simple_sprintf(s, "%d %d", chan->flood_pub_thr, chan->flood_pub_time);
   else if (CHECK("flood-ctcp"))    simple_sprintf(s, "%d %d", chan->flood_ctcp_thr, chan->flood_ctcp_time);
   else if (CHECK("flood-join"))    simple_sprintf(s, "%d %d", chan->flood_join_thr, chan->flood_join_time);
@@ -1093,6 +1102,30 @@
         return TCL_ERROR;
       }
       chan->revenge_mode = atoi(item[i]);
+    } else if (!strcmp(item[i], "ban-time")) {
+      i++;
+      if (i >= items) {
+        if (irp)
+          Tcl_AppendResult(irp, "channel ban-time needs argument", NULL);
+        return TCL_ERROR;
+      }
+      chan->ban_time = atoi(item[i]);
+    } else if (!strcmp(item[i], "exempt-time")) {
+      i++;
+      if (i >= items) {
+        if (irp)
+          Tcl_AppendResult(irp, "channel exempt-time needs argument", NULL);
+        return TCL_ERROR;
+      }
+      chan->exempt_time = atoi(item[i]);
+    } else if (!strcmp(item[i], "invite-time")) {
+      i++;
+      if (i >= items) {
+        if (irp)
+          Tcl_AppendResult(irp, "channel invite-time needs argument", NULL);
+        return TCL_ERROR;
+      }
+      chan->invite_time = atoi(item[i]);
     }
     else if (!strcmp(item[i], "+enforcebans"))
       chan->status |= CHAN_ENFORCEBANS;
@@ -1731,6 +1764,9 @@
     chan->flood_nick_time = gfld_nick_time;
     chan->stopnethack_mode = global_stopnethack_mode;
     chan->revenge_mode = global_revenge_mode;
+    chan->ban_time = global_ban_time;
+    chan->exempt_time = global_exempt_time;
+    chan->invite_time = global_invite_time;
     chan->idle_kick = global_idle_kick;
     chan->aop_min = global_aop_min;
     chan->aop_max = global_aop_max;
Index: eggdrop1.6/src/mod/irc.mod/chan.c
diff -u eggdrop1.6/src/mod/irc.mod/chan.c:1.91 eggdrop1.6/src/mod/irc.mod/chan.c:1.92
--- eggdrop1.6/src/mod/irc.mod/chan.c:1.91	Thu Jul 25 12:40:18 2002
+++ eggdrop1.6/src/mod/irc.mod/chan.c	Fri Aug  2 18:50:39 2002
@@ -6,7 +6,7 @@
  *   user kickban, kick, op, deop
  *   idle kicking
  *
- * $Id: chan.c,v 1.91 2002/07/25 17:40:18 guppy Exp $
+ * $Id: chan.c,v 1.92 2002/08/02 23:50:39 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -292,7 +292,7 @@
       else
 	putlog(LOG_MISC | LOG_JOIN, chan->dname, IRC_FLOODIGNORE4, p);
       strcpy(ftype + 4, " flood");
-      u_addban(chan, h, botnetnick, ftype, now + (60 * ban_time), 0);
+      u_addban(chan, h, botnetnick, ftype, now + (60 * chan->ban_time), 0);
       if (!channel_enforcebans(chan) && (me_op(chan) || me_halfop(chan))) {
 	  char s[UHOSTLEN];
 	  for (m = chan->channel.member; m && m->nick[0]; m = m->next) {	  
@@ -2203,7 +2203,7 @@
       if (ban_fun) {
 	check_exemptlist(chan, from);
 	u_addban(chan, quickban(chan, uhost), botnetnick,
-		IRC_FUNKICK, now + (60 * ban_time), 0);
+		IRC_FUNKICK, now + (60 * chan->ban_time), 0);
       }
       if (kick_fun) {
 	/* This can induce kickflood - arthur2 */
@@ -2360,7 +2360,7 @@
       if (ban_fun) {
 	check_exemptlist(chan, from);
 	u_addban(chan, quickban(chan, uhost), botnetnick,
-		IRC_FUNKICK, now + (60 * ban_time), 0);
+		IRC_FUNKICK, now + (60 * chan->ban_time), 0);
       }
       if (kick_fun) {
 	/* This can induce kickflood - arthur2 */
Index: eggdrop1.6/src/mod/irc.mod/cmdsirc.c
diff -u eggdrop1.6/src/mod/irc.mod/cmdsirc.c:1.37 eggdrop1.6/src/mod/irc.mod/cmdsirc.c:1.38
--- eggdrop1.6/src/mod/irc.mod/cmdsirc.c:1.37	Mon Jul 22 00:43:28 2002
+++ eggdrop1.6/src/mod/irc.mod/cmdsirc.c	Fri Aug  2 18:50:39 2002
@@ -2,7 +2,7 @@
  * chancmds.c -- part of irc.mod
  *   handles commands directly relating to channel interaction
  *
- * $Id: cmdsirc.c,v 1.37 2002/07/22 05:43:28 guppy Exp $
+ * $Id: cmdsirc.c,v 1.38 2002/08/02 23:50:39 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -265,7 +265,7 @@
     par = "requested";
   dprintf(DP_SERVER, "KICK %s %s :%s\n", chan->name, m->nick, par);
   m->flags |= SENTKICK;
-  u_addban(chan, s1, dcc[idx].nick, par, now + (60 * ban_time), 0);
+  u_addban(chan, s1, dcc[idx].nick, par, now + (60 * chan->ban_time), 0);
   dprintf(idx, "Okay, done.\n");
 }
 
Index: eggdrop1.6/src/mod/irc.mod/irc.c
diff -u eggdrop1.6/src/mod/irc.mod/irc.c:1.75 eggdrop1.6/src/mod/irc.mod/irc.c:1.76
--- eggdrop1.6/src/mod/irc.mod/irc.c:1.75	Thu Jul 25 21:18:28 2002
+++ eggdrop1.6/src/mod/irc.mod/irc.c	Fri Aug  2 18:50:39 2002
@@ -2,7 +2,7 @@
  * irc.c -- part of irc.mod
  *   support for channels within the bot
  *
- * $Id: irc.c,v 1.75 2002/07/26 02:18:28 wcc Exp $
+ * $Id: irc.c,v 1.76 2002/08/02 23:50:39 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -224,7 +224,7 @@
     splitnick(&whobad);
     maskhost(whobad, s1);
     simple_sprintf(s, "(%s) %s", ct, reason);
-    u_addban(chan, s1, botnetnick, s, now + (60 * ban_time), 0);
+    u_addban(chan, s1, botnetnick, s, now + (60 * chan->ban_time), 0);
     if (!mevictim && (me_op(chan) || me_halfop(chan))) {
       add_mode(chan, '+', 'b', s1);
       flush_mode(chan, QUICK);
@@ -608,9 +608,9 @@
   for (chan = chanset; chan; chan = chan->next) {
     if (channel_active(chan)) {
       if (me_op(chan) || me_halfop(chan)) {
-	if (channel_dynamicbans(chan) && ban_time)
+	if (channel_dynamicbans(chan) && chan->ban_time)
 	  for (b = chan->channel.ban; b->mask[0]; b = b->next)
-	    if (now - b->timer > 60 * ban_time &&
+	    if (now - b->timer > 60 * chan->ban_time &&
 		!u_sticky_mask(chan->bans, b->mask) &&
 		!u_sticky_mask(global_bans, b->mask) &&
 		expired_mask(chan, b->who)) {
@@ -621,9 +621,9 @@
 	      b->timer = now;
 	    }
 
-	if (use_exempts && channel_dynamicexempts(chan) && exempt_time)
+	if (use_exempts && channel_dynamicexempts(chan) && chan->exempt_time)
 	  for (e = chan->channel.exempt; e->mask[0]; e = e->next)
-	    if (now - e->timer > 60 * exempt_time &&
+	    if (now - e->timer > 60 * chan->exempt_time &&
 		!u_sticky_mask(chan->exempts, e->mask) &&
 		!u_sticky_mask(global_exempts, e->mask) &&
 		expired_mask(chan, e->who)) {
@@ -653,9 +653,9 @@
 	    }
 
 	if (use_invites && channel_dynamicinvites(chan) &&
-	    invite_time && !(chan->channel.mode & CHANINV))
+	    chan->invite_time && !(chan->channel.mode & CHANINV))
 	  for (b = chan->channel.invite; b->mask[0]; b = b->next)
-	    if (now - b->timer > 60 * invite_time &&
+	    if (now - b->timer > 60 * chan->invite_time &&
 		!u_sticky_mask(chan->invites, b->mask) &&
 		!u_sticky_mask(global_invites, b->mask) &&
 		expired_mask(chan, b->who)) {
----------------------- End of diff -----------------------



More information about the Changes mailing list