[cvslog] (2002-10-10 05:50:22 UTC) Module eggdrop1.7: Change committed

cvslog cvs at tsss.org
Thu Oct 10 00:51:01 CST 2002


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2002-10-10 05:50:22 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

Modified files:
     configure.ac eggdrop.complete.conf doc/UPDATES1.6
     lib/compat/snprintf.c modules/channels/channels.c
     modules/channels/channels.h modules/channels/cmdschan.c
     modules/channels/tclchan.c modules/filesys/filesys.c
     modules/irc/chan.c modules/irc/cmdsirc.c modules/irc/irc.c
     modules/irc/mode.c modules/irc/msgcmds.c modules/share/share.c
     modules/transfer/transfer.c scripts/alltools.tcl src/chan.h
     src/chanprog.c src/misc.c

Log message:

* Synch'd 1.6 with 1.7 as of September 1st.
  * Did not synch +C or +r chanmode additions or halfop code, as our mode
    handling really needs to be redone in 1.7.
  * Did not synch any of the handlen-friendly patches.
  * Did not synch Tcl 8.4 fixes (not a proper fix yet).
  * My banligic patch doesn't seem relevent currently.
  * Did not synch sockfix, as network code has changed drasticly.

Synch will be continued tomorrow.

---------------------- diff included ----------------------
Index: eggdrop1.7/configure.ac
diff -u eggdrop1.7/configure.ac:1.25 eggdrop1.7/configure.ac:1.26
--- eggdrop1.7/configure.ac:1.25	Fri Sep 20 15:18:22 2002
+++ eggdrop1.7/configure.ac	Thu Oct 10 00:50:11 2002
@@ -120,7 +120,7 @@
 	tcl7.3 tcl73 tcl7.2 tcl72 tcl7.1 tcl71 tcl7.0 tcl70"
 
 # Tcl library filename suffixes
-tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a .sl .dll"
+tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a .sl .dll .dynlib"
 
 # Tcl library search paths
 tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \
Index: eggdrop1.7/doc/UPDATES1.6
diff -u eggdrop1.7/doc/UPDATES1.6:1.200 eggdrop1.7/doc/UPDATES1.6:1.201
--- eggdrop1.7/doc/UPDATES1.6:1.200	Wed Mar 20 07:11:44 2002
+++ eggdrop1.7/doc/UPDATES1.6	Thu Oct 10 00:50:11 2002
@@ -1,10 +1,88 @@
-$Id: UPDATES1.6,v 1.200 2002/03/20 13:11:44 wcc Exp $
+$Id: UPDATES1.6,v 1.201 2002/10/10 05:50:11 wcc Exp $
 
 Changes in Eggdrop: (since v1.6.0)
 ----------------------------------
 
-1.6.10
+1.6.13
 Found by  Fixed by  What...
+blaster^  don't log "joined #chan but didn't want to" in certain cases where
+                    the channel was newly removed or set inactive
+          Wcc       cosmetic changes to share_stick_[exempt/invite/ban]
+J Lehto   TaKeDa    msg_key and msg_invite did not work properly for !channels
+          BarkerJr  show the number of hops in .trace's output
+          Mo-Ize    use the proper dynamic lib extention on Mac OSX
+          Wiktor    return 5 from dccsend if the file exists in the temp directory and
+                    copy-to-tmp is enabled
+          poptix    fixed a possible exploit in reaffirm_owners()
+KuNgFo0   Wcc/      friends/ops/bots are now correctly unbanned when a ban is set on a
+          [sL]      channel that matches their host
+          BHAB      compile fix for systems that do not support snprintf()
+various   Wcc/      fixed a bug where if the bot is kicked while channel information is
+          [sL]      still being received, the bot will think it's still on the channel and
+                    not rejoin
+ble       Wcc       removed names parsing, as it causes many problems and was only
+                    added for compatability with an old version of unrealircd
+[sL]      Wcc       more broken dprintf's in irc commands
+ble       Wcc       fixed a broken dprintf in cmd_kick()
+          Wcc       made [ban/invite/exempt]-time a channel int
+          BarkerJr  documentation updates related to the PUBM bind
+
+1.6.12 (26 July 2002)
+Found by  Fixed by  What...
+Segfault            reverted the sockfix patches from 1.6.11
+
+1.6.11 (26 July 2002)
+Found by  Fixed by  What...
+various   Wcc       need-[limit/invite/unban/key] work now
+          [sL]      fixed a problem with 'connect' and 'control' where the script would abort
+                    prematurely
+          Wcc       improved the logic in cmd_mnsban when specifying what happen to remove and
+                    where to remove it from
+          Eule      fixed cmd_kickban so it works
+          Wcc/      fixed a bug causing "[HH:MM] !!! OVER MAXIMUM <queue> QUEUE" to be
+          [sL]      logged to LOG_SVROUT
+          Wcc       log PINGs/PONGs sent to the server in LOG_SVROUT
+          guppy     some small changes to make eggdrop work with tcl8.4b1 (it won't work with
+                    tcl8.4a1 or a2 anymore though)
+dork      TaKeDa    fixed a crash while doing .kickban -nick
+          Zart      the return values of uname() are now properly checked
+          Zart      added handlen friendly code to various commands (this is a new patch to
+                    replace the handlen friendly patch reverted in 1.6.10
+          BarkerJr  don't show +inactive channels in a remote .who
+          guppy     changed the .status output a bit (includes the name of the config file
+                    now)
+guppy     Wcc       msg_whois should require an argument.
+          Wcc       added support for halfops (channel mode +h)
+MaSsKilla Wcc       don't allow channels containing commas to be added.. 
+                    also made an error message more clear
+          BarkerJr  updates to doc/MODULES
+          Wcc       more doc updates
+          TaKeDa    fix for !channels when people quit or change nicks
+          aXs/      made all the commands use CHANMETA instead of hardcoding channel types
+          Eule
+various   stdarg/   added 'channel get <chan> <setting>' (backported from 1.7)
+          Mo-Ize
+          guppy     uptime.mod will not unload now once loaded (this prevents you from
+                    losing your stats on a .restart .. to remove, you have to .die)
+          guppy     uptime.mod now sends the proper pid and also won't send garbage if
+                    the bot currently isn't on a server
+          Wcc       updated slennox's sentinel.tcl to the latest version
+guppy     Wcc       added support for +r on Undernet's ircu 2.10.11
+          upstream  fixed a crash in seen.mod with long channel names
+          slug      added support for the +C channel mode (noctcp) on QuakeNet's ircu
+
+1.6.10 (29 March 2002)
+Found by  Fixed by  What...
+(^Baron^) Eule      protect(ops|friends) works with +bitch now
+          guppy     reverted the handlen friendly patches
+MaSsKilla dw	    fixed a crash when trying to add an invalid chan using .+chan
+various   guppy     nick2hand didn't return "" on a nick that wasn't in the channel
+slennox   Wcc       fixed a few config file problems
+Paladin   Wcc       chattr's description in tcl-commands.doc was unclear relating to
+                    channel-specific flag changes
+          NetIrc    transfer.french.lang was created
+          Noyga     cmd_who is now languagified! (nice word eh?)
+          Noyga     made it easier to change the number of global partyline channels
 MC_8      Wcc       more tcl-commands.doc fixes
 MC_8      Wcc       added some missing command options to tcl-commands.doc
           Uwe       cd_cmd_table was missing a null entry at the end of the list
@@ -27,23 +105,32 @@
           Amir      botlink() now safely copies the linker string
 various   Eule      fixed crashes relating to flushmodes
 Wanderer| dw	    tcl command modules missing in doc/tcl-commands.doc
-          guppy     users with only +x can now only login via dcc chat, they cannot use
+          guppy     users with only +x can now only login via dcc chat, they cannot use 
                     telnet
           Wcc       more documentation updates
           Eule/     changed how protectops and protectfriends works a bit:
           guppy       if the user has either glob +d or chan +d then no protection
                       protectfriends now only protects +f users
                       protectops now only protects +m and +o users
+various   guppy     doc/compiling.FAQ now includes info about setting LD_LIBRARY_PATH
 Boing     guppy     fixed +protectops from reopping users with only +f and +protectfriends
                     from reopping users with only +o
+          Wcc       made a few cosmetic changes to the configure script
+          Wcc       more plural fixes for commands and error messages
 Xerxes    guppy     "channel remove" will not crash the bot anymore if you are removing
                     the channel for which the bind was called
 MC_8      stdarg    "channel info" will properly list all user-defined settings
+various   guppy     fixed a problem with modconfig not being found when rerunning
+                    ./configure
+          ITE       made modconfig more portable across various bourne shell flavours
           Eule      removed gban_total, gexempt_total and ginvite_total since they were
                     unused
+          TaKeDa/   configure should recognize a dynamic tcl library now on cygwin
+          ITE
 dw        guppy     fixed a crash that would happen when we disconnected from our server
                     but did not reconnect to a server before we checked if a server was
                     stoned
+          BHAB      lets compile on solaris now
 BarkerJr  TaKeDa    update a bot's laston info when the bot unlinks
           Wcc       more cosmetic fixes to src/cmds.c
           Eule      small cosmetic fix to cmd_store
@@ -57,6 +144,8 @@
 Paladinz  guppy     ircu2.10.11 properly formats PART messages; however, eggdrop did not
                     understand them
           Wcc       fixed a couple of cosmetic problems in cmd_pls_user
+          Wcc       do not eval init-server on rehash since this variable is used for
+                    performing tcl commands on a succesful server connection
 MaSsKilla dw	    Couldn't introduce new users through telnet if a
 		      handle named "new" existed.
 SiD3WiNDR Wcc       MISC_USERFCREATE1 should use origbotname instead of botnetnick
@@ -97,9 +186,9 @@
                     compat) to follow the standard that handlen uses
           Wcc       updated doc/BOTNET and added doc/first_script.txt
           Wcc       removed some old debugging information
-various   zip       prevent the bot from loosing channel flags when allow-resync is set
+various   zip       prevent the bot from losing channel flags when allow-resync is set
           Wcc       some small cosmetic changes
-          Wcc       added $hand-len for scripters to get the current length of handles from
+          Wcc       added handlen for scripters to get the current length of handles from
                     src/eggdrop.h (this setting does not adjust handle lengths however)
           BarkerJr  cmd_whom now displays a sum of all the partyline users
           Tothwolf  copyright updates
@@ -120,6 +209,8 @@
                     now
 Abraham   guppy     tcl_onchan can now be used without a channel to check all the bot's 
                     channels
+various   stdarg/   added tcl_traffic (a modified copy of stdarg's original patch)
+          guppy/
 Tothwolf  guppy     .servers doesn't trunicate server names anymore
 Wcc       guppy     made cmd_modules work locally as well as remotely
           guppy     made show_banner reset the help_subst arguments like show_motd does
@@ -129,18 +220,21 @@
 various   guppy     tcl_pushmode now accepts any irc modes instead of the standard ones
           guppy     made tcl_chanlist (when matching chanflags), tcl_handonchan, and
                     tcl_nick2hand much faster
-various   guppy     tcl_pushmode now accepts any irc modes instead of the standard ones
-          guppy     made tcl_chanlist (when matching chanflags), tcl_handonchan, and
-                    tcl_nick2hand much faster
           Eule      a bunch of small fixes to gotjoin, gotkick, got367, a
                     modes-per-line calcuation, and to include_lk
+          Wcc       yet more documentation updates
+ziffie    BHAB      Documentation doesn't cover how to connect to servers with 
+                    a password; documentation added to sample config files.
 |^Raven^| guppy     made tcl_hand2nick _a lot_ faster
           Eule      more membercheck fixes for nick bans, nick +k users, -user, and
                     -host.
           BarkerJr  only show fake alerts once every 10 seconds to prevent flooding
+DFrank    guppy     small make install bug related to doc cleanups
+          Wcc       major cleanup of config files and related documents
           BarkerJr  updated doc/MODULES a bit
 RandomAPB Wcc       show the user port as users instead of telnet and the bot port
                     as a bot port instead of a relay port
+various   stdarg    small fix to the notes module
           BarkerJr  updated the uptime url
 
 1.6.7 (7 December 2001)
Index: eggdrop1.7/eggdrop.complete.conf
diff -u eggdrop1.7/eggdrop.complete.conf:1.74 eggdrop1.7/eggdrop.complete.conf:1.75
--- eggdrop1.7/eggdrop.complete.conf:1.74	Tue Jun 18 01:12:30 2002
+++ eggdrop1.7/eggdrop.complete.conf	Thu Oct 10 00:50:11 2002
@@ -2,7 +2,7 @@
 # ^- set that to the directory eggdrop is in i.e. "#! /home/lamest/egg/eggdrop"
 #  Make sure you preload a config parser using the -p<name> parameter.
 #
-# $Id: eggdrop.complete.conf,v 1.74 2002/06/18 06:12:30 guppy Exp $
+# $Id: eggdrop.complete.conf,v 1.75 2002/10/10 05:50:11 wcc Exp $
 #
 # This config file includes all possible options you can
 # use to configure your bot properly.
@@ -82,7 +82,7 @@
 set max_logs 5
 
 # maximum size of your logfiles, set this to 0 to disable.
-# this only works if you have keep-all-logs 0 (OFF)
+# this only works if you have keep_all_logs 0 (OFF)
 # this value is in KiloBytes, so '550' would mean cycle logs when
 # it reaches the size of 550 KiloBytes.
 set max_logsize 0
@@ -147,7 +147,7 @@
 set userfile "LamestBot.user"
 
 # the pidfile: where eggdrop saves its pid file to
-# set pidfile "pid.${botnet-nick}"
+# set pidfile "pid.$botnet_nick"
 
 # where the help files can be found (and there are plenty)
 set help_path "help/"
@@ -345,7 +345,7 @@
 # make sure that you have double-checked the settings you want.
 # There's also a similar line lower down, just to make sure you're reading :)
 
-die "Please edit your config file."
+die "Please make sure you edit your config file completely."
 
 
 
@@ -372,24 +372,6 @@
 # the chanfile: where dynamic channel settings are stored
 set chanfile "LamestBot.chan"
 
-# temporary bans will last how many minutes? if set to 0, bot never removes
-# them.
-set ban_time 120
-
-# temporary exemptions (+e modes) will last how many minutes? if set to 0,
-# bot never removes them. This is an IRCNET feature. 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.
-set exempt_time 60
-
-# temporary invitations (+I modes) will last how many minutes? if set to
-# 0, bot never removes them. This is an IRCNET feature. The bot will check the
-# invites every X minutes, but will not remove them if the channel is +i. Once
-# the channel is -i then the bot will remove then invite mode next time it
-# checks this counter
-set invite_time 60
-
 # [0/1] expire bans/exempts/invites set by other opped bots on the channel?
 # set force_expire 0
 
@@ -410,12 +392,15 @@
 set global_flood_ctcp 3:60
 set global_flood_nick 5:60
 
-set global_aop-delay 5:30
+set global_aop_delay 5:30
 
-set global_idle-kick 0
+set global_idle_kick 0
 set global_chanmode "nt"
-set global_stopnethack-mode 0
-set global_revenge-mode 1
+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
@@ -440,6 +425,9 @@
 channel add #lamest {
   chanmode "+nt-likm"
   idle-kick 0
+  ban-time 120
+  exempt-time 60
+  invite-time 60
   stopnethack-mode 0
   revenge-mode 1
   aop-delay 5:30
@@ -642,7 +630,7 @@
 
 ##### variables:
 # the nick of the bot, that which it uses on IRC, and on the botnet
-# unless you specify a separate botnet-nick
+# unless you specify a separate botnet_nick
 set nick "Lamestbot"
 
 # an alternative nick to use if the nick specified by 'set nick' is
@@ -951,7 +939,7 @@
 set notify_onjoin 1
 
 # comment out this next line, otherwise your bot won't start
-die "You didn't edit your config file like you were told, did you?"
+die "You didn't edit your config file completely like you were told, did you?"
 
 
 ##### CONSOLE MODULE #####
Index: eggdrop1.7/lib/compat/snprintf.c
diff -u eggdrop1.7/lib/compat/snprintf.c:1.2 eggdrop1.7/lib/compat/snprintf.c:1.3
--- eggdrop1.7/lib/compat/snprintf.c:1.2	Sun May  5 11:40:32 2002
+++ eggdrop1.7/lib/compat/snprintf.c	Thu Oct 10 00:50:11 2002
@@ -61,7 +61,7 @@
  **************************************************************/
 
 #ifndef lint
-static const char rcsid[] = "$Id: snprintf.c,v 1.2 2002/05/05 16:40:32 tothwolf Exp $";
+static const char rcsid[] = "$Id: snprintf.c,v 1.3 2002/10/10 05:50:11 wcc Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -79,7 +79,6 @@
 #include <ctype.h>
 #endif
 #include <sys/types.h>
-#include <stdarg.h>
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
Index: eggdrop1.7/modules/channels/channels.c
diff -u eggdrop1.7/modules/channels/channels.c:1.15 eggdrop1.7/modules/channels/channels.c:1.16
--- eggdrop1.7/modules/channels/channels.c:1.15	Fri May 17 02:29:23 2002
+++ eggdrop1.7/modules/channels/channels.c	Thu Oct 10 00:50:11 2002
@@ -23,7 +23,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: channels.c,v 1.15 2002/05/17 07:29:23 stdarg Exp $";
+static const char rcsid[] = "$Id: channels.c,v 1.16 2002/10/10 05:50:11 wcc Exp $";
 #endif
 
 #define MODULE_NAME "channels"
@@ -37,11 +37,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;
@@ -52,6 +47,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];
@@ -644,17 +642,17 @@
 	if (chan->stopnethack_mode)
 	  dprintf(idx, "      stopnethack-mode %d\n",
 		  chan->stopnethack_mode);
-        if (chan->revenge_mode)
-          dprintf(idx, "      revenge-mode %d\n",
+	if (chan->revenge_mode)
+	  dprintf(idx, "      revenge-mode %d\n",
                   chan->revenge_mode);
+	if (details) {
+		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);
+	}
       }
     }
   }
-  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);
-  }
 }
 
 static char *traced_globchanset(ClientData cdata, Tcl_Interp * irp,
@@ -701,13 +699,13 @@
 {
   {"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},
   {NULL,			NULL,				0}
 };
 
@@ -783,7 +781,7 @@
   (Function) clear_channel,
   /* 16 - 19 */
   (Function) set_handle_laston,
-  (Function) & ban_time,
+  (Function) NULL,
   (Function) & use_info,
   (Function) get_handle_chaninfo,
   /* 20 - 23 */
@@ -792,9 +790,9 @@
   (Function) add_chanrec_by_handle,
   (Function) NULL, /* [23] used to be isexempted() <cybah> */
   /* 24 - 27 */
-  (Function) & exempt_time,
+  (Function) NULL,
   (Function) NULL, /* [25] used to be isinvited() <cybah> */
-  (Function) & invite_time,
+  (Function) NULL,
   (Function) NULL,
   /* 28 - 31 */
   (Function) NULL, /* [28] used to be u_setsticky_exempt() <cybah> */
@@ -819,6 +817,10 @@
   /* 44 - 47 */
   (Function) expired_mask,
   (Function) remove_channel,
+  (Function) & global_ban_time,
+  (Function) & global_exempt_time,
+  /* 48 - 51 */
+  (Function) & global_invite_time
 };
 
 char *start(eggdrop_t *eggdrop)
@@ -840,9 +842,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;
@@ -850,13 +849,35 @@
   udef = NULL;
   global_stopnethack_mode = 0;
   global_revenge_mode = 1;
-  strcpy(glob_chanset, "\
--enforcebans +dynamicbans +userbans -autoop -bitch +greet \
-+protectops +statuslog -revenge -secret -autovoice +cycle \
-+dontkickops -inactive -protectfriends +shared \
-+userexempts +dynamicexempts +userinvites +dynamicinvites -revengebot \
-+honor-global-bans +honor-global-exempts +honor-global-invites \
--nodesynch" /* Do not remove this extra space: */ " ");
+  global_ban_time = 120;
+  global_exempt_time = 60;
+  global_invite_time = 60;
+  strcpy(glob_chanset,
+         "-enforcebans "
+	 "+dynamicbans "
+	 "+userbans "
+	 "-autoop "
+	 "-bitch "
+	 "+greet "
+	 "+protectops "
+	 "+statuslog "
+	 "-revenge "
+	 "-secret "
+	 "-autovoice "
+	 "+cycle "
+	 "+dontkickops "
+	 "-inactive "
+	 "-protectfriends "
+	 "+shared "
+	 "+userexempts "
+	 "+dynamicexempts "
+	 "+userinvites "
+	 "+dynamicinvites "
+	 "-revengebot "
+	 "+honor-global-bans "
+         "+honor-global-exempts "
+         "+honor-global-invites "
+	 "-nodesynch ");
   module_register(MODULE_NAME, channels_table, 1, 0);
   if (!module_depend(MODULE_NAME, "eggdrop", 107, 0)) {
     module_undepend(MODULE_NAME);
Index: eggdrop1.7/modules/channels/channels.h
diff -u eggdrop1.7/modules/channels/channels.h:1.8 eggdrop1.7/modules/channels/channels.h:1.9
--- eggdrop1.7/modules/channels/channels.h:1.8	Sun May  5 11:40:33 2002
+++ eggdrop1.7/modules/channels/channels.h	Thu Oct 10 00:50:11 2002
@@ -20,7 +20,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 /*
- * $Id: channels.h,v 1.8 2002/05/05 16:40:33 tothwolf Exp $
+ * $Id: channels.h,v 1.9 2002/10/10 05:50:11 wcc Exp $
  */
 
 #ifndef _EGG_MOD_CHANNELS_CHANNELS_H
@@ -126,7 +126,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] */
 #define use_info (*(int *)(channels_funcs[18]))
 #define get_handle_chaninfo ((void (*)(char *, char *, char *))channels_funcs[19])
 /* 20 - 23 */
@@ -135,9 +135,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] */
 /* *HOLE* channels_funcs[25] used to be isinvited() by arthur2 <cybah> */
-#define invite_time (*(int *)(channels_funcs[26]))
+/* *HOLE* channels_funcs[26] */
 /* *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> */
@@ -162,6 +162,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.7/modules/channels/cmdschan.c
diff -u eggdrop1.7/modules/channels/cmdschan.c:1.12 eggdrop1.7/modules/channels/cmdschan.c:1.13
--- eggdrop1.7/modules/channels/cmdschan.c:1.12	Sun May  5 11:40:33 2002
+++ eggdrop1.7/modules/channels/cmdschan.c	Thu Oct 10 00:50:11 2002
@@ -24,7 +24,7 @@
 
 /* FIXME: #include mess
 #ifndef lint
-static const char rcsid[] = "$Id: cmdschan.c,v 1.12 2002/05/05 16:40:33 tothwolf Exp $";
+static const char rcsid[] = "$Id: cmdschan.c,v 1.13 2002/10/10 05:50:11 wcc Exp $";
 #endif
 */
 
@@ -733,7 +733,7 @@
   struct chanset_t *chan;
 
   if (!par[0]) {
-    dprintf(idx, "Usage: +chan [%s]<channel>\n", CHANMETA);
+    dprintf(idx, "Usage: +chan [%s]<channel> [options]\n", CHANMETA);
     return;
   }
 
@@ -750,7 +750,7 @@
   }
 
   if (tcl_channel_add(0, chname, par) == TCL_ERROR) /* drummer */
-    dprintf(idx, _("Invalid channel.\n"));
+    dprintf(idx, _("Invalid channel or channel options.\n"));
   else
     putlog(LOG_CMDS, "*", "#%s# +chan %s", dcc[idx].nick, chname);
 }
@@ -805,7 +805,7 @@
   if (!par[0]) {
     chname = dcc[idx].u.chat->con_chan;
     if (chname[0] == '*') {
-      dprintf(idx, _("Your console channel is invalid\n"));
+      dprintf(idx, _("Your console channel is invalid.\n"));
       return;
     }
   } else {
@@ -836,6 +836,19 @@
       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");
+
     dprintf(idx, "Other modes:\n");
     dprintf(idx, "     %cinactive       %cstatuslog      %csecret         %cshared\n",
 	    (chan->status & CHAN_INACTIVE) ? '+' : '-',
Index: eggdrop1.7/modules/channels/tclchan.c
diff -u eggdrop1.7/modules/channels/tclchan.c:1.19 eggdrop1.7/modules/channels/tclchan.c:1.20
--- eggdrop1.7/modules/channels/tclchan.c:1.19	Sat Jun  1 03:13:26 2002
+++ eggdrop1.7/modules/channels/tclchan.c	Thu Oct 10 00:50:11 2002
@@ -22,7 +22,7 @@
 
 /* FIXME: #include mess
 #ifndef lint
-static const char rcsid[] = "$Id: tclchan.c,v 1.19 2002/06/01 08:13:26 stdarg Exp $";
+static const char rcsid[] = "$Id: tclchan.c,v 1.20 2002/10/10 05:50:11 wcc Exp $";
 #endif
 */
 
@@ -180,7 +180,9 @@
 		expire_time = atoi(lifetime);
 		if (expire_time) expire_time = expire_time * 60 + now;
 	}
-	else expire_time = ban_time * 60 + now;
+	expire_time = now + (60 * (((int) type == 'b') ? chan->ban_time :
+				(((int) type == 'e') ? chan->exempt_time :
+				chan->exempt_time)));
 
 	if (options && !strcasecmp(options, "sticky")) sticky = 1;
 
@@ -262,6 +264,10 @@
 	else if (CHECK("flood-deop")) sprintf(s, "%d %d", chan->flood_deop_thr, chan->flood_deop_time);
 	else if (CHECK("flood-nick")) sprintf(s, "%d %d", chan->flood_nick_thr, chan->flood_nick_time);
 	else if (CHECK("aop-delay")) sprintf(s, "%d %d", chan->aop_min, chan->aop_max);
+	else if (CHECK("ban-time"))  sprintf(s, "%d", chan->ban_time);
+	else if (CHECK("exempt-time"))  sprintf(s, "%d", chan->exempt_time);
+	else if (CHECK("invite-time"))  sprintf(s, "%d", chan->invite_time);
+
 	else if (lookup_flag_by_name(normal_flag_map, setting, &flagval)) sprintf(s, "%d", chan->status & flagval);
 	else if (lookup_flag_by_name(stupid_ircnet_flag_map, setting, &flagval)) sprintf(s, "%d", chan->ircnet_status & flagval);
 	else {
@@ -395,6 +401,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 (item[i][0] == '+' || item[i][0] == '-') {
       int flagval;
@@ -787,10 +817,17 @@
   char buf[2048], buf2[256];
 
   if (!newname || !newname[0] || !strchr(CHANMETA, newname[0])) {
-    Tcl_AppendResult(irp, "invalid channel prefix", NULL);
+    if (irp)
+      Tcl_AppendResult(irp, "invalid channel prefix", NULL);
     return TCL_ERROR;
   }
 
+  if (strchr(newname, ',') != NULL) {
+    if (irp)
+      Tcl_AppendResult(irp, "invalid channel name", NULL);
+     return TCL_ERROR;
+   }
+
   convert_element(glob_chanmode, buf2);
   simple_sprintf(buf, "chanmode %s ", buf2);
   strncat(buf, glob_chanset, 2047 - strlen(buf));
@@ -822,6 +859,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.7/modules/filesys/filesys.c
diff -u eggdrop1.7/modules/filesys/filesys.c:1.15 eggdrop1.7/modules/filesys/filesys.c:1.16
--- eggdrop1.7/modules/filesys/filesys.c:1.15	Sun May 26 03:34:13 2002
+++ eggdrop1.7/modules/filesys/filesys.c	Thu Oct 10 00:50:11 2002
@@ -23,7 +23,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: filesys.c,v 1.15 2002/05/26 08:34:13 stdarg Exp $";
+static const char rcsid[] = "$Id: filesys.c,v 1.16 2002/10/10 05:50:11 wcc Exp $";
 #endif
 
 #include <fcntl.h>
@@ -858,20 +858,22 @@
 
 static void filesys_report(int idx, int details)
 {
-  if (dccdir[0]) {
-    dprintf(idx, _("    DCC file path: %s"), dccdir);
-    if (upload_to_cd)
-      dprintf(idx, _("\n        incoming: (go to the current dir)\n"));
-    else if (dccin[0])
-      dprintf(idx, _("\n        incoming: %s\n"), dccin);
-    else
-      dprintf(idx, _("    (no uploads)\n"));
-    if (dcc_users)
-      dprintf(idx, _("        max users is %d\n"), dcc_users);
-    if ((upload_to_cd) || (dccin[0]))
-      dprintf(idx, _("    DCC max file size: %dk\n"), dcc_maxsize);
-  } else
-    dprintf(idx, _("  (Filesystem module loaded, but no active dcc path.)\n"));
+  if (details) {
+    if (dccdir[0]) {
+      dprintf(idx, _("    DCC file path: %s"), dccdir);
+      if (upload_to_cd)
+        dprintf(idx, _("\n        incoming: (go to the current dir)\n"));
+      else if (dccin[0])
+        dprintf(idx, _("\n        incoming: %s\n"), dccin);
+      else
+        dprintf(idx, _("    (no uploads)\n"));
+      if (dcc_users)
+        dprintf(idx, _("        max users is %d\n"), dcc_users);
+      if ((upload_to_cd) || (dccin[0]))
+        dprintf(idx, _("    DCC max file size: %dk\n"), dcc_maxsize);
+    } else
+      dprintf(idx, _("  (Filesystem module loaded, but no active dcc path.)\n"));
+  }
 }
 
 static char *filesys_close()
Index: eggdrop1.7/modules/irc/chan.c
diff -u eggdrop1.7/modules/irc/chan.c:1.24 eggdrop1.7/modules/irc/chan.c:1.25
--- eggdrop1.7/modules/irc/chan.c:1.24	Tue Jun 18 01:12:31 2002
+++ eggdrop1.7/modules/irc/chan.c	Thu Oct 10 00:50:12 2002
@@ -28,7 +28,7 @@
 
 /* FIXME: #include mess
 #ifndef lint
-static const char rcsid[] = "$Id: chan.c,v 1.24 2002/06/18 06:12:31 guppy Exp $";
+static const char rcsid[] = "$Id: chan.c,v 1.25 2002/10/10 05:50:12 wcc Exp $";
 #endif
 */
 
@@ -289,7 +289,7 @@
       else
 	putlog(LOG_MISC | LOG_JOIN, chan->dname, _("NICK flood from @%s!  Banning."), p);
       strcpy(ftype + 4, " flood");
-      u_addmask('b', chan, h, botnetnick, ftype, now + (60 * ban_time), 0);
+      u_addmask('b', chan, h, botnetnick, ftype, now + (60 * chan->ban_time), 0);
       if (!channel_enforcebans(chan) && me_op(chan)) {
 	  char s[UHOSTLEN];
 	  for (m = chan->channel.member; m && m->nick[0]; m = m->next) {	  
@@ -1254,7 +1254,7 @@
   if (chan) {
     putlog(LOG_JOIN, chan->dname, _("Channel full--cant join: %s"), chan->dname);
     check_tcl_need(chan->dname, "limit"); 
-    chan = findchan(chname); 
+    chan = findchan_by_dname(chname); 
     if (!chan)
       return 0;
  } else
@@ -1285,7 +1285,7 @@
   if (chan) {
     putlog(LOG_JOIN, chan->dname, _("Channel invite only--cant join: %s"), chan->dname);
     check_tcl_need(chan->dname, "invite");
-    chan = findchan(chname); 
+    chan = findchan_by_dname(chname); 
     if (!chan)
       return 0;
   } else
@@ -1316,7 +1316,7 @@
   if (chan) {
     putlog(LOG_JOIN, chan->dname, _("Banned from channel--can't join: %s"), chan->dname);
     check_tcl_need(chan->dname, "unban");
-    chan = findchan(chname); 
+    chan = findchan_by_dname(chname); 
     if (!chan)
       return 0;
   } else
@@ -1352,9 +1352,9 @@
       dprintf(DP_MODE, "JOIN %s %s\n", chan->dname, chan->key_prot);
     } else {
       check_tcl_need(chan->dname, "key");
-      chan = findchan(chname); 
+      chan = findchan_by_dname(chname); 
       if (!chan)
-	return 0;
+        return 0;
     }
   } else
     putlog(LOG_JOIN, chname, _("Bad key--cant join: %s"), chname);
@@ -1553,8 +1553,12 @@
   }
 
   if (!chan || channel_inactive(chan)) {
-    putlog(LOG_MISC, "*", "joined %s but didn't want to!", chname);
-    dprintf(DP_MODE, "PART %s\n", chname);
+    strcpy(uhost, from);
+    nick = splitnick(&uhost);
+    if (match_my_nick(nick)) {
+      putlog(LOG_MISC, "*", "joined %s but didn't want to!", chname);
+      dprintf(DP_MODE, "PART %s\n", chname);
+    }
   } else if (!channel_pending(chan)) {
     chan->status &= ~CHAN_STOP_CYCLE;
     strlcpy(buf, from, sizeof buf);
@@ -1828,8 +1832,18 @@
   msg = buf2;
   chname = newsplit(&msg);
   chan = findchan(chname);
-  if (chan && channel_active(chan)) {
-    kicked = newsplit(&msg);
+  if (!chan)
+    return 0;
+  kicked = newsplit(&msg);
+  if (match_my_nick(kicked) && channel_pending(chan)) {
+    chan->status &= ~(CHAN_ACTIVE | CHAN_PEND);
+    dprintf(DP_MODE, "JOIN %s %s\n",
+            (chan->name[0]) ? chan->name : chan->dname,
+            chan->channel.key[0] ? chan->channel.key : chan->key_prot);
+    clear_channel(chan, 1);
+    return 0;
+  }
+  if (channel_active(chan)) {
     fixcolon(msg);
     u = get_user_by_host(from);
     strlcpy(buf, from, sizeof buf);
@@ -1918,7 +1932,7 @@
       sprintf(s1, "%s!%s", msg, uhost);
       strcpy(m->nick, msg);
       detect_chan_flood(msg, uhost, from, chan, FLOOD_NICK, NULL);
-      if (!findchan(chname)) {
+      if (!findchan_by_dname(chname)) {
 	chan = oldchan;
 	continue;
       }
@@ -1936,7 +1950,7 @@
       u = get_user_by_host(from); /* make sure this is in the loop, someone could have changed the record
                                      in an earlier iteration of the loop */
       check_tcl_nick(nick, uhost, u, chan->dname, msg);
-      if (!findchan(chname)) {
+      if (!findchan_by_dname(chname)) {
 	chan = oldchan;
 	continue;
       }
@@ -1993,7 +2007,7 @@
       if (split) {
 	m->split = now;
 	check_tcl_splt(nick, uhost, u, chan->dname);
-	if (!findchan(chname)) {
+	if (!findchan_by_dname(chname)) {
 	  chan = oldchan;
 	  continue;
         }
@@ -2001,7 +2015,7 @@
 	       uhost);
       } else {
 	check_tcl_sign(nick, uhost, u, chan->dname, msg);
-	if (!findchan(chname)) {
+	if (!findchan_by_dname(chname))) {
 	  chan = oldchan;
 	  continue;
 	}
Index: eggdrop1.7/modules/irc/cmdsirc.c
diff -u eggdrop1.7/modules/irc/cmdsirc.c:1.11 eggdrop1.7/modules/irc/cmdsirc.c:1.12
--- eggdrop1.7/modules/irc/cmdsirc.c:1.11	Tue Jun 18 01:12:31 2002
+++ eggdrop1.7/modules/irc/cmdsirc.c	Thu Oct 10 00:50:12 2002
@@ -24,7 +24,7 @@
 
 /* FIXME: #include mess
 #ifndef lint
-static const char rcsid[] = "$Id: cmdsirc.c,v 1.11 2002/06/18 06:12:31 guppy Exp $";
+static const char rcsid[] = "$Id: cmdsirc.c,v 1.12 2002/10/10 05:50:12 wcc Exp $";
 #endif
 */
 
@@ -188,63 +188,62 @@
   if (match_my_nick(nick)) {
     dprintf(idx, _("I'm not going to kickban myself.\n"));
     return;
-  } else {
-    m = ismember(chan, nick);
-    if (!m)
-      dprintf(idx, _("%1$s is not on %2$s\n"), nick, chan->dname);
-    else {
-      snprintf(s, sizeof s, "%s!%s", m->nick, m->userhost);
-      u = get_user_by_host(s);
-      get_user_flagrec(u, &victim, chan->dname);
-      if ((chan_op(victim) || (glob_op(victim) && !chan_deop(victim))) &&
-	  !(chan_master(user) || glob_master(user))) {
-	dprintf(idx, _("%s is a legal op.\n"), nick);
-	return;
-      }
-      if ((chan_master(victim) || glob_master(victim)) &&
-	  !(glob_owner(user) || chan_owner(user))) {
-	dprintf(idx, _("%1$s is a %2$s master.\n"), nick, chan->dname);
-	return;
-      }
-      if (glob_bot(victim) && !(glob_owner(victim) || chan_owner(victim))) {
-	dprintf(idx, _("%s is another channel bot!\n"), nick);
-	return;
-      }
-      if (use_exempts && is_perm_exempted(chan, s)) {
-	dprintf(idx, _("%s is permanently exempted!\n"), nick);
-	return;
-      }
-      if (m->flags & CHANOP)
-	add_mode(chan, '-', 'o', m->nick);
-      check_exemptlist(chan, s);
-      switch (bantype) {
-	case '@':
-	  s1 = strchr(s, '@');
-	  s1 -= 3;
-	  s1[0] = '*';
-	  s1[1] = '!';
-	  s1[2] = '*';
-	  break;
-	case '-':
-	  s1 = strchr(s, '-');
-	  s1[1] = '*';
-	  s1--;
-	  s1[0] = '*';
-	  break;
-	default:
-	  s1 = quickban(chan, m->userhost);
-	  break;
-      }
-      if (bantype == '@' || bantype == '-')
-	do_mask(chan, chan->channel.ban, s1, 'b');
-      if (!par[0])
-	par = _("requested");
-      dprintf(DP_SERVER, "KICK %s %s :%s\n", chan->name, m->nick, par);
-      m->flags |= SENTKICK;
-      u_addmask('b', chan, s1, dcc[idx].nick, par, now + (60 * ban_time), 0);
-      dprintf(idx, _("Okay, done.\n"));
-    }
   }
+  m = ismember(chan, nick);
+  if (!m) {
+    dprintf(idx, _("%1$s is not on %2$s\n"), nick, chan->dname);
+    return;
+  }
+  snprintf(s, sizeof s, "%s!%s", m->nick, m->userhost);
+  u = get_user_by_host(s);
+  get_user_flagrec(u, &victim, chan->dname);
+  if ((chan_op(victim) || (glob_op(victim) && !chan_deop(victim))) &&
+      !(chan_master(user) || glob_master(user))) {
+    dprintf(idx, _("%s is a legal op.\n"), nick);
+    return;
+  }
+  if ((chan_master(victim) || glob_master(victim)) &&
+      !(glob_owner(user) || chan_owner(user))) {
+    dprintf(idx, _("%1$s is a %2$s master.\n"), nick, chan->dname);
+    return;
+  }
+  if (glob_bot(victim) && !(glob_owner(victim) || chan_owner(victim))) {
+    dprintf(idx, _("%s is another channel bot!\n"), nick);
+    return;
+  }
+  if (use_exempts && is_perm_exempted(chan, s)) {
+    dprintf(idx, _("%s is permanently exempted!\n"), nick);
+    return;
+  }
+  if (m->flags & CHANOP)
+    add_mode(chan, '-', 'o', m->nick);
+  check_exemptlist(chan, s);
+  switch (bantype) {
+    case '@':
+      s1 = strchr(s, '@');
+      s1 -= 3;
+      s1[0] = '*';
+      s1[1] = '!';
+      s1[2] = '*';
+      break;
+    case '-':
+      s1 = strchr(s, '!');
+      s1[1] = '*';
+      s1--;
+      s1[0] = '*';
+      break;
+    default:
+      s1 = quickban(chan, m->userhost);
+      break;
+  }
+  if (bantype == '@' || bantype == '-')
+    do_mask(chan, chan->channel.ban, s1, 'b');
+  if (!par[0])
+    par = _("requested");
+  dprintf(DP_SERVER, "KICK %s %s :%s\n", chan->name, m->nick, par);
+  m->flags |= SENTKICK;
+  u_addmask('b', chan, s1, dcc[idx].nick, par, now + (60 * chan->ban_time), 0);
+  dprintf(idx, _("Okay, done.\n"));
 }
 
 static void cmd_voice(struct userrec *u, int idx, char *par)
Index: eggdrop1.7/modules/irc/irc.c
diff -u eggdrop1.7/modules/irc/irc.c:1.22 eggdrop1.7/modules/irc/irc.c:1.23
--- eggdrop1.7/modules/irc/irc.c:1.22	Sun Jun  2 03:52:18 2002
+++ eggdrop1.7/modules/irc/irc.c	Thu Oct 10 00:50:12 2002
@@ -23,7 +23,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: irc.c,v 1.22 2002/06/02 08:52:18 stdarg Exp $";
+static const char rcsid[] = "$Id: irc.c,v 1.23 2002/10/10 05:50:12 wcc Exp $";
 #endif
 
 #define MODULE_NAME "irc"
@@ -233,7 +233,7 @@
     baduhost = strtok(NULL, "!");
     maskhost(baduhost, s1);
     simple_sprintf(s2, "(%s) %s", ct, reason);
-    u_addmask('b', chan, s1, botnetnick, s2, now + (60 * ban_time), 0);
+    u_addmask('b', chan, s1, botnetnick, s2, now + (60 * chan->ban_time), 0);
     if (!mevictim && me_op(chan)) {
       add_mode(chan, '+', 'b', s1);
       flush_mode(chan, QUICK);
@@ -551,9 +551,9 @@
   for (chan = chanset; chan; chan = chan->next) {
     if (channel_active(chan)) {
       if (me_op(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)) {
@@ -564,9 +564,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)) {
@@ -598,7 +598,7 @@
 	if (use_invites && channel_dynamicinvites(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)) {
@@ -750,6 +750,8 @@
   struct chanset_t *chan;
   memberlist *m;
 
+  if (modesperline > 6)
+    modesperline = 6;
   for (chan = chanset; chan; chan = chan->next) {
     for (m = chan->channel.member; m && m->nick[0]; m = m->next) {
       if (m->delay && m->delay <= now) {
Index: eggdrop1.7/modules/irc/mode.c
diff -u eggdrop1.7/modules/irc/mode.c:1.14 eggdrop1.7/modules/irc/mode.c:1.15
--- eggdrop1.7/modules/irc/mode.c:1.14	Sun May  5 11:40:35 2002
+++ eggdrop1.7/modules/irc/mode.c	Thu Oct 10 00:50:12 2002
@@ -25,7 +25,7 @@
 
 /* FIXME: #include mess
 #ifndef lint
-static const char rcsid[] = "$Id: mode.c,v 1.14 2002/05/05 16:40:35 tothwolf Exp $";
+static const char rcsid[] = "$Id: mode.c,v 1.15 2002/10/10 05:50:12 wcc Exp $";
 #endif
 */
 
@@ -514,15 +514,14 @@
 	ok = 0;
     }
 
-    /* do we want to reop victim? */
-    if (!ok && had_op && !match_my_nick(nick) && irccmp(who, nick) && 
-	!match_my_nick(who)) {
-      /* Is the deopper NOT a master or bot? */
-      if (reversing || (!glob_master(user) && !chan_master(user) && !glob_bot(user) &&
-	  !channel_bitch(chan)))
-	/* Then we'll bless the victim */
-	add_mode(chan, '+', 'o', who);
-    }
+    if ((reversing || !ok) && had_op && !match_my_nick(nick) &&
+        rfc_casecmp(who, nick) && !match_my_nick(who) &&
+	/* Is the deopper NOT a master or bot? */
+        !glob_master(user) && !chan_master(user) && !glob_bot(user) &&
+        ((chan_op(victim) || (glob_op(victim) && !chan_deop(victim))) ||
+        !channel_bitch(chan)))
+      /* Then we'll bless the victim */
+      add_mode(chan, '+', 'o', who);
   }
 
   if (!nick[0])
@@ -557,115 +556,66 @@
 }
 
 
-static void got_ban(struct chanset_t *chan, char *nick, char *from,
-		    char *who)
+static void got_ban(struct chanset_t *chan, char *nick, char *from, char *who)
 {
   char me[UHOSTLEN], s[UHOSTLEN], s1[UHOSTLEN];
-  int check = 1;
   memberlist *m;
   struct userrec *u;
 
-  simple_sprintf(me, "%s!%s", botname, botuserhost);
-  simple_sprintf(s, "%s!%s", nick, from);
+  snprintf(me, sizeof me, "%s!%s", botname, botuserhost);
+  snprintf(s, sizeof s, "%s!%s", nick, from);
   newban(chan, who, s);
 
-  if (channel_pending(chan))
+  if (channel_pending(chan) || !me_op(chan))
     return;
 
-  if (wild_match(who, me) && me_op(chan)) {
-    /* First of all let's check whether some luser banned us ++rtc */
-    if (match_my_nick(nick))
-      /* Bot banned itself -- doh! ++rtc */
-      putlog(LOG_MISC, "*", "Uh, banned myself on %s, reversing...",
-	     chan->dname);
-    reversing = 1;
-    check = 0;
-  } else if (!match_my_nick(nick)) {	/* It's not my ban */
+  if (wild_match(who, me) && !isexempted(chan, me)) {
+    add_mode(chan, '-', 'b', who);
+    return;
+  }
+
+  if (!match_my_nick(nick)) {
     if (channel_nouserbans(chan) && nick[0] && !glob_bot(user) &&
-	!glob_master(user) && !chan_master(user)) {
-      /* No bans made by users */
+        !glob_master(user) && !chan_master(user)) {
       add_mode(chan, '-', 'b', who);
       return;
     }
-    /* Don't enforce a server ban right away -- give channel users a chance
-     * to remove it, in case it's fake
-     */
-    if (!nick[0]) {
-      check = 0;
-      if (bounce_modes)
-	reversing = 1;
-    }
-    /* Does this remotely match against any of our hostmasks?
-     * just an off-chance...
-     */
-    u = get_user_by_host(who);
-    if (u) {
-      get_user_flagrec(u, &victim, chan->dname);
-      if (glob_friend(victim) || (glob_op(victim) && !chan_deop(victim)) ||
-	  chan_friend(victim) || chan_op(victim)) {
-	if (!glob_master(user) && !glob_bot(user) && !chan_master(user))
-	  /* commented out: reversing = 1; */ /* arthur2 - 99/05/31 */
-	  check = 0;
-	if (glob_master(victim) || chan_master(victim))
-	  check = 0;
-      }
-    } else {
-      /* Banning an oplisted person who's on the channel? */
-      for (m = chan->channel.member; m && m->nick[0]; m = m->next) {
-	sprintf(s1, "%s!%s", m->nick, m->userhost);
-	if (wild_match(who, s1)) {
-	  u = get_user_by_host(s1);
-	  if (u) {
-	    get_user_flagrec(u, &victim, chan->dname);
-	    if (glob_friend(victim) ||
-		(glob_op(victim) && !chan_deop(victim))
-		|| chan_friend(victim) || chan_op(victim)) {
-	      /* Remove ban on +o/f/m user, unless placed by another +m/b */
-	      if (!glob_master(user) && !glob_bot(user) &&
-		  !chan_master(user)) {
-		if (!isexempted(chan, s1)) {
-		  /* Crotale - if the victim is not +e, then ban is removed */
-		  add_mode(chan, '-', 'b', who);
-		  check = 0;
-		}
-	      }
-	      if (glob_master(victim) || chan_master(victim))
-		check = 0;
-	    }
-	  }
-	}
+    for (m = chan->channel.member; m && m->nick[0]; m = m->next) {
+      egg_snprintf(s1, sizeof s1, "%s!%s", m->nick, m->userhost);
+      if (wild_match(who, s1)) {
+        u = get_user_by_host(s1);
+        if (u) {
+          get_user_flagrec(u, &victim, chan->dname);
+          if ((glob_friend(victim) || (glob_op(victim) && !chan_deop(victim)) ||
+              chan_friend(victim) || chan_op(victim)) && !glob_master(user) &&
+              !glob_bot(user) && !chan_master(user) && !isexempted(chan, s1)) {
+            add_mode(chan, '-', 'b', who);
+	    return;
+          }
+        }
       }
     }
   }
-  /* If a ban is set on an exempted user then we might as well set exemption
-   * at the same time.
-   */
-  refresh_exempt(chan,who);
-  /* Does the ban match anyone in the internal banlist in that case
-   * use the stored ban reason when kicking
-   */
-  if (check && channel_enforcebans(chan)) {
+  refresh_exempt(chan, who);
+  if (nick[0] && channel_enforcebans(chan)) 
     register maskrec *b;
     int cycle;
     char resn[512]="";
 
     for (cycle = 0; cycle < 2; cycle++) {
       for (b = cycle ? chan->bans : global_bans; b; b = b->next) {
-	if (wild_match(b->mask, who)) {
-	  if (b->desc && b->desc[0] != '@')
-	    snprintf(resn, sizeof resn, "%s%s", _("banned: "), b->desc);
-	  else
+        if (wild_match(b->mask, who)) {
+          if (b->desc && b->desc[0] != '@')
+            snprintf(resn, sizeof resn, "%s%s", IRC_PREBANNED, b->desc);
+          else
 	    resn[0] = 0;
-	}
+        }
       }
     }
     kick_all(chan, who, resn[0] ? resn : _("Banned"), match_my_nick(nick) ? 0 : 1);
   }
-  /* Is it a server ban from nowhere? */
-  if (reversing ||
-      (bounce_bans && (!nick[0]) &&
-       (!u_equals_mask(global_bans, who) ||
-	!u_equals_mask(chan->bans, who)) && (check)))
+  if (!nick[0] && (bounce_bans || bounce_modes) &&
+      (!u_equals_mask(global_bans, who) || !u_equals_mask(chan->bans, who)))
     add_mode(chan, '-', 'b', who);
 }
 
Index: eggdrop1.7/modules/irc/msgcmds.c
diff -u eggdrop1.7/modules/irc/msgcmds.c:1.9 eggdrop1.7/modules/irc/msgcmds.c:1.10
--- eggdrop1.7/modules/irc/msgcmds.c:1.9	Mon Jun 17 01:14:40 2002
+++ eggdrop1.7/modules/irc/msgcmds.c	Thu Oct 10 00:50:12 2002
@@ -24,7 +24,7 @@
 
 /* FIXME: #include mess
 #ifndef lint
-static const char rcsid[] = "$Id: msgcmds.c,v 1.9 2002/06/17 06:14:40 guppy Exp $";
+static const char rcsid[] = "$Id: msgcmds.c,v 1.10 2002/10/10 05:50:12 wcc Exp $";
 #endif
 */
 
@@ -409,6 +409,12 @@
     return 1;
   if (!u)
     return 0;
+  if (!par[0]) {
+    dprintf(DP_HELP, "NOTICE %s :%s: /msg %s whois <handle>\n", nick,
+	    MISC_USAGE, botname);
+    return 0;
+  }
+
   if (strlen(par) > NICKMAX)
     par[NICKMAX] = 0;
   putlog(LOG_CMDS, "*", "(%s!%s) !%s! WHOIS %s", nick, host, u->handle, par);
@@ -576,7 +582,7 @@
 	    dprintf(DP_SERVER, "NOTICE %s :%s: key is %s\n", nick, par,
 		    chan->channel.key);
 	    if (invite_key && (chan->channel.mode & CHANINV)) {
-	      dprintf(DP_SERVER, "INVITE %s %s\n", nick, par);
+	      dprintf(DP_SERVER, "INVITE %s %s\n", nick, chan->name);
 	      putlog(LOG_CMDS, "*", "(%s!%s) !%s! KEY %s",
 		     nick, host, u->handle, par);
 	    }
@@ -673,7 +679,7 @@
     /* We need to check access here also (dw 991002) */
     get_user_flagrec(u, &fr, par);
     if (chan_op(fr) || (glob_op(fr) && !chan_deop(fr))) {
-      dprintf(DP_SERVER, "INVITE %s %s\n", nick, par);
+      dprintf(DP_SERVER, "INVITE %s %s\n", nick, chan->name);
       putlog(LOG_CMDS, "*", "(%s!%s) !%s! INVITE %s", nick, host,
 	     u->handle, par);
       return 1;
@@ -694,7 +700,7 @@
 #ifdef HAVE_UNAME
   struct utsname un;
 
-  if (!uname(&un) < 0) {
+  if (uname(&un) >= 0) {
 #endif
     ve_t = " ";
     un_t = "*unknown*";
Index: eggdrop1.7/modules/share/share.c
diff -u eggdrop1.7/modules/share/share.c:1.16 eggdrop1.7/modules/share/share.c:1.17
--- eggdrop1.7/modules/share/share.c:1.16	Fri May 17 02:29:24 2002
+++ eggdrop1.7/modules/share/share.c	Thu Oct 10 00:50:12 2002
@@ -21,7 +21,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: share.c,v 1.16 2002/05/17 07:29:24 stdarg Exp $";
+static const char rcsid[] = "$Id: share.c,v 1.17 2002/10/10 05:50:12 wcc Exp $";
 #endif
 
 #define MODULE_NAME "share"
@@ -185,8 +185,8 @@
     noshare = 1;
     if (!par[0]) {		/* Global ban */
       if (u_setsticky_ban(NULL, host, yn) > 0) {
-	putlog(LOG_CMDS, "*", "%s: stick %s %c", dcc[idx].nick, host,
-	       yn ? 'y' : 'n');
+	putlog(LOG_CMDS, "*", "%s: %s %s", dcc[idx].nick,
+               (yn) ? "stick" : "unstick", host);
 	shareout_but(NULL, idx, "s %s %d\n", host, yn);
       }
     } else {
@@ -198,14 +198,14 @@
                               (cr->flags & BOT_AGGRESSIVE))) ||
                             (bot_flags(dcc[idx].user) & BOT_GLOBAL)))
 	if (u_setsticky_ban(chan, host, yn) > 0) {
-	  putlog(LOG_CMDS, "*", "%s: stick %s %c %s", dcc[idx].nick, host,
-		 yn ? 'y' : 'n', par);
+	  putlog(LOG_CMDS, "*", "%s: %s %s %s", dcc[idx].nick,
+                 (yn) ? "stick" : "unstick", host, par);
 	  shareout_but(chan, idx, "s %s %d %s\n", host, yn, chan->dname);
 	  noshare = 0;
 	  return;
 	}
-      putlog(LOG_CMDS, "*", "Rejecting invalid sticky ban: %s on %s, %c",
-	     host, par, yn ? 'y' : 'n');
+      putlog(LOG_CMDS, "*", "Rejecting invalid sticky ban: %s on %s%s",
+	     host, par, yn ? "" : " (unstick)");
     }
     noshare = 0;
   }
@@ -225,8 +225,8 @@
     noshare = 1;
     if (!par[0]) {		/* Global exempt */
       if (u_setsticky_exempt(NULL, host, yn) > 0) {
-	putlog(LOG_CMDS, "*", "%s: stick %s %c", dcc[idx].nick, host,
-	       yn ? 'y' : 'n');
+	putlog(LOG_CMDS, "*", "%s: %s %s", dcc[idx].nick,
+               (yn) ? "stick" : "unstick", host);
 	shareout_but(NULL, idx, "se %s %d\n", host, yn);
       }
     } else {
@@ -238,14 +238,14 @@
                               (cr->flags & BOT_AGGRESSIVE))) ||
                             (bot_flags(dcc[idx].user) & BOT_GLOBAL)))
 	if (u_setsticky_exempt(chan, host, yn) > 0) {
-	  putlog(LOG_CMDS, "*", "%s: stick %s %c %s", dcc[idx].nick, host,
-		 yn ? 'y' : 'n', par);
+	  putlog(LOG_CMDS, "*", "%s: %s %s %s", dcc[idx].nick,
+                 (yn) ? "stick" : "unstick", host, par);
 	  shareout_but(chan, idx, "se %s %d %s\n", host, yn, chan->dname);
 	  noshare = 0;
 	  return;
 	}
-      putlog(LOG_CMDS, "*", "Rejecting invalid sticky exempt: %s on %s, %c",
-	     host, par, yn ? 'y' : 'n');
+      putlog(LOG_CMDS, "*", "Rejecting invalid sticky exempt: %s on %s%s",
+	     host, par, yn ? "" : " (unstick)");
     }
     noshare = 0;
   }
@@ -264,8 +264,8 @@
     noshare = 1;
     if (!par[0]) {		/* Global invite */
       if (u_setsticky_invite(NULL, host, yn) > 0) {
- 	    putlog(LOG_CMDS, "*", "%s: stick %s %c", dcc[idx].nick, host,
- 		   yn ? 'y' : 'n');
+ 	    putlog(LOG_CMDS, "*", "%s: %s %s", dcc[idx].nick,
+               (yn) ? "stick" : "unstick", host);
  	    shareout_but(NULL, idx, "sInv %s %d\n", host, yn);
       }
     } else {
@@ -277,14 +277,14 @@
                               (cr->flags & BOT_AGGRESSIVE))) ||
                             (bot_flags(dcc[idx].user) & BOT_GLOBAL)))
 	if (u_setsticky_invite(chan, host, yn) > 0) {
-	  putlog(LOG_CMDS, "*", "%s: stick %s %c %s", dcc[idx].nick, host,
-		 yn ? 'y' : 'n', par);
+	  putlog(LOG_CMDS, "*", "%s: %s %s %s", dcc[idx].nick,
+                 (yn) ? "stick" : "unstick", host, par);
 	  shareout_but(chan, idx, "sInv %s %d %s\n", host, yn, chan->dname);
 	  noshare = 0;
 	  return;
 	}
-      putlog(LOG_CMDS, "*", "Rejecting invalid sticky invite: %s on %s, %c",
-	     host, par, yn ? 'y' : 'n');
+      putlog(LOG_CMDS, "*", "Rejecting invalid sticky invite: %s on %s%s",
+	     host, par, yn ? "" : " (unstick)");
     }
     noshare = 0;
   }
Index: eggdrop1.7/modules/transfer/transfer.c
diff -u eggdrop1.7/modules/transfer/transfer.c:1.15 eggdrop1.7/modules/transfer/transfer.c:1.16
--- eggdrop1.7/modules/transfer/transfer.c:1.15	Fri May 17 02:29:25 2002
+++ eggdrop1.7/modules/transfer/transfer.c	Thu Oct 10 00:50:12 2002
@@ -25,7 +25,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: transfer.c,v 1.15 2002/05/17 07:29:25 stdarg Exp $";
+static const char rcsid[] = "$Id: transfer.c,v 1.16 2002/10/10 05:50:12 wcc Exp $";
 #endif
 
 #define MODULE_NAME "transfer"
@@ -561,8 +561,14 @@
   }
   if (copy_to_tmp) {
     sys = malloc(strlen(tempdir) + strlen(nfn) + 1);
-    sprintf(sys, "%s%s", tempdir, nfn);		/* New filename, in /tmp */
-    copyfile(argv[1], sys);
+    sprintf(sys, "%s%s", tempdir, nfn);
+    f = fopen(sys, "r");
+    if (f) {
+      fclose(f);
+      Tcl_AppendResult(irp, "5", NULL);
+      return TCL_OK;
+    } else
+      copyfile(argv[1], sys);
   } else
     sys = strdup(argv[1]);
   i = raw_dcc_send(sys, argv[2], "*", argv[1], 0);
Index: eggdrop1.7/scripts/alltools.tcl
diff -u eggdrop1.7/scripts/alltools.tcl:1.11 eggdrop1.7/scripts/alltools.tcl:1.12
--- eggdrop1.7/scripts/alltools.tcl:1.11	Sun Dec  2 07:36:50 2001
+++ eggdrop1.7/scripts/alltools.tcl	Thu Oct 10 00:50:12 2002
@@ -18,7 +18,7 @@
 # Tothwolf  13Jun2001: updated/modified several commands
 # Hanno     28Sep2001: fixed testip
 #
-# $Id: alltools.tcl,v 1.11 2001/12/02 13:36:50 ite Exp $
+# $Id: alltools.tcl,v 1.12 2002/10/10 05:50:12 wcc Exp $
 #
 ########################################
 # Descriptions of avaliable commands:
@@ -155,28 +155,27 @@
 #
 
 proc strlwr {string} {
-  return [string tolower $string]
+  string tolower $string
 }
 
 proc strupr {string} {
-  return [string toupper $string]
+  string toupper $string
 }
 
 proc strcmp {string1 string2} {
-  return [string compare $string1 $string2]
+  string compare $string1 $string2
 }
 
 proc stricmp {string1 string2} {
-  return [string compare [string tolower $string1] \
-          [string tolower $string2]]
+  string compare [string tolower $string1] [string tolower $string2]
 }
 
 proc strlen {string} {
-  return [string length $string]
+  string length $string
 }
 
 proc stridx {string index} {
-  return [string index $string $index]
+  string index $string $index
 }
 
 proc iscommand {command} {
@@ -205,7 +204,7 @@
 }
 
 proc inchain {bot} {
-  return [islinked $bot]
+  islinked $bot
 }
 
 proc randstring {length {chars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789}} {
@@ -251,7 +250,7 @@
 #
 
 proc iso {nick chan} {
-  return [matchattr [nick2hand $nick $chan] o|o $chan]
+  matchattr [nick2hand $nick $chan] o|o $chan
 }
 
 proc realtime {args} {
Index: eggdrop1.7/src/chan.h
diff -u eggdrop1.7/src/chan.h:1.30 eggdrop1.7/src/chan.h:1.31
--- eggdrop1.7/src/chan.h:1.30	Sun May  5 11:40:37 2002
+++ eggdrop1.7/src/chan.h	Thu Oct 10 00:50:12 2002
@@ -23,7 +23,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 /*
- * $Id: chan.h,v 1.30 2002/05/05 16:40:37 tothwolf Exp $
+ * $Id: chan.h,v 1.31 2002/10/10 05:50:12 wcc Exp $
  */
 
 #ifndef _EGG_CHAN_H
@@ -152,6 +152,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.7/src/chanprog.c
diff -u eggdrop1.7/src/chanprog.c:1.51 eggdrop1.7/src/chanprog.c:1.52
--- eggdrop1.7/src/chanprog.c:1.51	Sat Aug 10 04:31:19 2002
+++ eggdrop1.7/src/chanprog.c	Thu Oct 10 00:50:12 2002
@@ -24,7 +24,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: chanprog.c,v 1.51 2002/08/10 09:31:19 poptix Exp $";
+static const char rcsid[] = "$Id: chanprog.c,v 1.52 2002/10/10 05:50:12 wcc Exp $";
 #endif
 
 #include "main.h"
@@ -217,9 +217,6 @@
   i = count_users(userlist);
   dprintf(idx, _("I am %1$s, running %2$s:  "), botnetnick, ver);
   dprintf(idx, P_("%d user\n", "%d users\n", i), i);
-  dprintf(idx, _("Running on %1$s %2$s\n"), uni_t, vers_t);
-  if (admin[0])
-    dprintf(idx, _("Admin: %s\n"), admin);
   now2 = now - online_since;
   s[0] = 0;
 
@@ -264,6 +261,10 @@
   dprintf(idx, "%s %s  (%s)  %s  %s %4.1f%%\n", _("Online for"),
 	  s, s1, s2, _("cache hit"),
 	  100.0 * ((float) cache_hit) / ((float) (cache_hit + cache_miss)));
+  if (admin[0])
+    dprintf(idx, _("Admin: %s\n"), admin);
+  dprintf(idx, _("Config file: %s\n"), configfile);
+  dprintf(idx, _("OS: %1$s %2$s\n"), uni_t, vers_t);
 }
 
 /* Show all internal state variables
Index: eggdrop1.7/src/misc.c
diff -u eggdrop1.7/src/misc.c:1.69 eggdrop1.7/src/misc.c:1.70
--- eggdrop1.7/src/misc.c:1.69	Fri Sep 20 16:41:49 2002
+++ eggdrop1.7/src/misc.c	Thu Oct 10 00:50:12 2002
@@ -27,7 +27,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: misc.c,v 1.69 2002/09/20 21:41:49 stdarg Exp $";
+static const char rcsid[] = "$Id: misc.c,v 1.70 2002/10/10 05:50:12 wcc Exp $";
 #endif
 
 #include "main.h"
@@ -439,7 +439,7 @@
       break;
     case 'U':
 #ifdef HAVE_UNAME
-      if (!uname(&uname_info)) {
+      if (uname(&uname_info) >= 0) {
 	snprintf(sub, sizeof sub, "%s %s", uname_info.sysname,
 		       uname_info.release);
 	towrite = sub;
----------------------- End of diff -----------------------



More information about the Changes mailing list