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

cvs at eggheads.org cvs at eggheads.org
Sat Jul 9 09:07:59 CST 2011


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2011-07-09 15:07:58 UTC
Committer  : Thomas Sader <thommey at gmail.com>

Modified files:
     THANKS aclocal.m4 config.h.in configure.ac eggdrop.conf
     doc/COMPILE-GUIDE doc/Changes1.6 doc/PATCH-HOWTO
     doc/TEXT-SUBSTITUTIONS doc/Versions doc/tcl-commands.doc
     doc/html/app-textsub.html doc/html/compiling.html
     doc/html/patch-howto.html doc/html/tcl-commands.html
     src/Makefile.in src/dns.c src/eggdrop.h src/main.c src/main.h
     src/mem.c src/misc.c src/modules.c src/modules.h src/patch.h
     src/proto.h src/tcl.c src/tclegg.h src/tclhash.c
     src/compat/Makefile.in src/compat/compat.h src/md5/Makefile.in
     src/mod/module.h src/mod/assoc.mod/Makefile
     src/mod/blowfish.mod/Makefile src/mod/channels.mod/Makefile
     src/mod/compress.mod/Makefile.in
     src/mod/compress.mod/configure.ac src/mod/console.mod/Makefile
     src/mod/ctcp.mod/Makefile src/mod/dns.mod/Makefile.in
     src/mod/dns.mod/configure.ac src/mod/filesys.mod/Makefile
     src/mod/irc.mod/Makefile src/mod/notes.mod/Makefile
     src/mod/seen.mod/Makefile src/mod/server.mod/Makefile
     src/mod/share.mod/Makefile src/mod/transfer.mod/Makefile
     src/mod/uptime.mod/Makefile src/mod/wire.mod/Makefile
     src/mod/woobie.mod/Makefile

Added files:
     src/compat/strdup.c src/compat/strdup.h

Log message:

Backport changes from 1.8. Set eggdrop version to 1.6.21.

---------------------- diff included ----------------------
Index: eggdrop1.6/THANKS
diff -u eggdrop1.6/THANKS:1.8 eggdrop1.6/THANKS:1.9
--- eggdrop1.6/THANKS:1.8	Sun Feb 13 08:19:32 2011
+++ eggdrop1.6/THANKS	Sat Jul  9 09:07:48 2011
@@ -1,4 +1,4 @@
-$Id: THANKS,v 1.8 2011/02/13 14:19:32 simple Exp $:
+$Id: THANKS,v 1.9 2011/07/09 15:07:48 thommey Exp $:
 
 Eggdrop Developers and Contributors
 Last revised: June 16, 2010
@@ -77,6 +77,7 @@
 Adze
 Al3X           Alex                            alex at bmotel.com
 alex323
+AlIt0
                Amir Shalem                     amir at boom.org.il
 AmnesiAc
 Amun
@@ -193,10 +194,12 @@
 derrick
 DFrank
 Dicctr0s
+Digdilem
 digital
 dirtymac
 DocSavag       Jerry Sutton                    jerrystn at ccse.net
 dollar
+Domino
                Donovan Long
 dorgan
 dork
@@ -448,6 +451,7 @@
                Randy Summerfiled
 ranjha
 rastam0n
+Ratler
 |^Raven^|
 rawdon
 ReBEL
Index: eggdrop1.6/aclocal.m4
diff -u eggdrop1.6/aclocal.m4:1.118 eggdrop1.6/aclocal.m4:1.119
--- eggdrop1.6/aclocal.m4:1.118	Fri Apr  1 06:10:08 2011
+++ eggdrop1.6/aclocal.m4	Sat Jul  9 09:07:48 2011
@@ -16,7 +16,7 @@
 dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 dnl
-dnl $Id: aclocal.m4,v 1.118 2011/04/01 12:10:08 pseudo Exp $
+dnl $Id: aclocal.m4,v 1.119 2011/07/09 15:07:48 thommey Exp $
 dnl
 
 
@@ -905,8 +905,8 @@
 dnl
 AC_DEFUN([EGG_TCL_ARG_WITH],
 [
-  AC_ARG_WITH(tcllib, [  --with-tcllib=PATH      full path to Tcl library], [tcllibname="$withval"])
-  AC_ARG_WITH(tclinc, [  --with-tclinc=PATH      full path to Tcl header],  [tclincname="$withval"])
+  AC_ARG_WITH(tcllib, [  --with-tcllib=PATH      full path to Tcl library (e.g. /usr/lib/libtcl8.5.so)], [tcllibname="$withval"])
+  AC_ARG_WITH(tclinc, [  --with-tclinc=PATH      full path to Tcl header (e.g. /usr/include/tcl.h)],  [tclincname="$withval"])
 
   WARN=0
   # Make sure either both or neither $tcllibname and $tclincname are set
@@ -991,6 +991,7 @@
 configure: WARNING:
 
   The file '$tcllibname' given to option --with-tcllib is not valid.
+  Specify the full path including the file name (e.g. /usr/lib/libtcl8.5.so)
 
   configure will now attempt to autodetect both the Tcl library and header.
 
@@ -1020,6 +1021,7 @@
 configure: WARNING:
 
   The file '$tclincname' given to option --with-tclinc is not valid.
+  Specify the full path including the file name (e.g. /usr/include/tcl.h)
 
   configure will now attempt to autodetect both the Tcl library and header.
 
@@ -1286,9 +1288,12 @@
 
   Tcl cannot be found on this system.
 
-  Eggdrop requires Tcl to compile. If you already have Tcl installed on
-  this system, and I just wasn't looking in the right place for it, re-run
-  ./configure using the --with-tcllib='/path/to/libtcl.so' and
+  Eggdrop requires Tcl and the Tcl development files to compile.
+  If you already have Tcl installed on this system, make sure you
+  also have the development files (common package names include
+  'tcl-dev' and 'tcl-devel'). If I just wasn't looking
+  in the right place for it, re-run ./configure using the
+  --with-tcllib='/path/to/libtcl.so' and
   --with-tclinc='/path/to/tcl.h' options.
 
   See doc/COMPILE-GUIDE's 'Tcl Detection and Installation' section for more
@@ -1406,6 +1411,21 @@
   fi
 ])
 
+dnl EGG_TCL_CHECK_NOTIFIER_INIT
+dnl
+AC_DEFUN([EGG_TCL_CHECK_NOTIFIER_INIT],
+[
+  if test "$egg_tcl_changed" = yes; then
+    EGG_CACHE_UNSET(egg_cv_var_tcl_notifier_init)
+  fi
+
+  # Check for Tcl_NotifierProcs member initNotifierProc
+  AC_CHECK_MEMBER([Tcl_NotifierProcs.initNotifierProc], [egg_cv_var_tcl_notifier_init="yes"], [egg_cv_var_tcl_notifier_init="no"], [[#include "$TCLINC/$TCLINCFN"]])
+  if test "$egg_cv_var_tcl_notifier_init" = yes; then
+    AC_DEFINE(HAVE_TCL_NOTIFIER_INIT, 1, [Define for Tcl that has the Tcl_NotiferProcs struct member initNotifierProc (8.4 and later).])
+  fi
+])
+
 
 dnl EGG_TCL_LIB_REQS()
 dnl
Index: eggdrop1.6/config.h.in
diff -u eggdrop1.6/config.h.in:1.59 eggdrop1.6/config.h.in:1.60
--- eggdrop1.6/config.h.in:1.59	Fri Apr  1 06:10:08 2011
+++ eggdrop1.6/config.h.in	Sat Jul  9 09:07:48 2011
@@ -222,6 +222,9 @@
 /* Define to 1 if you have the `strcasecmp' function. */
 #undef HAVE_STRCASECMP
 
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
 /* Define to 1 if you have the `strftime' function. */
 #undef HAVE_STRFTIME
 
@@ -278,6 +281,10 @@
 /* Define for Tcl that has Tcl_GetThreadData() (8.1a2 and later). */
 #undef HAVE_TCL_GETTHREADDATA
 
+/* Define for Tcl that has the Tcl_NotiferProcs struct member initNotifierProc
+   (8.4 and later). */
+#undef HAVE_TCL_NOTIFIER_INIT
+
 /* Define for Tcl that has Tcl_SetNotifier() (8.2b1 and later). */
 #undef HAVE_TCL_SETNOTIFIER
 
Index: eggdrop1.6/configure.ac
diff -u eggdrop1.6/configure.ac:1.41 eggdrop1.6/configure.ac:1.42
--- eggdrop1.6/configure.ac:1.41	Sun Feb 13 08:19:32 2011
+++ eggdrop1.6/configure.ac	Sat Jul  9 09:07:48 2011
@@ -1,11 +1,11 @@
 dnl configure.ac: this file is processed by autoconf to produce ./configure.
 dnl
-dnl $Id: configure.ac,v 1.41 2011/02/13 14:19:32 simple Exp $
+dnl $Id: configure.ac,v 1.42 2011/07/09 15:07:48 thommey Exp $
 
 AC_PREREQ(2.60)
-AC_INIT([Eggdrop],[1.6.20],[bugs at eggheads.org])
+AC_INIT([Eggdrop],[1.6.21],[bugs at eggheads.org])
 AC_COPYRIGHT([Copyright (C) 1999 - 2011 Eggheads Development Team])
-AC_REVISION($Revision: 1.41 $)
+AC_REVISION($Revision: 1.42 $)
 AC_CONFIG_SRCDIR(src/eggdrop.h)
 AC_CONFIG_AUX_DIR(misc)
 AC_CONFIG_HEADER(config.h)
@@ -113,7 +113,7 @@
 
 
 # Checks for functions and their arguments.
-AC_CHECK_FUNCS([clock dprintf fsync getdtablesize getrusage inet_aton isascii mbrlen memcpy memset random rand lrand48 rename setpgid sigaction sigemptyset snprintf strcasecmp strncasecmp uname vsnprintf])
+AC_CHECK_FUNCS([clock dprintf fsync getdtablesize getrusage inet_aton isascii mbrlen memcpy memset random rand lrand48 rename setpgid sigaction sigemptyset snprintf strcasecmp strncasecmp strdup uname vsnprintf])
 AC_FUNC_SELECT_ARGTYPES
 EGG_FUNC_VPRINTF
 AC_FUNC_STRFTIME
@@ -172,6 +172,7 @@
 EGG_TCL_CHECK_GETCURRENTTHREAD
 EGG_TCL_CHECK_GETTHREADDATA
 EGG_TCL_CHECK_SETNOTIFIER
+EGG_TCL_CHECK_NOTIFIER_INIT
 EGG_TCL_LIB_REQS
 EGG_TCL_LUSH
 
Index: eggdrop1.6/doc/COMPILE-GUIDE
diff -u eggdrop1.6/doc/COMPILE-GUIDE:1.14 eggdrop1.6/doc/COMPILE-GUIDE:1.15
--- eggdrop1.6/doc/COMPILE-GUIDE:1.14	Sun Feb 13 08:19:32 2011
+++ eggdrop1.6/doc/COMPILE-GUIDE	Sat Jul  9 09:07:48 2011
@@ -1,7 +1,7 @@
-$Id: COMPILE-GUIDE,v 1.14 2011/02/13 14:19:32 simple Exp $
+$Id: COMPILE-GUIDE,v 1.15 2011/07/09 15:07:48 thommey Exp $
 
 Eggdrop Compile Guide and FAQ
-Last revised: August 20, 2004
+Last revised: February 14, 2010
     _____________________________________________________________________
 
                         Eggdrop Compile Guide and FAQ
@@ -25,8 +25,9 @@
       D. Mac OS X
       E. AIX
       F. IRIX
-      G. Cygwin / Windows
-      H. Tcl Detection and Installation
+      G. Solaris / SunOS
+      H. Cygwin / Windows
+      I. Tcl Detection and Installation
 
     Frequently Asked Questions:
       1. I get a lot of warnings.
@@ -75,7 +76,7 @@
 
            --with-tcllib
            --with-tclinc
-             See 'E. Tcl Detection and Installation' below (at the end of this
+             See 'I. Tcl Detection and Installation' below (at the end of this
              compile guide).
 
       2. Type either 'make config', or 'make iconfig' to determine which
@@ -252,7 +253,7 @@
            This is usually something like 'C:\cygwin\home\<username>\'. After
            downloading, extract the Eggdrop tarball:
 
-             tar -zxf eggdrop1.6.20.tar.gz
+             tar -zxf eggdrop1.6.21.tar.gz
 
         4. Run './configure --enable-strip'. Debugging information under
            Windows is basically useless to the development team, and this will
@@ -276,8 +277,8 @@
              cd 'C:/<install path>/' (example: cd 'C:/eggdrop')
              rm modules
              rm eggdrop.exe
-             mv eggdrop.exe-1.6.20 eggdrop.exe
-             mv modules-1.6.20 modules
+             mv eggdrop.exe-1.6.21 eggdrop.exe
+             mv modules-1.6.21 modules
 
         9. Create a 'lib' directory and copy needed libraries using the
            following commands. This assumes that you installed your Eggdrop in
Index: eggdrop1.6/doc/Changes1.6
diff -u eggdrop1.6/doc/Changes1.6:1.99 eggdrop1.6/doc/Changes1.6:1.100
--- eggdrop1.6/doc/Changes1.6:1.99	Fri Apr  1 06:22:15 2011
+++ eggdrop1.6/doc/Changes1.6	Sat Jul  9 09:07:48 2011
@@ -1,4 +1,4 @@
-$Id: Changes1.6,v 1.99 2011/04/01 12:22:15 pseudo Exp $
+$Id: Changes1.6,v 1.100 2011/07/09 15:07:48 thommey Exp $
 
 Eggdrop Changes (since version 1.6.0)
 
@@ -6,6 +6,32 @@
 
 1.6.21 (CVS):
 
+  - Make sure to account for null termination when using Tcl_ScanElement
+    to generate a string representation of a list using Tcl_ConvertElement.
+    A behavioural change in Tcl8.5.10 revealed this bug.
+    Found by: various / Patch by: thommey
+
+  - Fixed reentrance issues with the replacement Tcl notifier. It is now safe
+    for dns callbacks to call vwait/update. Execution of Tcl snippets in do_tcl
+    is now asynchronous and actually performed at the end of mainloop().
+    Found by: Ratler, various / Patch by: thommey
+
+  - do_restart is now reset before actually performing a rehash or restart to
+    ensure it doesn't try to do it again infinitely.
+    Found by: Domino / Patch by: thommey
+
+  - Clarified --with-tcl* usage in configure and mentioned tcl-dev packages.
+  - Fixed some section numbering in doc/COMPILE-GUIDE.
+    Patch by: thommey
+
+  - Fix env(TZ) config setting to not contain a space. The space is just
+    inserted in POSIX documentation to clarify, it must not be there.
+    Found by: Digdilem / Patch by: thommey
+
+  - Added detection of Tcl_NotifierProcs members to ensure the notifier can
+    be replaced. Fixes compilation against Tcl 8.2 and 8.3.
+    Found by: AlIt0 / Patch by: thommey
+
   - Fixed getudef() to return intptr_t instead of int to prevent crashes on
     64-bit systems.
     Found by: izy` / Patch by: pseudo
@@ -30,6 +56,8 @@
 
 1.6.20 (July 23, 2010):
 
+  # RC2 released on July 15th, 2010.
+
   - Add sanity check to check-stoned event. Prevents eggdrop from
     disconnecting in case of drift timers.
   - Unwind all nested [vwait] calls before performing a restart.
Index: eggdrop1.6/doc/PATCH-HOWTO
diff -u eggdrop1.6/doc/PATCH-HOWTO:1.15 eggdrop1.6/doc/PATCH-HOWTO:1.16
--- eggdrop1.6/doc/PATCH-HOWTO:1.15	Sun Feb 13 08:19:32 2011
+++ eggdrop1.6/doc/PATCH-HOWTO	Sat Jul  9 09:07:48 2011
@@ -1,4 +1,4 @@
-$Id: PATCH-HOWTO,v 1.15 2011/02/13 14:19:32 simple Exp $
+$Id: PATCH-HOWTO,v 1.16 2011/07/09 15:07:48 thommey Exp $
 
 Patch Howto
 Last revised: July 23, 2004
@@ -32,7 +32,7 @@
     To apply a patch to an Eggdrop, you have to first obtain the Eggdrop
     source code. You should always keep a tar.gz archive with the source of
     your current Eggdrop on your shell. In the next step, you have to change
-    to your source directory (i.e.: /home/user/eggdrop1.6.20/) and type
+    to your source directory (i.e.: /home/user/eggdrop1.6.21/) and type
     the following command:
 
       patch -p1 < ../path.to.the/patch
Index: eggdrop1.6/doc/TEXT-SUBSTITUTIONS
diff -u eggdrop1.6/doc/TEXT-SUBSTITUTIONS:1.13 eggdrop1.6/doc/TEXT-SUBSTITUTIONS:1.14
--- eggdrop1.6/doc/TEXT-SUBSTITUTIONS:1.13	Sun Feb 13 08:19:32 2011
+++ eggdrop1.6/doc/TEXT-SUBSTITUTIONS	Sat Jul  9 09:07:48 2011
@@ -1,4 +1,4 @@
-$Id: TEXT-SUBSTITUTIONS,v 1.13 2011/02/13 14:19:32 simple Exp $
+$Id: TEXT-SUBSTITUTIONS,v 1.14 2011/07/09 15:07:48 thommey Exp $
 
 Textfile Substitutions
 Last revised: March 08, 2002
@@ -23,9 +23,9 @@
 
  %B   bot's nickname (i.e. "LamestBot")
 
- %V   current Eggdrop version (i.e. "eggdrop v1.6.20")
+ %V   current Eggdrop version (i.e. "eggdrop v1.6.21")
 
- %E   long form of %V (i.e. "Eggdrop v1.6.20 (C) 1997 Robey Pointer (C) 2011 Eggheads Development Team")
+ %E   long form of %V (i.e. "Eggdrop v1.6.21 (C) 1997 Robey Pointer (C) 2011 Eggheads Development Team")
 
  %C   channels the bot is on (i.e. "#lamest, #botnetcentral")
 
Index: eggdrop1.6/doc/Versions
diff -u eggdrop1.6/doc/Versions:1.8 eggdrop1.6/doc/Versions:1.9
--- eggdrop1.6/doc/Versions:1.8	Sun Feb 13 08:19:32 2011
+++ eggdrop1.6/doc/Versions	Sat Jul  9 09:07:48 2011
@@ -1,4 +1,4 @@
-$Id: Versions,v 1.8 2011/02/13 14:19:32 simple Exp $
+$Id: Versions,v 1.9 2011/07/09 15:07:48 thommey Exp $
 
 This file lists the release dates for most of the officially released
 versions of Eggdrop and notes forks, bug fix patches and maintenance
@@ -8,38 +8,40 @@
 get in contact via the email lists at http://www.eggheads.org so it can be
 added.
 
-Version    Release date
+Version        Release date  Description
 
-1.6.20     Jul 23, 2010
-1.6.19     Apr 18, 2008  Fix for Secunia Advisory SA25276 / CVE-2007-2807
-1.6.18     Jul  9, 2006  Major bind code function changes
-1.6.17     Aug 22, 2004
-1.6.16     May 31, 2004  Fix for Secunia Advisory SA10858
-1.6.15     May  4, 2003
-1.6.14     May  4, 2003
-1.6.13     Nov 22, 2002
-1.6.12     Jul 26, 2002
-1.6.11     Jul 26, 2002
-1.6.10     Mar 29, 2002
-1.6.9      Mar 10, 2002
-1.6.8      Jan  2, 2002
-1.6.7      Dec  7, 2001
-1.6.6      Jul 20, 2001
-1.6.5      Jul 10, 2001
-1.6.4      Apr 13, 2001
-1.6.3      Feb 27, 2001  Eggdrop won't load as 'root' anymore
-1.6.2      Jan 14, 2001
-1.6.1      Nov 22, 2000
-1.6.0      Nov 15, 2000  Will load with threaded Tcl now
-
-1.5.4      Aug 22, 2000
-1.5.3      May  7, 2000  Compress module added, share code moved to a module
-1.5.2      Feb  4, 2000
+1.6.21         TBD
+1.6.20         Jul 23, 2010
+1.6.19+ctcpfix May 14, 2009  Fix for Secunia Advisory SA35104 / CVE-2009-1789
+1.6.19         Apr 18, 2008  Fix for Secunia Advisory SA25276 / CVE-2007-2807
+1.6.18         Jul  9, 2006  Major bind code function changes
+1.6.17         Aug 22, 2004
+1.6.16         May 31, 2004  Fix for Secunia Advisory SA10858
+1.6.15         May  4, 2003
+1.6.14         May  4, 2003
+1.6.13         Nov 22, 2002
+1.6.12         Jul 26, 2002
+1.6.11         Jul 26, 2002
+1.6.10         Mar 29, 2002
+1.6.9          Mar 10, 2002
+1.6.8          Jan  2, 2002
+1.6.7          Dec  7, 2001
+1.6.6          Jul 20, 2001
+1.6.5          Jul 10, 2001
+1.6.4          Apr 13, 2001
+1.6.3          Feb 27, 2001  Eggdrop won't load as 'root' anymore
+1.6.2          Jan 14, 2001
+1.6.1          Nov 22, 2000
+1.6.0          Nov 15, 2000  Will load with threaded Tcl now
+
+1.5.4          Aug 22, 2000
+1.5.3          May  7, 2000  Compress module added, share code moved to a module
+1.5.2          Feb  4, 2000
 1.5.1
-1.5.0                    Initial asynchronous DNS support
-                         Initial penalty calculation support
-                         Complete rewrite of filesys module
-                         Major changes to transfer module for DCC RESUME
+1.5.0                        Initial asynchronous DNS support
+                             Initial penalty calculation support
+                             Complete rewrite of filesys module
+                             Major changes to transfer module for DCC RESUME
 
   Versions 1.5.x were development test versions so their release dates
   overlap with 1.4.x.
Index: eggdrop1.6/doc/html/app-textsub.html
diff -u eggdrop1.6/doc/html/app-textsub.html:1.31 eggdrop1.6/doc/html/app-textsub.html:1.32
--- eggdrop1.6/doc/html/app-textsub.html:1.31	Sun Feb 13 08:19:32 2011
+++ eggdrop1.6/doc/html/app-textsub.html	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: app-textsub.html,v 1.31 2011/02/13 14:19:32 simple Exp $ -->
+<!-- $Id: app-textsub.html,v 1.32 2011/07/09 15:07:48 thommey Exp $ -->
 
 <html>
   <head>
@@ -47,11 +47,11 @@
 
         <dt><strong>%V</strong></dt>
 
-        <dd>current Eggdrop version (i.e. &quot;eggdrop v1.6.20&quot;)</dd>
+        <dd>current Eggdrop version (i.e. &quot;eggdrop v1.6.21&quot;)</dd>
 
         <dt><strong>%E</strong></dt>
 
-        <dd>long form of %V (i.e. &quot;Eggdrop v1.6.20 (C) 1997 Robey Pointer
+        <dd>long form of %V (i.e. &quot;Eggdrop v1.6.21 (C) 1997 Robey Pointer
         (C) 2011 Eggheads Development Team&quot;)</dd>
 
         <dt><strong>%C</strong></dt>
Index: eggdrop1.6/doc/html/compiling.html
diff -u eggdrop1.6/doc/html/compiling.html:1.43 eggdrop1.6/doc/html/compiling.html:1.44
--- eggdrop1.6/doc/html/compiling.html:1.43	Sun Feb 13 08:19:32 2011
+++ eggdrop1.6/doc/html/compiling.html	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: compiling.html,v 1.43 2011/02/13 14:19:32 simple Exp $ -->
+<!-- $Id: compiling.html,v 1.44 2011/07/09 15:07:48 thommey Exp $ -->
 
 <html>
   <head>
@@ -113,7 +113,7 @@
 
             <li><strong>--with-tcllib</strong></li>
             <li><strong>--with-tclinc</strong><br>
-            See <a href="#cg5">E. Tcl Detection and Installation</a> below (at
+            See <a href="#cg9">I. Tcl Detection and Installation</a> below (at
             the end of this compile guide).</li>
           </ul>
           <br>
@@ -373,7 +373,7 @@
 
           <blockquote>
 <pre>
-tar -zxf eggdrop1.6.20.tar.gz
+tar -zxf eggdrop1.6.21.tar.gz
 </pre>
           </blockquote></li>
 
@@ -407,8 +407,8 @@
 cd &#39;C:/&lt;install path&gt;/&#39; (example: cd &#39;C:/eggdrop&#39;)
 rm modules
 rm eggdrop.exe
-mv eggdrop.exe-1.6.20 eggdrop.exe
-mv modules-1.6.20 modules
+mv eggdrop.exe-1.6.21 eggdrop.exe
+mv modules-1.6.21 modules
 </pre>
           </blockquote></li>
 
Index: eggdrop1.6/doc/html/patch-howto.html
diff -u eggdrop1.6/doc/html/patch-howto.html:1.15 eggdrop1.6/doc/html/patch-howto.html:1.16
--- eggdrop1.6/doc/html/patch-howto.html:1.15	Sun Feb 13 08:19:32 2011
+++ eggdrop1.6/doc/html/patch-howto.html	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: patch-howto.html,v 1.15 2011/02/13 14:19:32 simple Exp $ -->
+<!-- $Id: patch-howto.html,v 1.16 2011/07/09 15:07:48 thommey Exp $ -->
 
 <html>
   <head>
@@ -52,7 +52,7 @@
     <p>To apply a patch to an Eggdrop, you have to first obtain the Eggdrop
     source code. You should always keep a tar.gz archive with the source of
     your current Eggdrop on your shell. In the next step, you have to change
-    to your source directory (i.e.: /home/user/eggdrop1.6.20/) and type
+    to your source directory (i.e.: /home/user/eggdrop1.6.21/) and type
     the following command:</p>
 
     <blockquote>
Index: eggdrop1.6/doc/html/tcl-commands.html
diff -u eggdrop1.6/doc/html/tcl-commands.html:1.71 eggdrop1.6/doc/html/tcl-commands.html:1.72
--- eggdrop1.6/doc/html/tcl-commands.html:1.71	Sun Feb 13 08:19:32 2011
+++ eggdrop1.6/doc/html/tcl-commands.html	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: tcl-commands.html,v 1.71 2011/02/13 14:19:32 simple Exp $ -->
+<!-- $Id: tcl-commands.html,v 1.72 2011/07/09 15:07:48 thommey Exp $ -->
 
 <html>
   <head>
@@ -128,7 +128,7 @@
           <p><strong>Module:</strong> server</p>
         </dd>
 
-        <dt><strong><a name="cmd_putnow"></a>putnow &lt;text&gt; [-oneline]</strong></dt>*
+        <dt><strong><a name="cmd_putnow"></a>putnow &lt;text&gt; [-oneline]</strong></dt>
 
         <dd>
           <p><strong>Description:</strong> sends text to the server
@@ -1171,7 +1171,7 @@
           <p><strong>Module:</strong> core</p>
         </dd>
 
-        <dt><strong><a name="cmd_backup"></a>backup</strong></dt>*
+        <dt><strong><a name="cmd_backup"></a>backup</strong></dt>
 
         <dd>
           <p><strong>Description:</strong> makes a simple backup of the
@@ -1553,7 +1553,7 @@
         </dd>
 
         <dt><strong><a name="cmd_resetchanidle"></a>resetchanidle [nick]
-        &lt;channel&gt;</strong></dt>*
+        &lt;channel&gt;</strong></dt>
 
         <dd>
           <p><strong>Description:</strong> resets the channel idle time for
@@ -1566,7 +1566,7 @@
         </dd>
 
         <dt><strong><a name="cmd_resetchanjoin"></a>resetchanjoin [nick]
-        &lt;channel&gt;</strong></dt>*
+        &lt;channel&gt;</strong></dt>
 
         <dd>
           <p><strong>Description:</strong> resets the channel join time for
@@ -1579,7 +1579,7 @@
         </dd>
 
         <dt><strong><a name="cmd_resetchan"></a>resetchan &lt;channel&gt;
-	[flags]</strong></dt>*
+	[flags]</strong></dt>
 
         <dd>
           <p><strong>Description:</strong> rereads in the channel info from
@@ -3011,7 +3011,7 @@
         </dd>
 
         <dt><strong><a name="cmd_maskhost"></a>maskhost &lt;nick!user at host&gt;
-        [masktype]</strong></dt>*
+        [masktype]</strong></dt>
 
         <dd>
           <p><strong>Description:</strong> masks the given irc hostmask, so
@@ -3649,7 +3649,7 @@
 
 
         <dt><strong><a name="cmd_matchaddr"></a>matchaddr &lt;hostmask&gt;
-        &lt;address&gt;</strong></dt>*
+        &lt;address&gt;</strong></dt>
 
         <dd>
           <p><strong>Description:</strong> checks if the address matches the
@@ -3663,7 +3663,7 @@
 
 
         <dt><strong><a name="cmd_matchcidr"></a>matchcidr &lt;block&gt;
-        &lt;address&gt; &lt;prefix&gt;</strong></dt>*
+        &lt;address&gt; &lt;prefix&gt;</strong></dt>
 
         <dd>
           <p><strong>Description:</strong> performs a cidr match on the
@@ -3678,7 +3678,7 @@
 
 
         <dt><strong><a name="cmd_matchstr"></a>matchstr &lt;pattern&gt;
-        &lt;string&gt;</strong></dt>*
+        &lt;string&gt;</strong></dt>
 
         <dd>
           <p><strong>Description:</strong> checks if pattern matches string.
@@ -4811,7 +4811,7 @@
             </li>
 
             <li>
-              <p><a name="binda_out"></a><strong>OUT (stackable)</strong></p>*
+              <p><a name="binda_out"></a><strong>OUT (stackable)</strong></p>
 
               <p><strong>bind out &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
               proc-name &lt;queue&gt; &lt;text&gt; &lt;queued|sent&gt;
@@ -4830,7 +4830,7 @@
             </li>
 
             <li>
-              <p><a name="binda_cron"></a><strong>CRON (stackable)</strong></p>*
+              <p><a name="binda_cron"></a><strong>CRON (stackable)</strong></p>
 
               <p><strong>bind cron &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
               proc-name &lt;minute&gt; &lt;hour&gt; &lt;day&gt; &lt;weekday&gt;
@@ -4853,7 +4853,7 @@
             </li>
 
             <li>
-              <p><a name="binda_log"></a><strong>LOG (stackable)</strong></p>*
+              <p><a name="binda_log"></a><strong>LOG (stackable)</strong></p>
 
               <p><strong>bind log &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
               proc-name &lt;level&gt; &lt;channel&gt; &lt;message&gt;</strong>
Index: eggdrop1.6/doc/tcl-commands.doc
diff -u eggdrop1.6/doc/tcl-commands.doc:1.137 eggdrop1.6/doc/tcl-commands.doc:1.138
--- eggdrop1.6/doc/tcl-commands.doc:1.137	Sun Feb 13 08:19:32 2011
+++ eggdrop1.6/doc/tcl-commands.doc	Sat Jul  9 09:07:48 2011
@@ -1,7 +1,7 @@
-$Id: tcl-commands.doc,v 1.137 2011/02/13 14:19:32 simple Exp $
+$Id: tcl-commands.doc,v 1.138 2011/07/09 15:07:48 thommey Exp $
 
 Eggdrop Tcl Commands
-Last revised: November 23, 2009
+Last revised: February 14, 2010
     _____________________________________________________________________
 
                            Eggdrop Tcl Commands
@@ -12,7 +12,7 @@
 can also use these to manipulate features of the bot. They are listed
 according to category.
 
-This list is accurate for Eggdrop v1.6.18. Scripts written for v1.3/v1.4
+This list is accurate for Eggdrop v1.6.21. Scripts written for v1.3/v1.4
 series of Eggdrop should probably work with a few minor modifications
 depending on the script. Scripts which were written for  v0.9, v1.0, v1.1
 or v1.2 will probably not work without modification. Commands which have
@@ -50,13 +50,13 @@
     Returns: nothing
     Module: server
 
-| putnow <text> [-oneline]
-|   Description: sends text to the server immediately, bypassing all queues.
-|     Use with caution, as the bot may easily flood itself off the server.
-|   Options:
-|     -oneline: send text up to the first \r or \n, discarding the rest
-|   Returns: nothing
-|   Module: server
+  putnow <text> [-oneline]
+    Description: sends text to the server immediately, bypassing all queues.
+      Use with caution, as the bot may easily flood itself off the server.
+    Options:
+      -oneline: send text up to the first \r or \n, discarding the rest
+    Returns: nothing
+    Module: server
 
   putkick <channel> <nick,nick,...> [reason]
     Description: sends kicks to the server and tries to put as many nicks
@@ -736,30 +736,30 @@
     Returns: nothing
     Module: irc
 
-| resetchanidle [nick] <channel>
-|   Description: resets the channel idle time for the given nick or for all
-|     nicks on the channel if no nick is specified.
-|   Returns: nothing
-|   Module: irc
-
-| resetchanjoin [nick] <channel>
-|   Description: resets the channel join time for the given nick or for all
-|     nicks on the channel if no nick is specified.
-|   Returns: nothing
-|   Module: irc
-
-| resetchan <channel> [flags]
-|   Description: rereads in the channel info from the server. If flags are
-|     specified, only the required information will be reset, according to
-|     the given flags. Available flags:
-|       b - reset channel bans
-|       e - reset channel exempts
-|       I - reset channel invites
-|       m - refresh channel modes 
-|       t - refresh channel topic
-|       w - refresh memberlist
-|   Returns: nothing
-|   Module: irc
+  resetchanidle [nick] <channel>
+    Description: resets the channel idle time for the given nick or for all
+      nicks on the channel if no nick is specified.
+    Returns: nothing
+    Module: irc
+
+  resetchanjoin [nick] <channel>
+    Description: resets the channel join time for the given nick or for all
+      nicks on the channel if no nick is specified.
+    Returns: nothing
+    Module: irc
+
+  resetchan <channel> [flags]
+    Description: rereads in the channel info from the server. If flags are
+      specified, only the required information will be reset, according to
+      the given flags. Available flags:
+        b - reset channel bans
+        e - reset channel exempts
+        I - reset channel invites
+        m - refresh channel modes 
+        t - refresh channel topic
+        w - refresh memberlist
+    Returns: nothing
+    Module: irc
 
   getchanhost <nickname> [channel]
     Returns: user at host of the specified nickname (the nickname is not included
@@ -1341,26 +1341,26 @@
       list of logfiles such as: {mco * eggdrop.log} {jp #lame lame.log}
     Module: core
 
-| maskhost <nick!user at host> [masktype]
-|   Returns: masked hostmask for the string given according to the masktype
-|     (the default is 3).
-|     Available types are:
-|       0: *!user at host
-|       1: *!*user at host
-|       2: *!*@host
-|       3: *!*user@*.host
-|       4: *!*@*.host
-|       5: nick!user at host
-|       6: nick!*user at host
-|       7: nick!*@host
-|       8: nick!*user@*.host
-|       9: nick!*@*.host
-|     You can also specify types from 10 to 19 which correspond to types
-|     0 to 9, but instead of using a * wildcard to replace portions of the
-|     host, only numbers in hostnames are replaced with the '?' wildcard.
-|     Same is valid for types 20-29, but instead of '?', the '*' wildcard
-|     will be used.
-|   Module: core
+  maskhost <nick!user at host> [masktype]
+    Returns: masked hostmask for the string given according to the masktype
+      (the default is 3).
+      Available types are:
+        0: *!user at host
+        1: *!*user at host
+        2: *!*@host
+        3: *!*user@*.host
+        4: *!*@*.host
+        5: nick!user at host
+        6: nick!*user at host
+        7: nick!*@host
+        8: nick!*user@*.host
+        9: nick!*@*.host
+      You can also specify types from 10 to 19 which correspond to types
+      0 to 9, but instead of using a * wildcard to replace portions of the
+      host, only numbers in hostnames are replaced with the '?' wildcard.
+      Same is valid for types 20-29, but instead of '?', the '*' wildcard
+      will be used.
+    Module: core
 
   timer <minutes> <tcl-command>
     Description: executes the given Tcl command after a certain number of
@@ -1576,25 +1576,25 @@
     Returns: the stripped string.
     Module: core
 
-| matchaddr <hostmask> <address>
-|   Description: checks if the address matches the hostmask given. The
-|     address should be in the form nick!user at host.
-|   Returns: 1 if the address matches the hostmask, 0 otherwise.
-|   Module: core
-
-|  matchcidr <block> <address> <prefix>
-|   Description: performs a cidr match on the specified ip addresses.
-|     IPv6 is supported, if enabled at compile time.
-|       Example: matchcidr 192.168.0.0 192.168.1.17 16
-|   Returns: 1 if the address matches the block prefix, 0 otherwise.
-|   Module: core
-
-|  matchstr <pattern> <string>
-|   Description: checks if pattern matches string. Only two wildcards are
-|     supported: '*' and '?'. Matching is case-insensitive. This command
-|     is intended as a simplified alternative to Tcl's string match.  
-|   Returns: 1 if the pattern matches the string, 0 if it doesn't.
-|   Module: core
+  matchaddr <hostmask> <address>
+    Description: checks if the address matches the hostmask given. The
+      address should be in the form nick!user at host.
+    Returns: 1 if the address matches the hostmask, 0 otherwise.
+    Module: core
+
+   matchcidr <block> <address> <prefix>
+    Description: performs a cidr match on the specified ip addresses.
+      IPv6 is supported, if enabled at compile time.
+        Example: matchcidr 192.168.0.0 192.168.1.17 16
+    Returns: 1 if the address matches the block prefix, 0 otherwise.
+    Module: core
+
+   matchstr <pattern> <string>
+    Description: checks if pattern matches string. Only two wildcards are
+      supported: '*' and '?'. Matching is case-insensitive. This command
+      is intended as a simplified alternative to Tcl's string match.  
+    Returns: 1 if the pattern matches the string, 0 if it doesn't.
+    Module: core
 
 *** GLOBAL VARIABLES ***
 
@@ -1727,11 +1727,11 @@
 
          Description: matches the entire line of text from a /msg with the
            mask. This is useful for binding Tcl procs to words or phrases
-|          spoken anywhere within a line of text. If the proc returns 1,
-|          Eggdrop will not log the message that triggered this bind.
-|          MSGM binds are processed before MSG binds. If the exclusive-binds
-|          setting is enabled, MSG binds will not be triggered by text that
-|          a MSGM bind has already handled.
+           spoken anywhere within a line of text. If the proc returns 1,
+           Eggdrop will not log the message that triggered this bind.
+           MSGM binds are processed before MSG binds. If the exclusive-binds
+           setting is enabled, MSG binds will not be triggered by text that
+           a MSGM bind has already handled.
          Module: server
 
     (6)  PUBM (stackable)
@@ -1741,11 +1741,11 @@
          Description: just like MSGM, except it's triggered by things said
            on a channel instead of things /msg'd to the bot. The mask is
            matched against the channel name followed by the text and can
-|          contain wildcards. If the proc returns 1, Eggdrop will not log
-|          the message that triggered this bind. PUBM binds are processed
-|          before PUB binds. If the exclusive-binds setting is enabled,
-|          PUB binds will not be triggered by text that a PUBM bind has
-|          already handled.
+           contain wildcards. If the proc returns 1, Eggdrop will not log
+           the message that triggered this bind. PUBM binds are processed
+           before PUB binds. If the exclusive-binds setting is enabled,
+           PUB binds will not be triggered by text that a PUBM bind has
+           already handled.
          Module: irc
 
     (7)  NOTC (stackable)
@@ -1757,8 +1757,8 @@
            notice and can contain wildcards. It is considered a breach of
            protocol to respond to a /notice on IRC, so this is intended for
            internal use (logging, etc.) only. Note that server notices do
-|          not trigger the NOTC bind. If the proc returns 1, Eggdrop will
-|          not log the message that triggered this bind.
+           not trigger the NOTC bind. If the proc returns 1, Eggdrop will
+           not log the message that triggered this bind.
 
            New Tcl procs should be declared as
              proc notcproc {nick uhost hand text {dest ""}} {
@@ -2050,16 +2050,16 @@
            "*" for the bind); flags are ignored.
          Module: server
 
-|   (31) NOTE (stackable)
-|        bind note <flags> <mask> <proc>
-|        procname <from> <to> <text>
-|
-|        Description: incoming notes (either from the party line, someone on
-|          IRC, or someone on another bot on the botnet) are checked against
-|          these binds before being processed. The mask is matched against
-|          the receiving handle and supports wildcards. If the proc returns 1,
-|          Eggdrop will not process the note any further. Flags are ignored.
-|        Module: core
+    (31) NOTE (stackable)
+         bind note <flags> <mask> <proc>
+         procname <from> <to> <text>
+ 
+         Description: incoming notes (either from the party line, someone on
+           IRC, or someone on another bot on the botnet) are checked against
+           these binds before being processed. The mask is matched against
+           the receiving handle and supports wildcards. If the proc returns 1,
+           Eggdrop will not process the note any further. Flags are ignored.
+         Module: core
 
     (32) ACT (stackable)
          bind act <flags> <mask> <proc>
@@ -2079,8 +2079,8 @@
           of the wallops msg. Note that RFC shows the server name as a source
           of the message, whereas many IRCds send the nick!user at host of the
           actual sender, thus, Eggdrop will not parse it at all, but simply
-|         pass it to bind in its original form. If the proc returns 1,
-|         Eggdrop will not log the message that triggered this bind.
+          pass it to bind in its original form. If the proc returns 1,
+          Eggdrop will not log the message that triggered this bind.
         Module: server
 
     (34) BCST (stackable)
@@ -2207,47 +2207,47 @@
            because the data transfer stalled for some reason.
          Module: transfer
 
-|   (45) OUT (stackable)
-|        bind out <flags> <mask> <proc>
-|        proc-name <queue> <message> <queued|sent>
-|
-|        Description: triggered whenever output is sent to the server. Normally
-|          the event will occur twice for each line sent: once before entering
-|          a server queue and once after the message is actually sent. This
-|          allows for more flexible logging of server output and introduces
-|          the ability to cancel the message.
-|          Mask is matched against "queue status", where status is either
-|          'queued' or 'sent'. Queues are: mode, server, help, noqueue.
-|          noqueue is only used by the putnow tcl command.
-|        Module: server
-
-|   (46) CRON (stackable)
-|        bind cron <flags> <mask> <proc>
-|        proc-name <minute> <hour> <day> <month> <weekday>
-|
-|        Description: similar to bind TIME, but the mask is evaluated as a cron
-|          expression, e.g. "16/2 */2 5-15 7,8,9 4". It can contain up to five
-|          fields: minute, hour, day, month, weekday; delimited by whitespace.
-|          Week days are represented as 0-6, where Sunday can be either 0 or 7.
-|          Symbolic names are not supported. The bind will be triggered if the
-|          mask matches all of the fields, except that if both day and weekday
-|          are not '*', only one of them is required to match. If any number of
-|          fields are omitted at the end, the match will proceed as if they were
-|          '*'. All cron operators are supported. Please refer to the crontab
-|          manual for their meanings. Flags are ignored.
-|        Module: core
-
-|   (47) LOG (stackable)
-|        bind log <flags> <mask> <proc>
-|        proc-name <level> <channel> <message>
-|
-|        Description: triggered whenever a message is sent to a log. The mask is
-|          matched against "channel text".
-|          The level argument to the proc will contain the level(s) the message
-|          is sent to, or '*' if the message is sent to all log levels at once.
-|          If the message wasn't sent to a specific channel, channel will be set
-|          to '*'.
-|        Module: core
+    (45) OUT (stackable)
+         bind out <flags> <mask> <proc>
+         proc-name <queue> <message> <queued|sent>
+
+         Description: triggered whenever output is sent to the server. Normally
+           the event will occur twice for each line sent: once before entering
+           a server queue and once after the message is actually sent. This
+           allows for more flexible logging of server output and introduces
+           the ability to cancel the message.
+           Mask is matched against "queue status", where status is either
+           'queued' or 'sent'. Queues are: mode, server, help, noqueue.
+           noqueue is only used by the putnow tcl command.
+         Module: server
+
+    (46) CRON (stackable)
+         bind cron <flags> <mask> <proc>
+         proc-name <minute> <hour> <day> <month> <weekday>
+
+         Description: similar to bind TIME, but the mask is evaluated as a cron
+           expression, e.g. "16/2 */2 5-15 7,8,9 4". It can contain up to five
+           fields: minute, hour, day, month, weekday; delimited by whitespace.
+           Week days are represented as 0-6, where Sunday can be either 0 or 7.
+           Symbolic names are not supported. The bind will be triggered if the
+           mask matches all of the fields, except that if both day and weekday
+           are not '*', only one of them is required to match. If any number of
+           fields are omitted at the end, the match will proceed as if they were
+           '*'. All cron operators are supported. Please refer to the crontab
+           manual for their meanings. Flags are ignored.
+         Module: core
+
+    (47) LOG (stackable)
+         bind log <flags> <mask> <proc>
+         proc-name <level> <channel> <message>
+
+         Description: triggered whenever a message is sent to a log. The mask is
+           matched against "channel text".
+           The level argument to the proc will contain the level(s) the message
+           is sent to, or '*' if the message is sent to all log levels at once.
+           If the message wasn't sent to a specific channel, channel will be set
+           to '*'.
+         Module: core
 
   (B) RETURN VALUES
 
@@ -2293,25 +2293,25 @@
 
     (10) CHOF  Return 1 to ask the bot not to process the partyline part event.
 
-|   (11) WALL  Return 1 to make Eggdrop not log the message that triggered
-|              this bind.
+    (11) WALL  Return 1 to make Eggdrop not log the message that triggered
+               this bind.
 
-|   (12) NOTE  Return 1 to make Eggdrop not process the note any further.
-|              This includes stacked note bindings that would be processed
-|              after this one, as well as the built-in eggdrop note handling
-|              routines.
+    (12) NOTE  Return 1 to make Eggdrop not process the note any further.
+               This includes stacked note bindings that would be processed
+               after this one, as well as the built-in eggdrop note handling
+               routines.
 
-|   (13) MSGM  Return 1 to make Eggdrop not log the message that triggered
-|              this bind.
+    (13) MSGM  Return 1 to make Eggdrop not log the message that triggered
+               this bind.
 
-|   (14) PUBM  Return 1 to make Eggdrop not log the message that triggered
-|              this bind.
+    (14) PUBM  Return 1 to make Eggdrop not log the message that triggered
+               this bind.
 
-|   (15) NOTC  Return 1 to make Eggdrop not log the message that triggered
-|              this bind.
+    (15) NOTC  Return 1 to make Eggdrop not log the message that triggered
+               this bind.
 
-|   (16) OUT   Return 1 to make Eggdrop drop the message instead of sending
-|              it. Only meaningful for messages with status "queued".
+    (16) OUT   Return 1 to make Eggdrop drop the message instead of sending
+               it. Only meaningful for messages with status "queued".
 
 *** CONTROL PROCEDURES ***
 
Index: eggdrop1.6/eggdrop.conf
diff -u eggdrop1.6/eggdrop.conf:1.67 eggdrop1.6/eggdrop.conf:1.68
--- eggdrop1.6/eggdrop.conf:1.67	Fri Apr  1 05:59:49 2011
+++ eggdrop1.6/eggdrop.conf	Sat Jul  9 09:07:48 2011
@@ -1,7 +1,7 @@
 #! /path/to/executable/eggdrop
 # ^- This should contain a fully qualified path to your Eggdrop executable.
 #
-# $Id: eggdrop.conf,v 1.67 2011/04/01 11:59:49 pseudo Exp $
+# $Id: eggdrop.conf,v 1.68 2011/07/09 15:07:48 thommey Exp $
 #
 # This is a sample Eggdrop configuration file which includes all possible
 # settings that can be used to configure your bot.
@@ -49,7 +49,7 @@
 
 # If you don't want to use the timezone setting for scripting purposes only,
 # but instead everywhere possible, un-comment the following line.
-#set env(TZ) "$timezone $offset"
+#set env(TZ) "$timezone$offset"
 
 # If you're using virtual hosting (your machine has more than 1 IP), you
 # may want to specify the particular IP to bind to. You can specify either
Index: eggdrop1.6/src/Makefile.in
diff -u eggdrop1.6/src/Makefile.in:1.23 eggdrop1.6/src/Makefile.in:1.24
--- eggdrop1.6/src/Makefile.in:1.23	Mon Nov 20 05:38:25 2006
+++ eggdrop1.6/src/Makefile.in	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/
-# $Id: Makefile.in,v 1.23 2006/11/20 11:38:25 tothwolf Exp $
+# $Id: Makefile.in,v 1.24 2011/07/09 15:07:48 thommey Exp $
 
 SHELL = @SHELL@
 top_srcdir = @top_srcdir@
@@ -90,128 +90,137 @@
 
 #safety hash
 bg.o: bg.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h proto.h \
-  misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h compat/compat.h \
-  compat/inet_aton.h ../src/main.h compat/snprintf.h compat/memset.h \
-  compat/memcpy.h compat/strcasecmp.h compat/strftime.h bg.h
+ misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h compat/compat.h \
+ compat/inet_aton.h ../src/main.h compat/snprintf.h compat/memset.h \
+ compat/memcpy.h compat/strcasecmp.h compat/strdup.h compat/strftime.h \
+ bg.h
 botcmd.o: botcmd.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  tandem.h modules.h mod/modvals.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h tandem.h modules.h mod/modvals.h
 botmsg.o: botmsg.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  tandem.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h tandem.h
 botnet.o: botnet.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  tandem.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h tandem.h
 chanprog.o: chanprog.c main.h ../config.h ../lush.h lang.h eggdrop.h \
-  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  modules.h mod/modvals.h
+ flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h modules.h mod/modvals.h
 cmds.o: cmds.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  tandem.h modules.h mod/modvals.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h tandem.h modules.h mod/modvals.h
 dcc.o: dcc.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  modules.h mod/modvals.h tandem.h md5/md5.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h modules.h mod/modvals.h tandem.h md5/md5.h
 dccutil.o: dccutil.c main.h ../config.h ../lush.h lang.h eggdrop.h \
-  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  modules.h mod/modvals.h tandem.h
+ flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h modules.h mod/modvals.h tandem.h
 dns.o: dns.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  dns.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h dns.h
 flags.o: flags.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h
 language.o: language.c main.h ../config.h ../lush.h lang.h eggdrop.h \
-  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h
+ flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h
 main.o: main.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  modules.h mod/modvals.h tandem.h bg.h patch.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h modules.h mod/modvals.h tandem.h bg.h patch.h
 match.o: match.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h
 mem.o: mem.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  mod/modvals.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h mod/modvals.h
 misc.o: misc.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  tandem.h modules.h mod/modvals.h stat.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h tandem.h modules.h mod/modvals.h stat.h
 misc_file.o: misc_file.c main.h ../config.h ../lush.h lang.h eggdrop.h \
-  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  stat.h
+ flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h stat.h
 modules.o: modules.c main.h ../config.h ../lush.h lang.h eggdrop.h \
-  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  modules.h mod/modvals.h tandem.h md5/md5.h
+ flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h modules.h mod/modvals.h tandem.h md5/md5.h
 net.o: net.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h
 rfc1459.o: rfc1459.c main.h ../config.h ../lush.h lang.h eggdrop.h \
-  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h
+ flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h
 tcl.o: tcl.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h
 tcldcc.o: tcldcc.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  tandem.h modules.h mod/modvals.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h tandem.h modules.h mod/modvals.h
 tclhash.o: tclhash.c main.h ../config.h ../lush.h lang.h eggdrop.h \
-  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h
+ flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h
 tclmisc.o: tclmisc.c main.h ../config.h ../lush.h lang.h eggdrop.h \
-  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  modules.h mod/modvals.h tandem.h md5/md5.h
+ flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h modules.h mod/modvals.h tandem.h md5/md5.h
 tcluser.o: tcluser.c main.h ../config.h ../lush.h lang.h eggdrop.h \
-  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  tandem.h modules.h mod/modvals.h
+ flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h tandem.h modules.h mod/modvals.h
 userent.o: userent.c main.h ../config.h ../lush.h lang.h eggdrop.h \
-  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h
+ flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h
 userrec.o: userrec.c main.h ../config.h ../lush.h lang.h eggdrop.h \
-  flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  modules.h mod/modvals.h tandem.h
+ flags.h proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h modules.h mod/modvals.h tandem.h
 users.o: users.c main.h ../config.h ../lush.h lang.h eggdrop.h flags.h \
-  proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
-  compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
-  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
-  modules.h mod/modvals.h tandem.h
+ proto.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
+ compat/compat.h compat/inet_aton.h ../src/main.h compat/snprintf.h \
+ compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strdup.h \
+ compat/strftime.h modules.h mod/modvals.h tandem.h
Index: eggdrop1.6/src/compat/Makefile.in
diff -u eggdrop1.6/src/compat/Makefile.in:1.9 eggdrop1.6/src/compat/Makefile.in:1.10
--- eggdrop1.6/src/compat/Makefile.in:1.9	Fri Dec  9 03:29:10 2005
+++ eggdrop1.6/src/compat/Makefile.in	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/compat/
-# $Id: Makefile.in,v 1.9 2005/12/09 09:29:10 wcc Exp $
+# $Id: Makefile.in,v 1.10 2011/07/09 15:07:48 thommey Exp $
 
 SHELL = @SHELL@
 top_srcdir = @top_srcdir@
@@ -18,7 +18,7 @@
 CFLAGS = @CFLAGS@ -I../.. -I$(top_srcdir) -I$(top_srcdir)/src @DEFS@ $(CFLGS)
 CPPFLAGS = @CPPFLAGS@
 
-OBJS = inet_aton.o snprintf.o memset.o memcpy.o strcasecmp.o strftime.o
+OBJS = inet_aton.o snprintf.o memset.o memcpy.o strcasecmp.o strdup.o strftime.o
 
 doofus:
 	@echo ""
@@ -43,56 +43,58 @@
 #safety hash
 gnu_strftime.o: gnu_strftime.c ../../config.h
 inet_aton.o: inet_aton.c ../../src/main.h ../../config.h ../../lush.h \
-  ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h \
-  ../../src/proto.h ../../src/misc_file.h ../../src/cmdt.h \
-  ../../src/tclegg.h ../../src/tclhash.h ../../src/chan.h \
-  ../../src/users.h ../../src/compat/compat.h \
-  ../../src/compat/inet_aton.h ../../src/main.h \
-  ../../src/compat/snprintf.h ../../src/compat/memset.h \
-  ../../src/compat/memcpy.h ../../src/compat/strcasecmp.h \
-  ../../src/compat/strftime.h inet_aton.h
+ ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h ../../src/proto.h \
+ ../../src/misc_file.h ../../src/cmdt.h ../../src/tclegg.h \
+ ../../src/tclhash.h ../../src/chan.h ../../src/users.h \
+ ../../src/compat/compat.h ../../src/compat/inet_aton.h ../../src/main.h \
+ ../../src/compat/snprintf.h ../../src/compat/memset.h \
+ ../../src/compat/memcpy.h ../../src/compat/strcasecmp.h \
+ ../../src/compat/strdup.h ../../src/compat/strftime.h inet_aton.h
 memcpy.o: memcpy.c ../../src/main.h ../../config.h ../../lush.h \
-  ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h \
-  ../../src/proto.h ../../src/misc_file.h ../../src/cmdt.h \
-  ../../src/tclegg.h ../../src/tclhash.h ../../src/chan.h \
-  ../../src/users.h ../../src/compat/compat.h \
-  ../../src/compat/inet_aton.h ../../src/main.h \
-  ../../src/compat/snprintf.h ../../src/compat/memset.h \
-  ../../src/compat/memcpy.h ../../src/compat/strcasecmp.h \
-  ../../src/compat/strftime.h memcpy.h
+ ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h ../../src/proto.h \
+ ../../src/misc_file.h ../../src/cmdt.h ../../src/tclegg.h \
+ ../../src/tclhash.h ../../src/chan.h ../../src/users.h \
+ ../../src/compat/compat.h ../../src/compat/inet_aton.h ../../src/main.h \
+ ../../src/compat/snprintf.h ../../src/compat/memset.h \
+ ../../src/compat/memcpy.h ../../src/compat/strcasecmp.h \
+ ../../src/compat/strdup.h ../../src/compat/strftime.h memcpy.h
 memset.o: memset.c ../../src/main.h ../../config.h ../../lush.h \
-  ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h \
-  ../../src/proto.h ../../src/misc_file.h ../../src/cmdt.h \
-  ../../src/tclegg.h ../../src/tclhash.h ../../src/chan.h \
-  ../../src/users.h ../../src/compat/compat.h \
-  ../../src/compat/inet_aton.h ../../src/main.h \
-  ../../src/compat/snprintf.h ../../src/compat/memset.h \
-  ../../src/compat/memcpy.h ../../src/compat/strcasecmp.h \
-  ../../src/compat/strftime.h memset.h
+ ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h ../../src/proto.h \
+ ../../src/misc_file.h ../../src/cmdt.h ../../src/tclegg.h \
+ ../../src/tclhash.h ../../src/chan.h ../../src/users.h \
+ ../../src/compat/compat.h ../../src/compat/inet_aton.h ../../src/main.h \
+ ../../src/compat/snprintf.h ../../src/compat/memset.h \
+ ../../src/compat/memcpy.h ../../src/compat/strcasecmp.h \
+ ../../src/compat/strdup.h ../../src/compat/strftime.h memset.h
 snprintf.o: snprintf.c ../../src/main.h ../../config.h ../../lush.h \
-  ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h \
-  ../../src/proto.h ../../src/misc_file.h ../../src/cmdt.h \
-  ../../src/tclegg.h ../../src/tclhash.h ../../src/chan.h \
-  ../../src/users.h ../../src/compat/compat.h \
-  ../../src/compat/inet_aton.h ../../src/main.h \
-  ../../src/compat/snprintf.h ../../src/compat/memset.h \
-  ../../src/compat/memcpy.h ../../src/compat/strcasecmp.h \
-  ../../src/compat/strftime.h snprintf.h
+ ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h ../../src/proto.h \
+ ../../src/misc_file.h ../../src/cmdt.h ../../src/tclegg.h \
+ ../../src/tclhash.h ../../src/chan.h ../../src/users.h \
+ ../../src/compat/compat.h ../../src/compat/inet_aton.h ../../src/main.h \
+ ../../src/compat/snprintf.h ../../src/compat/memset.h \
+ ../../src/compat/memcpy.h ../../src/compat/strcasecmp.h \
+ ../../src/compat/strdup.h ../../src/compat/strftime.h snprintf.h
 strcasecmp.o: strcasecmp.c ../../src/main.h ../../config.h ../../lush.h \
-  ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h \
-  ../../src/proto.h ../../src/misc_file.h ../../src/cmdt.h \
-  ../../src/tclegg.h ../../src/tclhash.h ../../src/chan.h \
-  ../../src/users.h ../../src/compat/compat.h \
-  ../../src/compat/inet_aton.h ../../src/main.h \
-  ../../src/compat/snprintf.h ../../src/compat/memset.h \
-  ../../src/compat/memcpy.h ../../src/compat/strcasecmp.h \
-  ../../src/compat/strftime.h memcpy.h
+ ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h ../../src/proto.h \
+ ../../src/misc_file.h ../../src/cmdt.h ../../src/tclegg.h \
+ ../../src/tclhash.h ../../src/chan.h ../../src/users.h \
+ ../../src/compat/compat.h ../../src/compat/inet_aton.h ../../src/main.h \
+ ../../src/compat/snprintf.h ../../src/compat/memset.h \
+ ../../src/compat/memcpy.h ../../src/compat/strcasecmp.h \
+ ../../src/compat/strdup.h ../../src/compat/strftime.h memcpy.h
+strdup.o: strdup.c ../../src/main.h ../../config.h ../../lush.h \
+ ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h ../../src/proto.h \
+ ../../src/misc_file.h ../../src/cmdt.h ../../src/tclegg.h \
+ ../../src/tclhash.h ../../src/chan.h ../../src/users.h \
+ ../../src/compat/compat.h ../../src/compat/inet_aton.h ../../src/main.h \
+ ../../src/compat/snprintf.h ../../src/compat/memset.h \
+ ../../src/compat/memcpy.h ../../src/compat/strcasecmp.h \
+ ../../src/compat/strdup.h ../../src/compat/strftime.h
 strftime.o: strftime.c ../../src/main.h ../../config.h ../../lush.h \
-  ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h \
-  ../../src/proto.h ../../src/misc_file.h ../../src/cmdt.h \
-  ../../src/tclegg.h ../../src/tclhash.h ../../src/chan.h \
-  ../../src/users.h ../../src/compat/compat.h \
-  ../../src/compat/inet_aton.h ../../src/main.h \
-  ../../src/compat/snprintf.h ../../src/compat/memset.h \
-  ../../src/compat/memcpy.h ../../src/compat/strcasecmp.h \
-  ../../src/compat/strftime.h strftime.h
+ ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h ../../src/proto.h \
+ ../../src/misc_file.h ../../src/cmdt.h ../../src/tclegg.h \
+ ../../src/tclhash.h ../../src/chan.h ../../src/users.h \
+ ../../src/compat/compat.h ../../src/compat/inet_aton.h \
+ ../../src/compat/snprintf.h ../../src/compat/memset.h \
+ ../../src/compat/memcpy.h ../../src/compat/strcasecmp.h \
+ ../../src/compat/strdup.h ../../src/compat/strftime.h strftime.h
Index: eggdrop1.6/src/compat/compat.h
diff -u eggdrop1.6/src/compat/compat.h:1.15 eggdrop1.6/src/compat/compat.h:1.16
--- eggdrop1.6/src/compat/compat.h:1.15	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/compat/compat.h	Sat Jul  9 09:07:48 2011
@@ -2,7 +2,7 @@
  * compat.h
  *   wrap-around header for all compability functions.
  *
- * $Id: compat.h,v 1.15 2011/02/13 14:19:33 simple Exp $
+ * $Id: compat.h,v 1.16 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Copyright (C) 2000 - 2011 Eggheads Development Team
@@ -30,6 +30,7 @@
 #include "memset.h"
 #include "memcpy.h"
 #include "strcasecmp.h"
+#include "strdup.h"
 #include "strftime.h"
 
 #endif /* !__EGG_COMPAT_COMPAT_H */
Index: eggdrop1.6/src/compat/strdup.c
diff -u /dev/null eggdrop1.6/src/compat/strdup.c:1.1
--- /dev/null	Sat Jul  9 09:07:59 2011
+++ eggdrop1.6/src/compat/strdup.c	Sat Jul  9 09:07:48 2011
@@ -0,0 +1,34 @@
+/*
+ * strdup.c -- provides strdup() if necessary.
+ *
+ * $Id: strdup.c,v 1.1 2011/07/09 15:07:48 thommey Exp $
+ */
+/*
+ * Copyright (C) 2011 Eggheads Development Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#include "main.h"
+
+#ifndef HAVE_STRDUP
+char *egg_strdup(const char *s)
+{
+  char *d;
+  size_t l = strlen(s)+1;
+  d = nmalloc(l);
+  return egg_memcpy(d, s, l);
+}
+#endif /* !HAVE_STRDUP */
Index: eggdrop1.6/src/compat/strdup.h
diff -u /dev/null eggdrop1.6/src/compat/strdup.h:1.1
--- /dev/null	Sat Jul  9 09:07:59 2011
+++ eggdrop1.6/src/compat/strdup.h	Sat Jul  9 09:07:48 2011
@@ -0,0 +1,38 @@
+/*
+ * strdup.h
+ *   prototypes for strdup.c
+ *
+ * $Id: strdup.h,v 1.1 2011/07/09 15:07:48 thommey Exp $
+ */
+/*
+ * Copyright (C) 2011 Eggheads Development Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifndef _EGG_COMPAT_STRDUP_H
+#define _EGG_COMPAT_STRDUP_H
+
+#include "src/main.h"
+#include <string.h>
+
+#ifndef HAVE_STRDUP
+/* Use our own implementation. */
+char *egg_strdup(const char *s);
+#else
+#  define egg_strdup strdup
+#endif
+
+#endif /* !__EGG_COMPAT_STRDUP_H */
Index: eggdrop1.6/src/dns.c
diff -u eggdrop1.6/src/dns.c:1.39 eggdrop1.6/src/dns.c:1.40
--- eggdrop1.6/src/dns.c:1.39	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/dns.c	Sat Jul  9 09:07:48 2011
@@ -4,7 +4,7 @@
  *   provides the code used by the bot if the DNS module is not loaded
  *   DNS Tcl commands
  *
- * $Id: dns.c,v 1.39 2011/02/13 14:19:33 simple Exp $
+ * $Id: dns.c,v 1.40 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Written by Fabian Knittel <fknittel at gmx.de>
@@ -236,6 +236,19 @@
  *   Tcl events
  */
 
+
+/* Called after a dns callback has been executed, displays errors */
+void dnstclcallback(char *context, char *script, int code,
+                    const char *result, int dofree) {
+  if (code == TCL_ERROR)
+    putlog(LOG_MISC, "*", DCC_TCLERROR, context, result);
+  if (dofree) {
+    nfree(context);
+    nfree(script);
+  }
+}
+
+/* Schedules the dns callback to be executed */
 static void dns_tcl_iporhostres(IP ip, char *hostn, int ok, void *other)
 {
   devent_tclinfo_t *tclinfo = (devent_tclinfo_t *) other;
@@ -255,11 +268,10 @@
     argv[1] = tclinfo->paras;
     output = Tcl_Concat(2, argv);
 
-    if (Tcl_Eval(interp, output) == TCL_ERROR)
-      putlog(LOG_MISC, "*", DCC_TCLERROR, tclinfo->proc, tcl_resultstring());
+    do_tcl_async(tclinfo->proc, output, dnstclcallback);
     Tcl_Free(output);
-  } else if (Tcl_Eval(interp, Tcl_DStringValue(&list)) == TCL_ERROR)
-    putlog(LOG_MISC, "*", DCC_TCLERROR, tclinfo->proc, tcl_resultstring());
+  } else
+    do_tcl_async(tclinfo->proc, Tcl_DStringValue(&list), dnstclcallback);
 
   Tcl_DStringFree(&list);
 
Index: eggdrop1.6/src/eggdrop.h
diff -u eggdrop1.6/src/eggdrop.h:1.80 eggdrop1.6/src/eggdrop.h:1.81
--- eggdrop1.6/src/eggdrop.h:1.80	Fri Apr  1 06:10:08 2011
+++ eggdrop1.6/src/eggdrop.h	Sat Jul  9 09:07:48 2011
@@ -4,7 +4,7 @@
  *
  *   IF YOU ALTER THIS FILE, YOU NEED TO RECOMPILE THE BOT.
  *
- * $Id: eggdrop.h,v 1.80 2011/04/01 12:10:08 pseudo Exp $
+ * $Id: eggdrop.h,v 1.81 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -278,6 +278,7 @@
  *    Handy aliases for memory tracking and core dumps
  */
 
+#define nstrdup(x)    n_strdup((x),__FILE__,__LINE__)
 #define nmalloc(x)    n_malloc((x),__FILE__,__LINE__)
 #define nrealloc(x,y) n_realloc((x),(y),__FILE__,__LINE__)
 #define nfree(x)      n_free((x),__FILE__,__LINE__)
Index: eggdrop1.6/src/main.c
diff -u eggdrop1.6/src/main.c:1.139 eggdrop1.6/src/main.c:1.140
--- eggdrop1.6/src/main.c:1.139	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/main.c	Sat Jul  9 09:07:48 2011
@@ -5,7 +5,7 @@
  *   command line arguments
  *   context and assert debugging
  *
- * $Id: main.c,v 1.139 2011/02/13 14:19:33 simple Exp $
+ * $Id: main.c,v 1.140 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -81,6 +81,9 @@
 extern log_t *logs;
 extern Tcl_Interp *interp;
 extern tcl_timer_t *timer, *utimer;
+#ifdef REPLACE_NOTIFIER
+extern tclevent_t *tclevents;
+#endif
 extern sigjmp_buf alarmret;
 time_t now;
 static int argc;
@@ -93,8 +96,8 @@
  * modified versions of this bot.
  */
 
-char egg_version[1024] = "1.6.20";
-int egg_numver = 1062000;
+char egg_version[1024] = "1.6.21";
+int egg_numver = 1062100;
 
 char notify_new[121] = "";      /* Person to send a note to for new users */
 int default_flags = 0;          /* Default user flags                     */
@@ -708,7 +711,7 @@
 int mainloop(int toplevel)
 {
   static int socket_cleanup = 0;
-  int xx, i, eggbusy = 1, tclbusy = 0;
+  int xx, i, eggbusy = 1, tclbusy = 0, old_do_restart;
   char buf[520];
 
   /* Lets move some of this here, reducing the numer of actual
@@ -750,8 +753,9 @@
   } else
     socket_cleanup--;
 
-  /* Free unused structures. */
-  garbage_collect();
+  /* Free deleted binds, only if not recursing. */
+  if (toplevel)
+    garbage_collect();
 
   xx = sockgets(buf, &i);
   if (xx >= 0) {              /* Non-error */
@@ -829,8 +833,12 @@
     tclbusy = 1;
   }
 
+/* restart/rehash is performed here, reset do_restart ASAP to prevent
+ * doing it again if rehash() recurses in Tcl_Eval() */
   if (do_restart) {
-    if (do_restart == -2)
+    old_do_restart = do_restart;
+    do_restart = 0;
+    if (old_do_restart == -2)
       rehash();
     else if (!toplevel)
       return -1; /* Unwind to toplevel before restarting */
@@ -896,19 +904,28 @@
       call_hook(HOOK_LOADED);
     }
     eggbusy = 1;
-    do_restart = 0;
   }
 
 #ifdef USE_TCL_EVENTS
   if (!eggbusy) {
 /* Process all pending tcl events */
+
 #  ifdef REPLACE_NOTIFIER
+    tclevent_t *e;
     if (Tcl_ServiceAll())
       tclbusy = 1;
+    while (tclevents) {
+      e = tclevents;
+      tclevents = tclevents->next;
+      tclbusy = 1;
+      do_tcl_sync(e->context, e->script, e->callback, 1);
+      nfree(e);
+    }
 #  else
     while (Tcl_DoOneEvent(TCL_DONT_WAIT | TCL_ALL_EVENTS))
       tclbusy = 1;
 #  endif /* REPLACE_NOTIFIER */
+
 #endif   /* USE_TCL_EVENTS   */
   }
 
Index: eggdrop1.6/src/main.h
diff -u eggdrop1.6/src/main.h:1.42 eggdrop1.6/src/main.h:1.43
--- eggdrop1.6/src/main.h:1.42	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/main.h	Sat Jul  9 09:07:48 2011
@@ -2,7 +2,7 @@
  * main.h
  *   include file to include most other include files
  *
- * $Id: main.h,v 1.42 2011/02/13 14:19:33 simple Exp $
+ * $Id: main.h,v 1.43 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -48,7 +48,7 @@
 #  define USE_TCL_ENCODING
 #endif
 
-#if defined(HAVE_TCL_SETNOTIFIER) && defined(HAVE_TCL_GETTHREADDATA)
+#if defined(HAVE_TCL_SETNOTIFIER) && defined(HAVE_TCL_GETTHREADDATA) && defined(HAVE_TCL_NOTIFIER_INIT)
 #  define REPLACE_NOTIFIER
 #endif
 
Index: eggdrop1.6/src/md5/Makefile.in
diff -u eggdrop1.6/src/md5/Makefile.in:1.13 eggdrop1.6/src/md5/Makefile.in:1.14
--- eggdrop1.6/src/md5/Makefile.in:1.13	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/md5/Makefile.in	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/md5/
-# $Id: Makefile.in,v 1.13 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile.in,v 1.14 2011/07/09 15:07:48 thommey Exp $
 
 SHELL = @SHELL@
 top_srcdir = @top_srcdir@
@@ -42,10 +42,11 @@
 
 #safety hash
 md5c.o: md5c.c md5.h ../../src/compat/compat.h \
-  ../../src/compat/inet_aton.h ../../src/main.h ../../config.h \
-  ../../lush.h ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h \
-  ../../src/proto.h ../../src/misc_file.h ../../src/cmdt.h \
-  ../../src/tclegg.h ../../src/tclhash.h ../../src/chan.h \
-  ../../src/users.h ../../src/compat/compat.h ../../src/compat/snprintf.h \
-  ../../src/compat/memset.h ../../src/compat/memcpy.h \
-  ../../src/compat/strcasecmp.h ../../src/compat/strftime.h
+ ../../src/compat/inet_aton.h ../../src/main.h ../../config.h \
+ ../../lush.h ../../src/lang.h ../../src/eggdrop.h ../../src/flags.h \
+ ../../src/proto.h ../../src/misc_file.h ../../src/cmdt.h \
+ ../../src/tclegg.h ../../src/tclhash.h ../../src/chan.h \
+ ../../src/users.h ../../src/compat/compat.h ../../src/compat/snprintf.h \
+ ../../src/compat/memset.h ../../src/compat/memcpy.h \
+ ../../src/compat/strcasecmp.h ../../src/compat/strdup.h \
+ ../../src/compat/strftime.h
Index: eggdrop1.6/src/mem.c
diff -u eggdrop1.6/src/mem.c:1.30 eggdrop1.6/src/mem.c:1.31
--- eggdrop1.6/src/mem.c:1.30	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/mem.c	Sat Jul  9 09:07:48 2011
@@ -3,7 +3,7 @@
  *   memory allocation and deallocation
  *   keeping track of what memory is being used by whom
  *
- * $Id: mem.c,v 1.30 2011/02/13 14:19:33 simple Exp $
+ * $Id: mem.c,v 1.31 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -304,22 +304,12 @@
   tell_netdebug(idx);
 }
 
-void *n_malloc(int size, const char *file, int line)
-{
-  void *x;
-
 #ifdef DEBUG_MEM
+static inline void addtomemtbl(void *x, int size, const char *file, int line)
+{
   int i = 0;
   char *p;
-#endif
 
-  x = (void *) malloc(size);
-  if (x == NULL) {
-    putlog(LOG_MISC, "*", "*** FAILED MALLOC %s (%d) (%d): %s", file, line,
-           size, strerror(errno));
-    fatal("Memory allocation failed", 0);
-  }
-#ifdef DEBUG_MEM
   if (lastused == MEMTBLSIZE) {
     putlog(LOG_MISC, "*", "*** MEMORY TABLE FULL: %s (%d)", file, line);
     fatal("Memory table full", 0);
@@ -333,6 +323,34 @@
   memtbl[i].file[19] = 0;
   memused += size;
   lastused++;
+}
+#endif
+
+char *n_strdup(const char *s, const char *file, int line)
+{
+  char *x;
+
+  x = egg_strdup(s);
+putlog(LOG_MISC, "*", "*** %d", strlen(s)+1);
+/* compat strdup uses nmalloc itself */
+#if defined(DEBUG_MEM) && defined(HAVE_STRDUP)
+  addtomemtbl(x, strlen(s)+1, file, line);
+#endif
+  return x;
+}
+
+void *n_malloc(int size, const char *file, int line)
+{
+  void *x;
+
+  x = (void *) malloc(size);
+  if (x == NULL) {
+    putlog(LOG_MISC, "*", "*** FAILED MALLOC %s (%d) (%d): %s", file, line,
+           size, strerror(errno));
+    fatal("Memory allocation failed", 0);
+  }
+#ifdef DEBUG_MEM
+  addtomemtbl(x, size, file, line);
 #endif
   return x;
 }
Index: eggdrop1.6/src/misc.c
diff -u eggdrop1.6/src/misc.c:1.87 eggdrop1.6/src/misc.c:1.88
--- eggdrop1.6/src/misc.c:1.87	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/misc.c	Sat Jul  9 09:07:48 2011
@@ -7,7 +7,7 @@
  *   help system
  *   motd display and %var substitution
  *
- * $Id: misc.c,v 1.87 2011/02/13 14:19:33 simple Exp $
+ * $Id: misc.c,v 1.88 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1550,6 +1550,13 @@
   (void) strchr_unescape(str, 0, esc_char);
 }
 
+char *str_dup(const char *s)
+{
+  char *d = nmalloc(strlen(s)+1);
+  strcpy(d, s);
+  return d;
+}
+
 /* Kills the bot. s1 is the reason shown to other bots,
  * s2 the reason shown on the partyline. (Sup 25Jul2001)
  */
Index: eggdrop1.6/src/mod/assoc.mod/Makefile
diff -u eggdrop1.6/src/mod/assoc.mod/Makefile:1.17 eggdrop1.6/src/mod/assoc.mod/Makefile:1.18
--- eggdrop1.6/src/mod/assoc.mod/Makefile:1.17	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/assoc.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/assoc.mod/
-# $Id: Makefile,v 1.17 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile,v 1.18 2011/07/09 15:07:48 thommey Exp $
 
 srcdir = .
 
@@ -33,12 +33,12 @@
 
 #safety hash
 ../assoc.o: .././assoc.mod/assoc.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h ../../../src/tandem.h .././assoc.mod/assoc.h
+ ../../../src/main.h ../../../config.h ../../../lush.h \
+ ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
+ ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
+ ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h .././assoc.mod/assoc.h
Index: eggdrop1.6/src/mod/blowfish.mod/Makefile
diff -u eggdrop1.6/src/mod/blowfish.mod/Makefile:1.16 eggdrop1.6/src/mod/blowfish.mod/Makefile:1.17
--- eggdrop1.6/src/mod/blowfish.mod/Makefile:1.16	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/blowfish.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/blowfish.mod/
-# $Id: Makefile,v 1.16 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile,v 1.17 2011/07/09 15:07:48 thommey Exp $
 
 srcdir = .
 
@@ -33,13 +33,13 @@
 
 #safety hash
 ../blowfish.o: .././blowfish.mod/blowfish.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h .././blowfish.mod/blowfish.h \
-  .././blowfish.mod/bf_tab.h
+ ../../../src/main.h ../../../config.h ../../../lush.h \
+ ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
+ ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
+ ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h .././blowfish.mod/blowfish.h \
+ .././blowfish.mod/bf_tab.h
Index: eggdrop1.6/src/mod/channels.mod/Makefile
diff -u eggdrop1.6/src/mod/channels.mod/Makefile:1.17 eggdrop1.6/src/mod/channels.mod/Makefile:1.18
--- eggdrop1.6/src/mod/channels.mod/Makefile:1.17	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/channels.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/channels.mod/
-# $Id: Makefile,v 1.17 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile,v 1.18 2011/07/09 15:07:48 thommey Exp $
 
 srcdir = .
 
@@ -33,14 +33,14 @@
 
 #safety hash
 ../channels.o: .././channels.mod/channels.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h .././channels.mod/channels.h \
-  .././channels.mod/cmdschan.c .././channels.mod/tclchan.c \
-  .././channels.mod/userchan.c .././channels.mod/udefchan.c
+ ../../../src/main.h ../../../config.h ../../../lush.h \
+ ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
+ ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
+ ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h .././channels.mod/channels.h \
+ .././channels.mod/cmdschan.c .././channels.mod/tclchan.c \
+ .././channels.mod/userchan.c .././channels.mod/udefchan.c
Index: eggdrop1.6/src/mod/compress.mod/Makefile.in
diff -u eggdrop1.6/src/mod/compress.mod/Makefile.in:1.13 eggdrop1.6/src/mod/compress.mod/Makefile.in:1.14
--- eggdrop1.6/src/mod/compress.mod/Makefile.in:1.13	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/compress.mod/Makefile.in	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile.in for src/mod/compress.mod/
-# $Id: Makefile.in,v 1.13 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile.in,v 1.14 2011/07/09 15:07:48 thommey Exp $
 
 ZLIB = @ZLIB@
 srcdir = .
@@ -36,13 +36,13 @@
 
 #safety hash
 ../compress.o: .././compress.mod/compress.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h ../../../src/mod/share.mod/share.h \
-  .././compress.mod/compress.h .././compress.mod/tclcompress.c
+ ../../../src/main.h ../../../config.h ../../../lush.h \
+ ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
+ ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
+ ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h ../../../src/mod/share.mod/share.h \
+ .././compress.mod/compress.h .././compress.mod/tclcompress.c
Index: eggdrop1.6/src/mod/compress.mod/configure.ac
diff -u eggdrop1.6/src/mod/compress.mod/configure.ac:1.11 eggdrop1.6/src/mod/compress.mod/configure.ac:1.12
--- eggdrop1.6/src/mod/compress.mod/configure.ac:1.11	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/mod/compress.mod/configure.ac	Sat Jul  9 09:07:48 2011
@@ -1,18 +1,18 @@
 dnl configure.ac: this file is processed by autoconf to produce ./configure.
 dnl
-dnl $Id: configure.ac,v 1.11 2011/02/13 14:19:33 simple Exp $
+dnl $Id: configure.ac,v 1.12 2011/07/09 15:07:48 thommey Exp $
 
 AC_PREREQ(2.59)
 
 sinclude(../eggmod.m4)
 
-AC_INIT([Eggdrop Compress Module],[1.6.20],[bugs at eggheads.org])
+AC_INIT([Eggdrop Compress Module],[1.6.21],[bugs at eggheads.org])
 
 AC_CONFIG_SRCDIR(compress.c)
 AC_CONFIG_AUX_DIR(../../../misc)
 
 AC_COPYRIGHT([Copyright (C) 1999 - 2011 Eggheads Development Team])
-AC_REVISION($Revision: 1.11 $)
+AC_REVISION($Revision: 1.12 $)
 
 # Check for gzopen() in -lz.
 AC_CHECK_LIB(z, gzopen, [ZLIB="-lz"], [])
Index: eggdrop1.6/src/mod/console.mod/Makefile
diff -u eggdrop1.6/src/mod/console.mod/Makefile:1.19 eggdrop1.6/src/mod/console.mod/Makefile:1.20
--- eggdrop1.6/src/mod/console.mod/Makefile:1.19	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/console.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/console.mod/
-# $Id: Makefile,v 1.19 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile,v 1.20 2011/07/09 15:07:48 thommey Exp $
 
 srcdir = .
 
@@ -33,12 +33,12 @@
 
 #safety hash
 ../console.o: .././console.mod/console.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h .././console.mod/console.h
+ ../../../src/main.h ../../../config.h ../../../lush.h \
+ ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
+ ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
+ ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h .././console.mod/console.h
Index: eggdrop1.6/src/mod/ctcp.mod/Makefile
diff -u eggdrop1.6/src/mod/ctcp.mod/Makefile:1.16 eggdrop1.6/src/mod/ctcp.mod/Makefile:1.17
--- eggdrop1.6/src/mod/ctcp.mod/Makefile:1.16	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/ctcp.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/ctcp.mod/
-# $Id: Makefile,v 1.16 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile,v 1.17 2011/07/09 15:07:48 thommey Exp $
 
 srcdir = .
 
@@ -33,13 +33,13 @@
 
 #safety hash
 ../ctcp.o: .././ctcp.mod/ctcp.c .././ctcp.mod/ctcp.h \
-  ../../../src/mod/module.h ../../../src/main.h ../../../config.h \
-  ../../../lush.h ../../../src/lang.h ../../../src/eggdrop.h \
-  ../../../src/flags.h ../../../src/cmdt.h ../../../src/tclegg.h \
-  ../../../src/tclhash.h ../../../src/chan.h ../../../src/users.h \
-  ../../../src/compat/compat.h ../../../src/compat/inet_aton.h \
-  ../../../src/main.h ../../../src/compat/snprintf.h \
-  ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
-  ../../../src/compat/strcasecmp.h ../../../src/compat/strftime.h \
-  ../../../src/mod/modvals.h ../../../src/tandem.h \
-  ../../../src/mod/server.mod/server.h
+ ../../../src/mod/module.h ../../../src/main.h ../../../config.h \
+ ../../../lush.h ../../../src/lang.h ../../../src/eggdrop.h \
+ ../../../src/flags.h ../../../src/cmdt.h ../../../src/tclegg.h \
+ ../../../src/tclhash.h ../../../src/chan.h ../../../src/users.h \
+ ../../../src/compat/compat.h ../../../src/compat/inet_aton.h \
+ ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
+ ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
+ ../../../src/compat/strdup.h ../../../src/compat/strftime.h \
+ ../../../src/mod/modvals.h ../../../src/tandem.h \
+ ../../../src/mod/server.mod/server.h
Index: eggdrop1.6/src/mod/dns.mod/Makefile.in
diff -u eggdrop1.6/src/mod/dns.mod/Makefile.in:1.13 eggdrop1.6/src/mod/dns.mod/Makefile.in:1.14
--- eggdrop1.6/src/mod/dns.mod/Makefile.in:1.13	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/dns.mod/Makefile.in	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/dns.mod/
-# $Id: Makefile.in,v 1.13 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile.in,v 1.14 2011/07/09 15:07:48 thommey Exp $
 
 RESLIB = @RESLIB@
 RESINCLUDE = @RESINCLUDE@
@@ -37,12 +37,12 @@
 
 #safety hash
 ../dns.o: .././dns.mod/dns.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h .././dns.mod/dns.h .././dns.mod/coredns.c
+ ../../../src/main.h ../../../config.h ../../../lush.h \
+ ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
+ ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
+ ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h .././dns.mod/dns.h .././dns.mod/coredns.c
Index: eggdrop1.6/src/mod/dns.mod/configure.ac
diff -u eggdrop1.6/src/mod/dns.mod/configure.ac:1.12 eggdrop1.6/src/mod/dns.mod/configure.ac:1.13
--- eggdrop1.6/src/mod/dns.mod/configure.ac:1.12	Fri Apr  1 06:10:09 2011
+++ eggdrop1.6/src/mod/dns.mod/configure.ac	Sat Jul  9 09:07:48 2011
@@ -1,18 +1,18 @@
 dnl configure.ac: this file is processed by autoconf to produce ./configure.
 dnl
-dnl $Id: configure.ac,v 1.12 2011/04/01 12:10:09 pseudo Exp $
+dnl $Id: configure.ac,v 1.13 2011/07/09 15:07:48 thommey Exp $
 
 AC_PREREQ(2.59)
 
 sinclude(../eggmod.m4)
 
-AC_INIT([Eggdrop DNS Module],[1.6.20],[bugs at eggheads.org])
+AC_INIT([Eggdrop DNS Module],[1.6.21],[bugs at eggheads.org])
 
 AC_CONFIG_SRCDIR(coredns.c)
 AC_CONFIG_AUX_DIR(../../../misc)
 
 AC_COPYRIGHT([Copyright (C) 1999 - 2011 Eggheads Development Team])
-AC_REVISION($Revision: 1.12 $)
+AC_REVISION($Revision: 1.13 $)
 
 dns_reslib_avail="false"
 
Index: eggdrop1.6/src/mod/filesys.mod/Makefile
diff -u eggdrop1.6/src/mod/filesys.mod/Makefile:1.20 eggdrop1.6/src/mod/filesys.mod/Makefile:1.21
--- eggdrop1.6/src/mod/filesys.mod/Makefile:1.20	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/filesys.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/filesys.mod/
-# $Id: Makefile,v 1.20 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile,v 1.21 2011/07/09 15:07:48 thommey Exp $
 
 srcdir = .
 
@@ -33,19 +33,18 @@
 
 #safety hash
 ../filesys.o: .././filesys.mod/filesys.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h .././filesys.mod/filedb3.h \
-  .././filesys.mod/filesys.h ../../../src/lang.h \
-  ../../../src/mod/transfer.mod/transfer.h ../../../src/tandem.h \
-  .././filesys.mod/files.h .././filesys.mod/dbcompat.h \
-  .././filesys.mod/filelist.h .././filesys.mod/files.c \
-  ../../../src/stat.h .././filesys.mod/filedb3.c \
-  .././filesys.mod/tclfiles.c .././filesys.mod/dbcompat.c \
-  .././filesys.mod/filelist.c
+ ../../../src/main.h ../../../config.h ../../../lush.h \
+ ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
+ ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
+ ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h .././filesys.mod/filedb3.h \
+ .././filesys.mod/filesys.h ../../../src/lang.h \
+ ../../../src/mod/transfer.mod/transfer.h .././filesys.mod/files.h \
+ .././filesys.mod/dbcompat.h .././filesys.mod/filelist.h \
+ .././filesys.mod/files.c ../../../src/stat.h .././filesys.mod/filedb3.c \
+ .././filesys.mod/tclfiles.c .././filesys.mod/dbcompat.c \
+ .././filesys.mod/filelist.c
Index: eggdrop1.6/src/mod/irc.mod/Makefile
diff -u eggdrop1.6/src/mod/irc.mod/Makefile:1.16 eggdrop1.6/src/mod/irc.mod/Makefile:1.17
--- eggdrop1.6/src/mod/irc.mod/Makefile:1.16	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/irc.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/irc.mod/
-# $Id: Makefile,v 1.16 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile,v 1.17 2011/07/09 15:07:48 thommey Exp $
 
 srcdir = .
 
@@ -33,16 +33,16 @@
 
 #safety hash
 ../irc.o: .././irc.mod/irc.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h .././irc.mod/irc.h \
-  ../../../src/mod/server.mod/server.h \
-  ../../../src/mod/channels.mod/channels.h .././irc.mod/chan.c \
-  .././irc.mod/mode.c .././irc.mod/cmdsirc.c .././irc.mod/msgcmds.c \
-  .././irc.mod/tclirc.c
+ ../../../src/main.h ../../../config.h ../../../lush.h \
+ ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
+ ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
+ ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h .././irc.mod/irc.h \
+ ../../../src/mod/server.mod/server.h \
+ ../../../src/mod/channels.mod/channels.h .././irc.mod/chan.c \
+ .././irc.mod/mode.c .././irc.mod/cmdsirc.c .././irc.mod/msgcmds.c \
+ .././irc.mod/tclirc.c
Index: eggdrop1.6/src/mod/module.h
diff -u eggdrop1.6/src/mod/module.h:1.96 eggdrop1.6/src/mod/module.h:1.97
--- eggdrop1.6/src/mod/module.h:1.96	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/mod/module.h	Sat Jul  9 09:07:48 2011
@@ -1,7 +1,7 @@
 /*
  * module.h
  *
- * $Id: module.h,v 1.96 2011/02/13 14:19:33 simple Exp $
+ * $Id: module.h,v 1.97 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -43,6 +43,7 @@
  * held responsible for mental break-downs caused by this file <G>
  */
 
+#undef nstrdup
 #undef nmalloc
 #undef nfree
 #undef nrealloc
@@ -79,6 +80,9 @@
 #ifdef egg_strncasecmp
 #  undef egg_strncasecmp
 #endif
+#ifdef egg_strdup
+#  undef egg_strdup
+#endif
 
 #if defined (__CYGWIN__) && !defined(STATIC)
 #  define EXPORT_SCOPE  __declspec(dllexport)
@@ -485,6 +489,7 @@
 #define check_conflags ((int (*) (struct flag_record *, int))global[296])
 #define increase_socks_max ((int (*)(void))global[297])
 #define LOG_TS ((char *)(global[298]))
+#define nstrdup(x) (((char *(*)())global[299])((x),MODULE_NAME,__FILE__,__LINE__))
 
 /* hostmasking */
 #define maskhost(a,b) maskaddr((a),(b),3)
Index: eggdrop1.6/src/mod/notes.mod/Makefile
diff -u eggdrop1.6/src/mod/notes.mod/Makefile:1.17 eggdrop1.6/src/mod/notes.mod/Makefile:1.18
--- eggdrop1.6/src/mod/notes.mod/Makefile:1.17	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/notes.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/notes.mod
-# $Id: Makefile,v 1.17 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile,v 1.18 2011/07/09 15:07:48 thommey Exp $
 
 srcdir = .
 
@@ -33,13 +33,12 @@
 
 #safety hash
 ../notes.o: .././notes.mod/notes.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h ../../../src/tandem.h .././notes.mod/notes.h \
-  .././notes.mod/cmdsnote.c
+ ../../../src/main.h ../../../config.h ../../../lush.h \
+ ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
+ ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
+ ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h .././notes.mod/notes.h .././notes.mod/cmdsnote.c
Index: eggdrop1.6/src/mod/seen.mod/Makefile
diff -u eggdrop1.6/src/mod/seen.mod/Makefile:1.16 eggdrop1.6/src/mod/seen.mod/Makefile:1.17
--- eggdrop1.6/src/mod/seen.mod/Makefile:1.16	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/seen.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/seen.mod/
-# $Id: Makefile,v 1.16 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile,v 1.17 2011/07/09 15:07:48 thommey Exp $
 
 srcdir = .
 
@@ -33,13 +33,13 @@
 
 #safety hash
 ../seen.o: .././seen.mod/seen.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h ../../../src/users.h ../../../src/chan.h \
-  ../../../src/mod/channels.mod/channels.h
+ ../../../src/main.h ../../../config.h ../../../lush.h \
+ ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
+ ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
+ ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h ../../../src/users.h ../../../src/chan.h \
+ ../../../src/mod/channels.mod/channels.h
Index: eggdrop1.6/src/mod/server.mod/Makefile
diff -u eggdrop1.6/src/mod/server.mod/Makefile:1.17 eggdrop1.6/src/mod/server.mod/Makefile:1.18
--- eggdrop1.6/src/mod/server.mod/Makefile:1.17	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/server.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/server.mod/
-# $Id: Makefile,v 1.17 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile,v 1.18 2011/07/09 15:07:48 thommey Exp $
 
 srcdir = .
 
@@ -33,14 +33,13 @@
 
 #safety hash
 ../server.o: .././server.mod/server.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h .././server.mod/server.h \
-  .././server.mod/servmsg.c .././server.mod/cmdsserv.c \
-  .././server.mod/tclserv.c
+ ../../../src/main.h ../../../config.h ../../../lush.h \
+ ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
+ ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
+ ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h .././server.mod/server.h .././server.mod/servmsg.c \
+ .././server.mod/cmdsserv.c .././server.mod/tclserv.c
Index: eggdrop1.6/src/mod/share.mod/Makefile
diff -u eggdrop1.6/src/mod/share.mod/Makefile:1.17 eggdrop1.6/src/mod/share.mod/Makefile:1.18
--- eggdrop1.6/src/mod/share.mod/Makefile:1.17	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/share.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/share.mod/
-# $Id: Makefile,v 1.17 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile,v 1.18 2011/07/09 15:07:48 thommey Exp $
 
 srcdir = .
 
@@ -33,15 +33,15 @@
 
 #safety hash
 ../share.o: .././share.mod/share.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h ../../../src/chan.h ../../../src/users.h \
-  ../../../src/mod/transfer.mod/transfer.h \
-  ../../../src/mod/channels.mod/channels.h .././share.mod/share.h \
-  .././share.mod/uf_features.c
+ ../../../src/main.h ../../../config.h ../../../lush.h \
+ ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
+ ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
+ ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h ../../../src/chan.h ../../../src/users.h \
+ ../../../src/mod/transfer.mod/transfer.h \
+ ../../../src/mod/channels.mod/channels.h .././share.mod/share.h \
+ .././share.mod/uf_features.c
Index: eggdrop1.6/src/mod/transfer.mod/Makefile
diff -u eggdrop1.6/src/mod/transfer.mod/Makefile:1.17 eggdrop1.6/src/mod/transfer.mod/Makefile:1.18
--- eggdrop1.6/src/mod/transfer.mod/Makefile:1.17	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/transfer.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/transfer.mod/
-# $Id: Makefile,v 1.17 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile,v 1.18 2011/07/09 15:07:48 thommey Exp $
 
 srcdir = .
 
@@ -33,14 +33,14 @@
 
 #safety hash
 ../transfer.o: .././transfer.mod/transfer.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h ../../../src/tandem.h ../../../src/users.h \
-  .././transfer.mod/transfer.h .././transfer.mod/transferfstat.c \
-  .././transfer.mod/transferqueue.c .././transfer.mod/tcltransfer.c
+ ../../../src/main.h ../../../config.h ../../../lush.h \
+ ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
+ ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
+ ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h ../../../src/users.h .././transfer.mod/transfer.h \
+ .././transfer.mod/transferfstat.c .././transfer.mod/transferqueue.c \
+ .././transfer.mod/tcltransfer.c
Index: eggdrop1.6/src/mod/uptime.mod/Makefile
diff -u eggdrop1.6/src/mod/uptime.mod/Makefile:1.7 eggdrop1.6/src/mod/uptime.mod/Makefile:1.8
--- eggdrop1.6/src/mod/uptime.mod/Makefile:1.7	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/uptime.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/uptime.mod/
-# $Id: Makefile,v 1.7 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile,v 1.8 2011/07/09 15:07:48 thommey Exp $
 srcdir = .
 
 
@@ -32,13 +32,13 @@
 
 #safety hash
 ../uptime.o: .././uptime.mod/uptime.c .././uptime.mod/uptime.h \
-  .././uptime.mod/../module.h ../../../src/main.h ../../../config.h \
-  ../../../lush.h ../../../src/lang.h ../../../src/eggdrop.h \
-  ../../../src/flags.h ../../../src/cmdt.h ../../../src/tclegg.h \
-  ../../../src/tclhash.h ../../../src/chan.h ../../../src/users.h \
-  ../../../src/compat/compat.h ../../../src/compat/inet_aton.h \
-  ../../../src/main.h ../../../src/compat/snprintf.h \
-  ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
-  ../../../src/compat/strcasecmp.h ../../../src/compat/strftime.h \
-  .././uptime.mod/../modvals.h ../../../src/tandem.h \
-  .././uptime.mod/../server.mod/server.h
+ .././uptime.mod/../module.h ../../../src/main.h ../../../config.h \
+ ../../../lush.h ../../../src/lang.h ../../../src/eggdrop.h \
+ ../../../src/flags.h ../../../src/cmdt.h ../../../src/tclegg.h \
+ ../../../src/tclhash.h ../../../src/chan.h ../../../src/users.h \
+ ../../../src/compat/compat.h ../../../src/compat/inet_aton.h \
+ ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
+ ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
+ ../../../src/compat/strdup.h ../../../src/compat/strftime.h \
+ .././uptime.mod/../modvals.h ../../../src/tandem.h \
+ .././uptime.mod/../server.mod/server.h
Index: eggdrop1.6/src/mod/wire.mod/Makefile
diff -u eggdrop1.6/src/mod/wire.mod/Makefile:1.18 eggdrop1.6/src/mod/wire.mod/Makefile:1.19
--- eggdrop1.6/src/mod/wire.mod/Makefile:1.18	Fri Dec  9 03:29:11 2005
+++ eggdrop1.6/src/mod/wire.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/wire.mod/
-# $Id: Makefile,v 1.18 2005/12/09 09:29:11 wcc Exp $
+# $Id: Makefile,v 1.19 2011/07/09 15:07:48 thommey Exp $
 
 srcdir = .
 
@@ -33,13 +33,13 @@
 
 #safety hash
 ../wire.o: .././wire.mod/wire.c ../../../src/mod/module.h \
-  ../../../src/main.h ../../../config.h ../../../lush.h \
-  ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
-  ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
-  ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h ../../../src/users.h ../../../src/chan.h \
-  .././wire.mod/wire.h
+ ../../../src/main.h ../../../config.h ../../../lush.h \
+ ../../../src/lang.h ../../../src/eggdrop.h ../../../src/flags.h \
+ ../../../src/cmdt.h ../../../src/tclegg.h ../../../src/tclhash.h \
+ ../../../src/chan.h ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h ../../../src/users.h ../../../src/chan.h \
+ .././wire.mod/wire.h
Index: eggdrop1.6/src/mod/woobie.mod/Makefile
diff -u eggdrop1.6/src/mod/woobie.mod/Makefile:1.14 eggdrop1.6/src/mod/woobie.mod/Makefile:1.15
--- eggdrop1.6/src/mod/woobie.mod/Makefile:1.14	Fri Dec  9 03:29:12 2005
+++ eggdrop1.6/src/mod/woobie.mod/Makefile	Sat Jul  9 09:07:48 2011
@@ -1,5 +1,5 @@
 # Makefile for src/mod/woobie.mod/
-# $Id: Makefile,v 1.14 2005/12/09 09:29:12 wcc Exp $
+# $Id: Makefile,v 1.15 2011/07/09 15:07:48 thommey Exp $
 
 srcdir = .
 
@@ -32,13 +32,13 @@
 distclean: clean
 
 #safety hash
-../woobie.o: ./woobie.c ../../../src/mod/module.h ../../../src/main.h \
-  ../../../config.h ../../../lush.h ../../../src/lang.h \
-  ../../../src/eggdrop.h ../../../src/flags.h ../../../src/cmdt.h \
-  ../../../src/tclegg.h ../../../src/tclhash.h ../../../src/chan.h \
-  ../../../src/users.h ../../../src/compat/compat.h \
-  ../../../src/compat/inet_aton.h ../../../src/main.h \
-  ../../../src/compat/snprintf.h ../../../src/compat/memset.h \
-  ../../../src/compat/memcpy.h ../../../src/compat/strcasecmp.h \
-  ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
-  ../../../src/tandem.h
+../woobie.o: woobie.c ../../../src/mod/module.h ../../../src/main.h \
+ ../../../config.h ../../../lush.h ../../../src/lang.h \
+ ../../../src/eggdrop.h ../../../src/flags.h ../../../src/cmdt.h \
+ ../../../src/tclegg.h ../../../src/tclhash.h ../../../src/chan.h \
+ ../../../src/users.h ../../../src/compat/compat.h \
+ ../../../src/compat/inet_aton.h ../../../src/compat/snprintf.h \
+ ../../../src/compat/memset.h ../../../src/compat/memcpy.h \
+ ../../../src/compat/strcasecmp.h ../../../src/compat/strdup.h \
+ ../../../src/compat/strftime.h ../../../src/mod/modvals.h \
+ ../../../src/tandem.h
Index: eggdrop1.6/src/modules.c
diff -u eggdrop1.6/src/modules.c:1.109 eggdrop1.6/src/modules.c:1.110
--- eggdrop1.6/src/modules.c:1.109	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/modules.c	Sat Jul  9 09:07:48 2011
@@ -4,7 +4,7 @@
  *
  * by Darrin Smith (beldin at light.iinet.net.au)
  *
- * $Id: modules.c,v 1.109 2011/02/13 14:19:33 simple Exp $
+ * $Id: modules.c,v 1.110 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -576,7 +576,8 @@
   /* 296 - 299 */
   (Function) check_conflags,
   (Function) increase_socks_max,
-  (Function) log_ts
+  (Function) log_ts,
+  (Function) mod_strdup
 };
 
 void init_modules(void)
@@ -941,6 +942,20 @@
   return ok;
 }
 
+char *mod_strdup(const char *s, const char *modname, const char *filename, int line)
+{
+#ifdef DEBUG_MEM
+  char x[100], *p;
+
+  p = strrchr(filename, '/');
+  egg_snprintf(x, sizeof x, "%s:%s", modname, p ? p + 1 : filename);
+  x[19] = 0;
+  return n_strdup(s, x, line);
+#else
+  return nstrdup(s);
+#endif
+}
+
 void *mod_malloc(int size, const char *modname, const char *filename, int line)
 {
 #ifdef DEBUG_MEM
Index: eggdrop1.6/src/modules.h
diff -u eggdrop1.6/src/modules.h:1.22 eggdrop1.6/src/modules.h:1.23
--- eggdrop1.6/src/modules.h:1.22	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/modules.h	Sat Jul  9 09:07:48 2011
@@ -4,7 +4,7 @@
  *
  * by Darrin Smith (beldin at light.iinet.net.au)
  *
- * $Id: modules.h,v 1.22 2011/02/13 14:19:33 simple Exp $
+ * $Id: modules.h,v 1.23 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -42,6 +42,7 @@
 module_entry *module_find(char *, int, int);
 Function *module_depend(char *, char *, int, int);
 int module_undepend(char *);
+char *mod_strdup(const char *, const char *, const char *, int);
 void *mod_malloc(int, const char *, const char *, int);
 void *mod_realloc(void *, int, const char *, const char *, int);
 void mod_free(void *, const char *, const char *, int);
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.1260 eggdrop1.6/src/patch.h:1.1261
--- eggdrop1.6/src/patch.h:1.1260	Fri Apr  1 06:22:15 2011
+++ eggdrop1.6/src/patch.h	Sat Jul  9 09:07:48 2011
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.1260 2011/04/01 12:22:15 pseudo Exp $
+ * $Id: patch.h,v 1.1261 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1301660528");            /* current unixtime */
+patch("1310220507");            /* current unixtime */
 /*
  *
  *
  */
-patch("getudef64");
+patch("tclliststr");
 /*
  *
  *
Index: eggdrop1.6/src/proto.h
diff -u eggdrop1.6/src/proto.h:1.83 eggdrop1.6/src/proto.h:1.84
--- eggdrop1.6/src/proto.h:1.83	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/proto.h	Sat Jul  9 09:07:48 2011
@@ -7,7 +7,7 @@
  * because they use structures in those
  * (saves including those .h files EVERY time) - Beldin
  *
- * $Id: proto.h,v 1.83 2011/02/13 14:19:33 simple Exp $
+ * $Id: proto.h,v 1.84 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -208,6 +208,7 @@
 #define cmp_usermasks(a,b) addr_match((char *)(a),(char *)(b),1,1)
 
 /* mem.c */
+char *n_strdup(const char *, const char *, int);
 void *n_malloc(int, const char *, int);
 void *n_realloc(void *, int, const char *, int);
 void n_free(void *, const char *, int);
Index: eggdrop1.6/src/tcl.c
diff -u eggdrop1.6/src/tcl.c:1.99 eggdrop1.6/src/tcl.c:1.100
--- eggdrop1.6/src/tcl.c:1.99	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/tcl.c	Sat Jul  9 09:07:48 2011
@@ -4,7 +4,7 @@
  *   Tcl initialization
  *   getting and setting Tcl/eggdrop variables
  *
- * $Id: tcl.c,v 1.99 2011/02/13 14:19:33 simple Exp $
+ * $Id: tcl.c,v 1.100 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -91,6 +91,10 @@
 int strict_servernames = 0, enable_simul = 1, use_console_r = 0,
     debug_output = 0;
 
+#ifdef REPLACE_NOTIFIER
+tclevent_t *tclevents = NULL; /* Queue of Tcl snippets to execute */
+#endif
+
 /* Prototypes for Tcl */
 Tcl_Interp *Tcl_CreateInterp();
 
@@ -572,13 +576,54 @@
   add_tcl_ints(def_tcl_ints);
 }
 
-void kill_tcl()
-{
-  rem_tcl_coups(def_tcl_coups);
-  rem_tcl_strings(def_tcl_strings);
-  rem_tcl_ints(def_tcl_ints);
-  kill_bind();
-  Tcl_DeleteInterp(interp);
+/* tcleventcallback that's called after executing Tcl code,
+ * used by do_tcl(). Just logs Tcl errors.
+ */
+void bgtclcallback(char *context, char *script, int code,
+                   const char *result, int dofree) {
+#ifdef USE_TCL_ENCODING
+  Tcl_DString dstr;
+#endif
+
+  if (code == TCL_ERROR) {
+#ifdef USE_TCL_ENCODING
+    /* properly convert string to system encoding. */
+    Tcl_DStringInit(&dstr);
+    Tcl_UtfToExternalDString(NULL, result, -1, &dstr);
+    result = Tcl_DStringValue(&dstr);
+#endif
+    putlog(LOG_MISC, "*", "Tcl error in script for '%s':", context);
+    putlog(LOG_MISC, "*", "%s", result);
+#ifdef USE_TCL_ENCODING
+  Tcl_DStringFree(&dstr);
+#endif
+  }
+  if (dofree) {
+    nfree(context);
+    nfree(script);
+  }
+}
+
+/* Generic function (exported to modules) to execute Tcl code.
+ * context is used to display Tcl errors (Error in '..')
+ *
+ * Schedules execution if defined(REPLACE_NOTIFIER) to bottom of mainloop,
+ * where it's safe to recurse eventually (vwait/update).
+ */
+void do_tcl(char *context, char *script) {
+  do_tcl_async(context, script, bgtclcallback);
+}
+
+/* Evaluates Tcl code.
+ *
+ * Should only be called from reentrant functions (can recurse),
+ * use do_tcl/do_tcl_async instead.
+ */
+void do_tcl_sync(char *context, char *script, tcleventcallback cb, int dofree) {
+  int x;
+
+  x = Tcl_Eval(interp, script);
+  cb(context, script, x, tcl_resultstring(), dofree);
 }
 
 extern tcl_cmds tcluser_cmds[], tcldcc_cmds[], tclmisc_cmds[],
@@ -649,6 +694,27 @@
   return td;
 }
 
+/* Add a script snippet to the queue of Tcl events to execute.
+ * See tclegg.h for the definition of the callback.
+ */
+void do_tcl_async(char *context, char *script, tcleventcallback callback) {
+  tclevent_t *ev, *e = tclevents;
+
+  ev = nmalloc(sizeof(tclevent_t));
+  ev->script = nstrdup(script);
+  ev->context = nstrdup(context);
+  ev->callback = callback;
+  ev->next = NULL;
+
+  if (!e)
+    tclevents = ev;
+  else {
+    while (e->next)
+      e = e->next;
+    e->next = ev;
+  }
+}
+
 #else /* REPLACE_NOTIFIER */
 
 int tclthreadmainloop() { return 0; }
@@ -659,6 +725,11 @@
   return &tsd;
 }
 
+/* Without the replacement notifier, this just executes the script. */
+void do_tcl_async(char *context, char *script, tcleventcallback callback) {
+  do_tcl_sync(context, script, callback, 0);
+}
+
 #endif /* REPLACE_NOTIFIER */
 
 int init_threaddata(int mainthread)
@@ -829,36 +900,26 @@
   add_tcl_commands(tcldns_cmds);
 }
 
-void do_tcl(char *whatzit, char *script)
+void kill_tcl()
 {
-  int code;
-  char *result;
-#ifdef USE_TCL_ENCODING
-  Tcl_DString dstr;
-#endif
-
-  code = Tcl_Eval(interp, script);
-
-#ifdef USE_TCL_ENCODING
-  /* properly convert string to system encoding. */
-  Tcl_DStringInit(&dstr);
-  Tcl_UtfToExternalDString(NULL, tcl_resultstring(), -1, &dstr);
-  result = Tcl_DStringValue(&dstr);
-#else
-  /* use old pre-Tcl 8.1 way. */
-  result = tcl_resultstring();
-#endif
+#ifdef REPLACE_NOTIFIER
+  tclevent_t *ne, *e = tclevents;
 
-  if (code != TCL_OK) {
-    putlog(LOG_MISC, "*", "Tcl error in script for '%s':", whatzit);
-    putlog(LOG_MISC, "*", "%s", result);
+  while (e) {
+    ne = e->next;
+    e->callback(e->context, e->script, -1, "", 1);
+    nfree(e);
+    e = ne;
   }
-
-#ifdef USE_TCL_ENCODING
-  Tcl_DStringFree(&dstr);
 #endif
+  rem_tcl_coups(def_tcl_coups);
+  rem_tcl_strings(def_tcl_strings);
+  rem_tcl_ints(def_tcl_ints);
+  kill_bind();
+  Tcl_DeleteInterp(interp);
 }
 
+
 /* Interpret tcl file fname.
  *
  * returns:   1 - if everything was okay
Index: eggdrop1.6/src/tclegg.h
diff -u eggdrop1.6/src/tclegg.h:1.41 eggdrop1.6/src/tclegg.h:1.42
--- eggdrop1.6/src/tclegg.h:1.41	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/tclegg.h	Sat Jul  9 09:07:48 2011
@@ -2,7 +2,7 @@
  * tclegg.h
  *   stuff used by tcl.c and tclhash.c
  *
- * $Id: tclegg.h,v 1.41 2011/02/13 14:19:33 simple Exp $
+ * $Id: tclegg.h,v 1.42 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -106,6 +106,27 @@
   unsigned long id;             /* Used to remove timers                */
 } tcl_timer_t;
 
+/* Callback that's called after executing a Tcl code snippet.
+ * The arguments are: context, script, resultcode, resultstring, dofree.
+ * If dofree is 1, the callback *must* nfree() both context and script.
+ * resultcode is -1 if the execution is stopped (kill_tcl()).
+ */
+typedef void (*tcleventcallback)(char *, char *, int, const char *, int);
+
+/* This schedules a code snippet to execute, if necessary. */
+void do_tcl_async(char *, char *, tcleventcallback);
+
+#ifdef REPLACE_NOTIFIER
+
+/* Tcl code snippet queue structure */
+typedef struct tclevent {
+  char *script;
+  void *context;
+  tcleventcallback callback;
+  struct tclevent *next;
+} tclevent_t;
+
+#endif
 
 /* Used for Tcl stub functions */
 #define STDVAR (cd, irp, argc, argv)                                    \
@@ -176,6 +197,7 @@
 void rem_tcl_coups(tcl_coups *);
 void add_tcl_ints(tcl_ints *);
 void rem_tcl_ints(tcl_ints *);
+void do_tcl_sync(char *, char *, tcleventcallback, int);
 const char *tcl_resultstring();
 int tcl_resultint();
 int tcl_resultempty();
Index: eggdrop1.6/src/tclhash.c
diff -u eggdrop1.6/src/tclhash.c:1.71 eggdrop1.6/src/tclhash.c:1.72
--- eggdrop1.6/src/tclhash.c:1.71	Sun Feb 13 08:19:33 2011
+++ eggdrop1.6/src/tclhash.c	Sat Jul  9 09:07:48 2011
@@ -7,7 +7,7 @@
  *   (non-Tcl) procedure lookups for msg/dcc/file commands
  *   (Tcl) binding internal procedures to msg/dcc/file commands
  *
- * $Id: tclhash.c,v 1.71 2011/02/13 14:19:33 simple Exp $
+ * $Id: tclhash.c,v 1.72 2011/07/09 15:07:48 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -850,9 +850,13 @@
            */
 
           tc->hits++;
+
           x = trigger_bind(tc->func_name, param, tm->mask);
 
-          if (match_type & BIND_ALTER_ARGS) {
+          if ((tl->flags & HT_DELETED) || (tm->flags & TBM_DELETED)) {
+            /* This bind or bind type was deleted within trigger_bind() */
+            return x;
+          } else if (match_type & BIND_ALTER_ARGS) {
             if (tcl_resultempty())
               return x;
           } else if ((match_type & BIND_STACKRET) && x == BIND_EXEC_LOG) {
@@ -863,9 +867,10 @@
             if (!result)
               result = x;
             continue;
-          } else if ((match_type & BIND_WANTRET) && x == BIND_EXEC_LOG)
+          } else if ((match_type & BIND_WANTRET) && x == BIND_EXEC_LOG) {
             /* Return immediately if any commands return 1 */
             return x;
+          }
         }
       }
     }
@@ -1264,7 +1269,7 @@
   for (i = 0; cc[i].name; i++) {
     egg_snprintf(p, sizeof p, "*%s:%s", tl->name,
                  cc[i].funcname ? cc[i].funcname : cc[i].name);
-    l = nmalloc(Tcl_ScanElement(p, &k));
+    l = nmalloc(Tcl_ScanElement(p, &k) + 1);
     Tcl_ConvertElement(p, l, k | TCL_DONT_USE_BRACES);
     table[0].cdata = (void *) cc[i].func;
     add_cd_tcl_cmds(table);
@@ -1282,7 +1287,7 @@
   for (i = 0; cc[i].name; i++) {
     egg_snprintf(p, sizeof p, "*%s:%s", table->name,
                  cc[i].funcname ? cc[i].funcname : cc[i].name);
-    l = nmalloc(Tcl_ScanElement(p, &k));
+    l = nmalloc(Tcl_ScanElement(p, &k) + 1);
     Tcl_ConvertElement(p, l, k | TCL_DONT_USE_BRACES);
     Tcl_DeleteCommand(interp, p);
     unbind_bind_entry(table, cc[i].flags, cc[i].name, l);
----------------------- End of diff -----------------------


More information about the Changes mailing list