[cvslog] (2003-01-29 05:48:54 UTC) Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Tue Jan 28 23:49:00 CST 2003


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2003-01-29 05:48:53 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

Modified files:
     help/cmds1.help help/cmds2.help help/core.help src/chanprog.c
     src/cmds.c src/eggdrop.h src/flags.h src/lang.h src/main.h
     src/misc.c src/misc_file.c src/modules.h src/net.c src/patch.h
     src/rfc1459.c src/stat.h src/tandem.h src/tcl.c src/tcldcc.c
     src/tclegg.h src/tclhash.c src/tclhash.h src/users.h
     src/compat/gnu_strftime.c src/compat/inet_aton.c
     src/compat/inet_aton.h src/compat/memcpy.h src/compat/memset.h
     src/compat/snprintf.c src/compat/snprintf.h
     src/compat/strcasecmp.h src/compat/strftime.c
     src/compat/strftime.h src/md5/md5c.c src/mod/module.h
     src/mod/modvals.h src/mod/assoc.mod/assoc.c
     src/mod/assoc.mod/assoc.h src/mod/assoc.mod/help/assoc.help
     src/mod/blowfish.mod/blowfish.h src/mod/channels.mod/channels.c
     src/mod/channels.mod/channels.h src/mod/channels.mod/cmdschan.c
     src/mod/channels.mod/tclchan.c src/mod/channels.mod/userchan.c
     src/mod/channels.mod/help/chaninfo.help
     src/mod/channels.mod/help/channels.help
     src/mod/channels.mod/help/set/channels.help
     src/mod/compress.mod/compress.c src/mod/compress.mod/compress.h
     src/mod/compress.mod/tclcompress.c src/mod/console.mod/console.h
     src/mod/console.mod/help/console.help src/mod/dns.mod/coredns.c
     src/mod/dns.mod/dns.h src/mod/filesys.mod/filedb3.c
     src/mod/filesys.mod/filedb3.h src/mod/filesys.mod/filesys.c
     src/mod/filesys.mod/help/filesys.help
     src/mod/filesys.mod/language/filesys.french.lang
     src/mod/irc.mod/chan.c src/mod/irc.mod/irc.h
     src/mod/irc.mod/msgcmds.c src/mod/irc.mod/help/irc.help
     src/mod/irc.mod/help/set/irc.help src/mod/notes.mod/notes.h
     src/mod/notes.mod/help/notes.help
     src/mod/notes.mod/help/set/notes.help
     src/mod/notes.mod/language/notes.french.lang
     src/mod/seen.mod/help/seen.help
     src/mod/seen.mod/help/msg/seen.help src/mod/server.mod/server.c
     src/mod/server.mod/server.h src/mod/server.mod/help/server.help
     src/mod/server.mod/help/set/server.help src/mod/share.mod/share.c
     src/mod/share.mod/share.h src/mod/share.mod/uf_features.c
     src/mod/share.mod/help/share.help src/mod/transfer.mod/transfer.c
     src/mod/transfer.mod/transfer.h
     src/mod/transfer.mod/language/transfer.english.lang
     src/mod/transfer.mod/language/transfer.french.lang
     src/mod/uptime.mod/uptime.c src/mod/wire.mod/wire.h
     src/mod/woobie.mod/woobie.c

Log message:

* Removed unused define ASSOC_NOSUCHCMD.
* More indenting.
* Help file cleanups.
* Fixed a warning from last commit.

---------------------- diff included ----------------------
Index: eggdrop1.6/help/cmds1.help
diff -u eggdrop1.6/help/cmds1.help:1.12 eggdrop1.6/help/cmds1.help:1.13
--- eggdrop1.6/help/cmds1.help:1.12	Fri Jan 17 22:24:41 2003
+++ eggdrop1.6/help/cmds1.help	Tue Jan 28 23:48:40 2003
@@ -23,7 +23,7 @@
    comment and ignoretime. This command can be used to either ignore
    users on irc, or to ignore incoming telnet connections. Ignoretime
    has to be expressed in days, hours and/or minutes.
-   
+
 See also: -ignore, ignores
 %{help=+user}%{+m}
 ###  %b+user%b <nickname> <hostmask>
@@ -34,7 +34,7 @@
 ###  %b-bot%b <bot>
    Exactly the same as %b'-user'%b, but is included for convenience.
    It erases a user record.
-   
+
 See also: +bot, +user, -user
 %{help=-host}
 ###  %b-host%b <hostmask>
@@ -48,12 +48,12 @@
 ###  %b-ignore%b <hostmask OR number>
    Removes the ignore from the list of ignores stored on the bot --
    You may also reference the ignore by the number shown in '.ignores'.
-   
+
 See also: +ignore, ignores
 %{help=-user}%{+m}
 ###  %b-user%b <nickname>
    Erases the user record for the nickname given.
-   
+
 See also:  +user, +bot, -bot
 %{help=addlog}%{+to|o}
 ###  %baddlog%b <text>
@@ -69,7 +69,7 @@
    something on the party line will automatically remove your "away"
    status, or you can type %b'.back'%b or %b'.away'%b by itself.
 %{help=back}
-###  %bback%b 
+###  %bback%b
    This marks you un-away on the party line.
 %{help=banner}%{+t}
 ###  %bbanner%b <text>
@@ -88,13 +88,13 @@
    records the number of times that binding has been called.
    If not, go read the file %b'tcl-commands.doc'%b for help on the
    Tcl bind command.  Note that the builtin commands are now shown.
-   You may also specify a type of binding to show (i.e., 
-   %b'.binds msg'%b) or you can specify a wild card match (i.e., 
+   You may also specify a type of binding to show (i.e.,
+   %b'.binds msg'%b) or you can specify a wild card match (i.e.,
    %b'.binds *seen*'%b) if you want to narrow the field a bit.
    The wild card matches will match against the TYPE, COMMAND and
    BINDING fields.
 ###  %bbinds%b [type] %ball%b
-   Displays all the Tcl bindings of every type (or the specified 
+   Displays all the Tcl bindings of every type (or the specified
    type), including the bindings for built in commands such as:
         msg  -    op                   *msg:op
 %{help=boot}%{+t}
@@ -112,7 +112,7 @@
       .botattr Fred1 +s-h
 
    Whether or not you change any flags, it will show you the bot's
-   attributes afterwards.  
+   attributes afterwards.
    To get a list of the flags possible, do %b'help whois'%b.
    %bNOTE:%b This command is NOT used to replace .chattr,
    it modifies botflags such as +s, +h, +a, +u... bot specific
@@ -139,7 +139,7 @@
    physically. if 2 bots are sharing, a + will be indicated, or a ?
    if nothing is known.
    Use vbottree if you want to know bot versions as well.
-   
+
 See also: bots, botinfo
 %{help=chaddr}%{+t}
 ###  %bchaddr %b<bot> <address:botport#/userport#>
@@ -147,7 +147,7 @@
    your bot will try to telnet to in order to create a connection
    and link up.  If the bot has a separate port for bots and users
    they should be separated with a slash (/).
-   
+
 See also: link, +bot
 %{help=chat}
 ###  %bchat off%b
@@ -156,9 +156,9 @@
    connect to the bot, it places you on channel 0 (the party line).
    You can move to another channel where basically nobody can see
    you (except anyone else who decides to join that channel).  Valid
-   channel numbers are 1 through 99999.  
+   channel numbers are 1 through 99999.
 
-   Some channels may have assigned names if the assoc module is 
+   Some channels may have assigned names if the assoc module is
    loaded.  For those, you can specify the channel by name instead
    of number if you wish.
 
@@ -191,7 +191,7 @@
       .chattr Bill f|o #lamer   (global +f, +o #lamer)
 
    Whether or not you change any flags, it will show you the user's
-   attributes afterwards.  
+   attributes afterwards.
 
    To get a list of the flags possible, do %b'help whois'%b.
 
@@ -219,7 +219,7 @@
    password, the user effectively no longer has a password set.  A
    password is needed to get ops, join the party line, and other
    things (but only required if one is set).
- 
+
    %bNOTE:%b In previous versions, setting a password to "nopass" would
      clear a user's password -- with encrypted passwords, this no
      longer works!
@@ -297,7 +297,7 @@
       conn  pending telnet connection (chat, relay, bot-link, etc)
       new   new user via telnet, entering a handle
       newp  new user via telnet, entering a password
- 
+
    in addition, 'chat' and 'bot' have flags listed for each con-
    nection.  capital letters mean the flag is on, and lowercase
    letters mean the flag is off.  for 'chat', the flags are:
Index: eggdrop1.6/help/cmds2.help
diff -u eggdrop1.6/help/cmds2.help:1.15 eggdrop1.6/help/cmds2.help:1.16
--- eggdrop1.6/help/cmds2.help:1.15	Thu Jun 13 22:46:48 2002
+++ eggdrop1.6/help/cmds2.help	Tue Jan 28 23:48:40 2003
@@ -27,7 +27,7 @@
 
    if you use %b'ignores <wildcard>'%b it will list all the ignores
    that match against your wildcard.
-   
+
 see also: +ignore, -ignore, set ignore-time
 %{help=link}%{+t}
 ###  %blink%b [some-bot] <new-bot>
@@ -44,7 +44,7 @@
    Loads a module.
 %{help=match}%{+o|o}
 ###  %bmatch%b <attr> [channel] [[start] limit]
-   shows you user records with the attributes requested: 
+   shows you user records with the attributes requested:
    <attr> is of the form:  <+/-><global>[&/|<channel>[&/|<bot>]]
     specifying & as the separator, will cause AND style matching,
     | will cause OR style matching, channel flags are match vs
@@ -52,7 +52,7 @@
     is match vs the separate bot flags.
     some examples:
        .match +o     will match any GLOBAL +o's
-       .match -o&+o  will match anyone without a global +o AND 
+       .match -o&+o  will match anyone without a global +o AND
                           with a channel +o on your console channel
        .match +f|+f  will match anyone with a global +f or a
                           channel +f on your console channel
@@ -77,7 +77,7 @@
 %{help=module}%{+n}
 ###  %bmodule%b [modulename]
    Reports the names of currently loaded modules, including
-   dependencies & status report, you can get info only on a 
+   dependencies & status report, you can get info only on a
    specific module by specifying it.
 %{help=modules}%{+n}
 ###  %bmodules%b [botname]
@@ -111,7 +111,7 @@
    you join the channel, and have notes stored for you on the bot,
    it will tell you.  to send a note to someone on a different bot,
    use "nick at bot" for the nickname.
-   
+
 see also: whom, notes
 %{help=page}
 ### %bpage%b <# or off>
@@ -132,7 +132,7 @@
    variables and reloads any Tcl scripts your config loads.  it
    also saves and reloads the user file from disk, just to give
    your disk a little extra wear.
-   
+
 see also: save, reload, restart
 %{help=rehelp}%{+n}
 ###  %brehelp%b
@@ -145,20 +145,20 @@
    connection to this bot will be relayed to the other bot until the
    other bot drops your relay, or until you send "*bye*" on a line by
    itself.
-   
+
 see also: bots
 %{help=reload}%{+m|m}
 ###  %breload%b
    reloads the user file of the bot, discarding any changes made
    since the last %b'.save'%b or hourly user file save.  sharebots
    should probably not ever do this.
-   
+
 see also: rehash, save
 %{help=traffic}%{+m|m}
 ###  %btraffic%b
    shows total and daily net traffic stats since last %b'.restart'%b.
    stats groups are IRC, Botnet, Partyline, Transfer.mod and Misc.
-   
+
 see also: restart
 %{help=whoami}
 ###  %bwhoami%b
@@ -171,14 +171,14 @@
    also saves and reloads the user file from disk, just to give
    your disk a little extra wear. it's also the most risky command
    to run, because it's never ever really worked properly.
-   
+
 see also: rehash, reload, save
 %{help=save}%{+m|m}
 ###  %bsave%b
    makes the bot write its entire user list to the disk.  this is
    useful if you think the bot is about to crash or something, since
    the user file is only written to disk about once an hour.
-   
+
 see also: reload, rehash
 %{help=backup}%{+m|m}
 ###  %bbackup%b
@@ -187,7 +187,7 @@
    channels file.
    this is useful if you feel the need to backup the user list and
    the channels settings.
-   
+
 see also: reload, rehash
 %{help=simul}%{+n}
 ###  %bsimul%b <nickname> <text>
@@ -215,7 +215,7 @@
    set their own strip flags without starting the modes with a +/-
 %{help=su}
 ###  %bsu%b <user>
-   changes your username to that of another. If you 
+   changes your username to that of another. If you
    are an owner this does not require a password
    otherwise, you must enter the password of <user>.
 
@@ -229,7 +229,7 @@
    it's a list of the bots between you and the destination bot.
    it should also return the time in seconds it took for the
    trace to occur.
-   
+
 see also: bots, bottree
 %{help=unlink}%{+t}
 ###  %bunlink%b <bot>
@@ -238,7 +238,7 @@
    particular) might not allow you to unlink them.
 ###  %bunlink%b *
    disconnects from all bots
-   
+
 see also: link, bots, bottree
 %{help=unloadmod}%{+n}
 ###  %bunloadmod%b <module>
@@ -249,7 +249,7 @@
    line (formed when you have two or more bots linked together).
    it will show each user's nickname, preceded by a "*" if they
    are the owner of their bot, "+" if they are a master, "%%" if
-   they are a botnet master or "@" if they are an op.  in other 
+   they are a botnet master or "@" if they are an op.  in other
    columns it will show which bot the user is on, and his or her host.
 
    if the user is away, the away message will be shown.  likewise,
@@ -259,7 +259,7 @@
    0), then this will show the people on every bot who are on
    your current channel.  you can also optionally give the "channel"
    option to list who is on a particular channel.
-   
+
 see also: who, bots, chat
 %{help=who}
 ###  %bwho%b [bot]
@@ -268,7 +268,7 @@
    line, if you haven't changed channels) who are on the bot.
    a '*' next to the nickname means that user is an owner; '+'
    means they're a master; '@' means they're an op, '%%' means
-   they are a botnet master. the user's nickname, hostname, and 
+   they are a botnet master. the user's nickname, hostname, and
    possibly an idle time and/or away message will be displayed:
 %{+n}
    Owners will also see the users dcc idx
@@ -295,13 +295,13 @@
    if you specify a bot's name, as in %b'.who valis'%b, the who request
    will be sent to that bot, as long as that bot is on the botnet.
 %{+m}
-  
+
    masters may also see "(con)" after a user's entry, this shows that
    user's console modes (see the %b'.console'%b help page).
-  
+
    in the final section (users that aren't on this channel), masters
    will see the actual channel other users are on.  also, people in
-   the file system will be listed (as being in channel "files") -- 
+   the file system will be listed (as being in channel "files") --
    a '+' next to the nickname here means the user has access to return
    to the party line.
 %{-}
@@ -317,7 +317,7 @@
       FLAGS        the list of flags for this user (see below)
       LAST         the time or date that the user was last on the
                       channel
-   
+
    the valid flags under FLAGS are:
       a   global auto-op (user is opped automatically upon joining a channel)
       b   bot (user is a bot)
@@ -343,9 +343,9 @@
       x   xfer (user has file-area access)
       y   global auto-halfop (user is halfopped automatically upon joining a channel)
       z   global washalfop-test (needs washalfop test for +stopnethack procedure)
-      
+
       (plus 26 user-defined flags, A-Z)
-   
+
    each channel that the user has joined will have a specific record
    for it, with the channel-specific flags and possibly an info
    line.  the channel-specific flags are:
@@ -368,14 +368,14 @@
       z   washalfop-test (needs washalfop test for +stopnethack procedure)
 
       (plus 26 user-defined flags, A-Z)
-   
+
    hostmasks for the user are displayed on the following lines.
    if the user entry is for a bot, there will be a line below which
    says "ADDRESS:" and gives the bot's telnet address.  some user
    entries may have "EMAIL:" and "INFO:" entries too.
-   There may be additional information displayed depending on the 
+   There may be additional information displayed depending on the
    modules loaded.
-   
+
    for bots, there are additional flags seen under the BOTATTR:
    entry, these include:
       s   share (bot is sharing user records, aggressively)
@@ -412,7 +412,7 @@
 
    the second line, tell what operating system the bot is running
    under.
-   
+
    the third line, if present, is the contents of your 'admin'
    line in the config file.
 
Index: eggdrop1.6/help/core.help
diff -u eggdrop1.6/help/core.help:1.10 eggdrop1.6/help/core.help:1.11
--- eggdrop1.6/help/core.help:1.10	Tue Jan 15 21:24:16 2002
+++ eggdrop1.6/help/core.help	Tue Jan 28 23:48:40 2003
@@ -2,15 +2,15 @@
 ###  %b(the +c 'common' flag)%b
    Sometimes a lot of people use irc from the same account, i.e.
    example, a public telnet site.  In that case, many people can
-   have the same user at host.  For that reason, they can't use a 
-   traditional user record because they will appear to all be 
+   have the same user at host.  For that reason, they can't use a
+   traditional user record because they will appear to all be
    the same person.
-  
+
    In such cases, create a user record for the account, and mark
-   it +c, or "common access".  Marking it as "common access" means 
-   that it shouldn't be used as a definitive address.  When someone 
-   introduces themselves to the bot (i.e., by /msg'ing "hello")and matches 
-   as a +c user, they will be given a new user record which identifies 
+   it +c, or "common access".  Marking it as "common access" means
+   that it shouldn't be used as a definitive address.  When someone
+   introduces themselves to the bot (i.e., by /msg'ing "hello")and matches
+   as a +c user, they will be given a new user record which identifies
    them BY NICKNAME.
 
    Obviously people with that kind of user record shouldn't be given
@@ -66,7 +66,7 @@
    Removes a language from the language list. All sections are checked if
    they are using the language and if so, try to load the next available
    language instead.
- 
+
 See also: +lang, +lsec, -lsec, lstat, relang
 %{help=+lsec}%{+n}
 ###  %b+lsec%b <section>
@@ -106,7 +106,7 @@
   %b.handle%b <handle>   changes nick on party line
   %b.help%b <command>    get more help on a specific command
 The following commands are also available:
-%b   bots      newpass   email     who       echo   %b    
+%b   bots      newpass   email     who       echo   %b
 %b   info      away      back      strip     trace%b
 %b   page      su        fixcodes  motd      whom%b
 %b%{+x}   files%{-}%b
Index: eggdrop1.6/src/chanprog.c
diff -u eggdrop1.6/src/chanprog.c:1.38 eggdrop1.6/src/chanprog.c:1.39
--- eggdrop1.6/src/chanprog.c:1.38	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/chanprog.c	Tue Jan 28 23:48:40 2003
@@ -7,7 +7,7 @@
  *   telling the current programmed settings
  *   initializing a lot of stuff and loading the tcl scripts
  *
- * $Id: chanprog.c,v 1.38 2003/01/28 06:37:24 wcc Exp $
+ * $Id: chanprog.c,v 1.39 2003/01/29 05:48:40 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -659,9 +659,11 @@
   char nl, pl;
 
   if (!owner || !*owner)
-    return (0);
+    return 0;
+
   if (!name || !*name)
-    return (0);
+    return 0;
+
   nl = strlen(name);
   pa = owner;
   pb = owner;
@@ -673,14 +675,14 @@
     }
     pl = (unsigned int) pb - (unsigned int) pa;
     if (pl == nl && !egg_strncasecmp(pa, name, nl))
-      return (1);
+      return 1;
     while (1) {
       if ((*pb == 0) || ((*pb != ',') && (*pb != ' ')))
         break;
       pb++;
     }
     if (*pb == 0)
-      return (0);
+      return 0;
     pa = pb;
   }
 }
Index: eggdrop1.6/src/cmds.c
diff -u eggdrop1.6/src/cmds.c:1.87 eggdrop1.6/src/cmds.c:1.88
--- eggdrop1.6/src/cmds.c:1.87	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/cmds.c	Tue Jan 28 23:48:40 2003
@@ -3,7 +3,7 @@
  *   commands from a user via dcc
  *   (split in 2, this portion contains no-irc commands)
  *
- * $Id: cmds.c,v 1.87 2003/01/28 06:37:24 wcc Exp $
+ * $Id: cmds.c,v 1.88 2003/01/29 05:48:40 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -873,7 +873,7 @@
     else if (isowner(hand) && egg_strcasecmp(dcc[idx].nick, hand))
       dprintf(idx, "You can't change a permanent bot owner's handle.\n");
     else if (!egg_strcasecmp(newhand, botnetnick) && (!(atr2 & USER_BOT) ||
-                                                      nextbot(hand) != -1))
+             nextbot(hand) != -1))
       dprintf(idx, "Hey! That's MY name!\n");
     else if (change_handle(u2, newhand)) {
       putlog(LOG_CMDS, "*", "#%s# chhandle %s %s", dcc[idx].nick,
@@ -1290,8 +1290,8 @@
         (!egg_strcasecmp(u->handle, dcc[i].nick))) {
       stat = dcc[i].status;
       if ((dcc[i].type == &DCC_CHAT) &&
-          ((u->flags & (USER_OP | USER_MASTER | USER_OWNER | USER_BOTMAST))
-           != (oatr & (USER_OP | USER_MASTER | USER_OWNER | USER_BOTMAST)))) {
+          ((u->flags & (USER_OP | USER_MASTER | USER_OWNER | USER_BOTMAST)) !=
+          (oatr & (USER_OP | USER_MASTER | USER_OWNER | USER_BOTMAST)))) {
         botnet_send_join_idx(i, -1);
       }
       if ((oatr & USER_MASTER) && !(u->flags & USER_MASTER)) {
Index: eggdrop1.6/src/compat/gnu_strftime.c
diff -u eggdrop1.6/src/compat/gnu_strftime.c:1.2 eggdrop1.6/src/compat/gnu_strftime.c:1.3
--- eggdrop1.6/src/compat/gnu_strftime.c:1.2	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/compat/gnu_strftime.c	Tue Jan 28 23:48:41 2003
@@ -136,7 +136,7 @@
 #ifndef __isleap
 /* Nonzero if YEAR is a leap year (every 4 years,
    except every 100th isn't, and every 400th is).  */
-# define __isleap(year)	\
+# define __isleap(year) \
   ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
 #endif
 
@@ -195,66 +195,66 @@
     '0' };
 
 # define memset_space(P, Len) \
-  do {									      \
-    int _len = (Len);							      \
-									      \
-    do									      \
-      {									      \
-	int _this = _len > 16 ? 16 : _len;				      \
-	(P) = MEMPCPY ((P), spaces, _this);				      \
-	_len -= _this;							      \
-      }									      \
-    while (_len > 0);							      \
+  do {                                                                        \
+    int _len = (Len);                                                         \
+                                                                              \
+    do                                                                        \
+      {                                                                       \
+        int _this = _len > 16 ? 16 : _len;                                    \
+        (P) = MEMPCPY ((P), spaces, _this);                                   \
+        _len -= _this;                                                        \
+      }                                                                       \
+    while (_len > 0);                                                         \
   } while (0)
 
 # define memset_zero(P, Len) \
-  do {									      \
-    int _len = (Len);							      \
-									      \
-    do									      \
-      {									      \
-	int _this = _len > 16 ? 16 : _len;				      \
-	(P) = MEMPCPY ((P), zeroes, _this);				      \
-	_len -= _this;							      \
-      }									      \
-    while (_len > 0);							      \
+  do {                                                                        \
+    int _len = (Len);                                                         \
+                                                                              \
+    do                                                                        \
+      {                                                                       \
+        int _this = _len > 16 ? 16 : _len;                                    \
+        (P) = MEMPCPY ((P), zeroes, _this);                                   \
+        _len -= _this;                                                        \
+      }                                                                       \
+    while (_len > 0);                                                         \
   } while (0)
 #else
 # define memset_space(P, Len) (memset ((P), ' ', (Len)), (P) += (Len))
 # define memset_zero(P, Len) (memset ((P), '0', (Len)), (P) += (Len))
 #endif
 
-#define add(n, f)							      \
-  do									      \
-    {									      \
-      int _n = (n);							      \
-      int _delta = width - _n;						      \
-      int _incr = _n + (_delta > 0 ? _delta : 0);			      \
-      if (i + _incr >= maxsize)						      \
-	return 0;							      \
-      if (p)								      \
-	{								      \
-	  if (_delta > 0)						      \
-	    {								      \
-	      if (pad == '0')						      \
-		memset_zero (p, _delta);				      \
-	      else							      \
-		memset_space (p, _delta);				      \
-	    }								      \
-	  f;								      \
-	  p += _n;							      \
-	}								      \
-      i += _incr;							      \
+#define add(n, f)                                                             \
+  do                                                                          \
+    {                                                                         \
+      int _n = (n);                                                           \
+      int _delta = width - _n;                                                \
+      int _incr = _n + (_delta > 0 ? _delta : 0);                             \
+      if (i + _incr >= maxsize)                                               \
+        return 0;                                                             \
+      if (p)                                                                  \
+        {                                                                     \
+          if (_delta > 0)                                                     \
+            {                                                                 \
+              if (pad == '0')                                                 \
+                memset_zero (p, _delta);                                      \
+              else                                                            \
+                memset_space (p, _delta);                                     \
+            }                                                                 \
+          f;                                                                  \
+          p += _n;                                                            \
+        }                                                                     \
+      i += _incr;                                                             \
     } while (0)
 
 #define cpy(n, s) \
-    add ((n),								      \
-	 if (to_lowcase)						      \
-	   memcpy_lowcase (p, (s), _n);					      \
-	 else if (to_uppcase)						      \
-	   memcpy_uppcase (p, (s), _n);					      \
-	 else								      \
-	   memcpy ((PTR) p, (PTR) (s), _n))
+    add ((n),                                                                 \
+         if (to_lowcase)                                                      \
+           memcpy_lowcase (p, (s), _n);                                       \
+         else if (to_uppcase)                                                 \
+           memcpy_uppcase (p, (s), _n);                                       \
+         else                                                                 \
+           memcpy ((PTR) p, (PTR) (s), _n))
 
 
 
@@ -705,11 +705,11 @@
     format_char = *f;
     switch (format_char) {
 #define DO_NUMBER(d, v) \
-	  digits = width == -1 ? d : width;				      \
-	  number_value = v; goto do_number
+          digits = width == -1 ? d : width;                                   \
+          number_value = v; goto do_number
 #define DO_NUMBER_SPACEPAD(d, v) \
-	  digits = width == -1 ? d : width;				      \
-	  number_value = v; goto do_number_spacepad
+          digits = width == -1 ? d : width;                                   \
+          number_value = v; goto do_number_spacepad
 
     case '%':
       if (modifier != 0)
Index: eggdrop1.6/src/compat/inet_aton.c
diff -u eggdrop1.6/src/compat/inet_aton.c:1.9 eggdrop1.6/src/compat/inet_aton.c:1.10
--- eggdrop1.6/src/compat/inet_aton.c:1.9	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/compat/inet_aton.c	Tue Jan 28 23:48:41 2003
@@ -1,7 +1,7 @@
 /*
  * inet_aton.c -- provides inet_aton() if necessary.
  *
- * $Id: inet_aton.c,v 1.9 2003/01/28 06:37:25 wcc Exp $
+ * $Id: inet_aton.c,v 1.10 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Portions Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -26,7 +26,7 @@
 
 #ifndef HAVE_ISASCII
 /* Let all checks succeed if we don't have isascii(). */
-#  define isascii(x)	1
+#  define isascii(x) 1
 #endif
 
 #ifndef HAVE_INET_ATON
@@ -46,8 +46,8 @@
  *    documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software
  *    must display the following acknowledgement:
- * 	This product includes software developed by the University of
- * 	California, Berkeley and its contributors.
+ *      This product includes software developed by the University of
+ *      California, Berkeley and its contributors.
  * 4. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
@@ -87,7 +87,7 @@
 #if defined(LIBC_SCCS) && !defined(lint)
 static char sccsid[] = "@(#)inet_addr.c	8.1 (Berkeley) 6/17/93";
 static char rcsid[] =
-  "$-Id: inet_addr.c,v 1.11 1999/04/29 18:19:53 drepper Exp $";
+            "$-Id: inet_addr.c,v 1.11 1999/04/29 18:19:53 drepper Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
@@ -180,9 +180,9 @@
 
   if (addr)
     addr->s_addr = htonl(val);
-  return (1);
+  return 1;
 
 ret_0:
-  return (0);
+  return 0;
 }
 #endif /* HAVE_INET_ATON */
Index: eggdrop1.6/src/compat/inet_aton.h
diff -u eggdrop1.6/src/compat/inet_aton.h:1.6 eggdrop1.6/src/compat/inet_aton.h:1.7
--- eggdrop1.6/src/compat/inet_aton.h:1.6	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/compat/inet_aton.h	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * inet_aton.h
  *   prototypes for inet_aton.c
  *
- * $Id: inet_aton.h,v 1.6 2003/01/28 06:37:25 wcc Exp $
+ * $Id: inet_aton.h,v 1.7 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -34,7 +34,7 @@
 /* Use our own implementation. */
 int egg_inet_aton(const char *cp, struct in_addr *addr);
 #else
-#  define egg_inet_aton	inet_aton
+#  define egg_inet_aton inet_aton
 #endif
 
 #endif /* !__EGG_COMPAT_INET_ATON_H */
Index: eggdrop1.6/src/compat/memcpy.h
diff -u eggdrop1.6/src/compat/memcpy.h:1.6 eggdrop1.6/src/compat/memcpy.h:1.7
--- eggdrop1.6/src/compat/memcpy.h:1.6	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/compat/memcpy.h	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * memcpy.h
  *   prototypes for memcpy.c
  *
- * $Id: memcpy.h,v 1.6 2003/01/28 06:37:25 wcc Exp $
+ * $Id: memcpy.h,v 1.7 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -32,7 +32,7 @@
 /* Use our own implementation. */
 void *egg_memcpy(void *dest, const void *src, size_t n);
 #else
-#  define egg_memcpy	memcpy
+#  define egg_memcpy memcpy
 #endif
 
 #endif /* !__EGG_COMPAT_MEMCPY_H */
Index: eggdrop1.6/src/compat/memset.h
diff -u eggdrop1.6/src/compat/memset.h:1.6 eggdrop1.6/src/compat/memset.h:1.7
--- eggdrop1.6/src/compat/memset.h:1.6	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/compat/memset.h	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * memset.h
  *   prototypes for memset.c
  *
- * $Id: memset.h,v 1.6 2003/01/28 06:37:25 wcc Exp $
+ * $Id: memset.h,v 1.7 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -32,11 +32,11 @@
 /* Use our own implementation. */
 void *egg_memset(void *dest, int c, size_t n);
 #else
-#  define egg_memset	memset
+#  define egg_memset memset
 #endif
 
 /* Use memset instead of bzero.
  */
-#define egg_bzero(dest, n)	egg_memset(dest, 0, n)
+#define egg_bzero(dest, n) egg_memset(dest, 0, n)
 
 #endif /* !__EGG_COMPAT_MEMSET_H */
Index: eggdrop1.6/src/compat/snprintf.c
diff -u eggdrop1.6/src/compat/snprintf.c:1.8 eggdrop1.6/src/compat/snprintf.c:1.9
--- eggdrop1.6/src/compat/snprintf.c:1.8	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/compat/snprintf.c	Tue Jan 28 23:48:41 2003
@@ -1,7 +1,7 @@
 /*
  * snprintf.c - a portable implementation of snprintf and vsnprintf
  *
- * $Id: snprintf.c,v 1.8 2003/01/28 06:37:25 wcc Exp $
+ * $Id: snprintf.c,v 1.9 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Portions Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -99,23 +99,23 @@
 #    endif
 #  endif
 #  define HAVE_STDARGS          /* let's hope that works everywhere (mj) */
-#  define VA_LOCAL_DECL	va_list ap
-#  define VA_START(f)	va_start(ap, f)
-#  define VA_SHIFT(v,t)	;       /* no-op for ANSI */
-#  define VA_END	va_end(ap)
+#  define VA_LOCAL_DECL va_list ap
+#  define VA_START(f)   va_start(ap, f)
+#  define VA_SHIFT(v,t) ;       /* no-op for ANSI */
+#  define VA_END        va_end(ap)
 #else
 #  include <varargs.h>
 #  undef HAVE_STDARGS
-#  define VA_LOCAL_DECL	va_list ap
-#  define VA_START(f)	va_start(ap)    /* f is ignored! */
-#  define VA_SHIFT(v,t)	v = va_arg(ap,t)
-#  define VA_END	va_end(ap)
+#  define VA_LOCAL_DECL va_list ap
+#  define VA_START(f)   va_start(ap)    /* f is ignored! */
+#  define VA_SHIFT(v,t) v = va_arg(ap,t)
+#  define VA_END        va_end(ap)
 #endif
 
 #ifdef HAVE_LONG_DOUBLE
-#define LDOUBLE	long double
+#define LDOUBLE long double
 #else
-#define LDOUBLE	double
+#define LDOUBLE double
 #endif
 
 static void dopr(char *buffer, size_t maxlen, const char *format, va_list args);
@@ -142,13 +142,13 @@
 #define DP_S_DONE    7
 
 /* format flags - Bits */
-#define DP_F_MINUS 	(1 << 0)
-#define DP_F_PLUS  	(1 << 1)
-#define DP_F_SPACE 	(1 << 2)
-#define DP_F_NUM   	(1 << 3)
-#define DP_F_ZERO  	(1 << 4)
-#define DP_F_UP    	(1 << 5)
-#define DP_F_UNSIGNED 	(1 << 6)
+#define DP_F_MINUS      (1 << 0)
+#define DP_F_PLUS       (1 << 1)
+#define DP_F_SPACE      (1 << 2)
+#define DP_F_NUM        (1 << 3)
+#define DP_F_ZERO       (1 << 4)
+#define DP_F_UP         (1 << 5)
+#define DP_F_UNSIGNED   (1 << 6)
 
 /* Conversion Flags */
 #define DP_C_SHORT   1
Index: eggdrop1.6/src/compat/snprintf.h
diff -u eggdrop1.6/src/compat/snprintf.h:1.10 eggdrop1.6/src/compat/snprintf.h:1.11
--- eggdrop1.6/src/compat/snprintf.h:1.10	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/compat/snprintf.h	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * snprintf.h
  *   header file for snprintf.c
  *
- * $Id: snprintf.h,v 1.10 2003/01/28 06:37:25 wcc Exp $
+ * $Id: snprintf.h,v 1.11 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -34,7 +34,7 @@
 #ifndef HAVE_VSNPRINTF
 int egg_vsnprintf(char *str, size_t count, const char *fmt, va_list ap);
 #else
-#  define egg_vsnprintf	vsnprintf
+#  define egg_vsnprintf vsnprintf
 #endif
 
 /* Use the system libraries version of snprintf() if available. Otherwise
@@ -47,7 +47,7 @@
 int egg_snprintf();
 #  endif
 #else
-#  define egg_snprintf	snprintf
+#  define egg_snprintf snprintf
 #endif
 
 #endif /* !_EGG_COMPAT_SNPRINTF_H_ */
Index: eggdrop1.6/src/compat/strcasecmp.h
diff -u eggdrop1.6/src/compat/strcasecmp.h:1.6 eggdrop1.6/src/compat/strcasecmp.h:1.7
--- eggdrop1.6/src/compat/strcasecmp.h:1.6	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/compat/strcasecmp.h	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * strcasecmp.h
  *   prototypes for strcasecmp.c
  *
- * $Id: strcasecmp.h,v 1.6 2003/01/28 06:37:25 wcc Exp $
+ * $Id: strcasecmp.h,v 1.7 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -33,14 +33,14 @@
 /* Use our own implementation. */
 int egg_strcasecmp(const char *, const char *);
 #else
-#  define egg_strcasecmp	strcasecmp
+#  define egg_strcasecmp strcasecmp
 #endif
 
 #ifndef HAVE_STRNCASECMP
 /* Use our own implementation. */
 int egg_strncasecmp(const char *, const char *, size_t);
 #else
-#  define egg_strncasecmp	strncasecmp
+#  define egg_strncasecmp strncasecmp
 #endif
 
 #endif /* !__EGG_COMPAT_STRCASECMP_H */
Index: eggdrop1.6/src/compat/strftime.c
diff -u eggdrop1.6/src/compat/strftime.c:1.5 eggdrop1.6/src/compat/strftime.c:1.6
--- eggdrop1.6/src/compat/strftime.c:1.5	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/compat/strftime.c	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * strftime.c
  *   Portable strftime implementation. Uses GNU's strftime().
  *
- * $Id: strftime.c,v 1.5 2003/01/28 06:37:25 wcc Exp $
+ * $Id: strftime.c,v 1.6 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -29,7 +29,7 @@
 #ifndef HAVE_STRFTIME
 #  undef emacs
 #  undef _LIBC
-#  define strftime	egg_strftime
+#  define strftime egg_strftime
 
 #  include "gnu_strftime.c"
 #endif /* !HAVE_STRFTIME */
Index: eggdrop1.6/src/compat/strftime.h
diff -u eggdrop1.6/src/compat/strftime.h:1.5 eggdrop1.6/src/compat/strftime.h:1.6
--- eggdrop1.6/src/compat/strftime.h:1.5	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/compat/strftime.h	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * strftime.h
  *   header file for strftime.c
  *
- * $Id: strftime.h,v 1.5 2003/01/28 06:37:25 wcc Exp $
+ * $Id: strftime.h,v 1.6 2003/01/29 05:48:41 wcc Exp $
  */
 /* 
  * Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -36,7 +36,7 @@
 size_t egg_strftime(char *s, size_t maxsize, const char *format,
                     const struct tm *tp);
 #else
-#  define egg_strftime	strftime
+#  define egg_strftime strftime
 #endif
 
 #endif /* !_EGG_COMPAT_STRFTIME_H_ */
Index: eggdrop1.6/src/eggdrop.h
diff -u eggdrop1.6/src/eggdrop.h:1.43 eggdrop1.6/src/eggdrop.h:1.44
--- eggdrop1.6/src/eggdrop.h:1.43	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/eggdrop.h	Tue Jan 28 23:48:40 2003
@@ -4,7 +4,7 @@
  *
  *   IF YOU ALTER THIS FILE, YOU NEED TO RECOMPILE THE BOT.
  *
- * $Id: eggdrop.h,v 1.43 2003/01/28 06:37:24 wcc Exp $
+ * $Id: eggdrop.h,v 1.44 2003/01/29 05:48:40 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -60,38 +60,36 @@
  *       You should leave this at 32 characters and modify nick-len in the
  *       configuration file instead.
  */
-
-#define HANDLEN		  9     /* valid values 9->NICKMAX              */
-#define NICKMAX		 32     /* valid values HANDLEN->32             */
+#define HANDLEN 9   /* valid values 9->NICKMAX  */
+#define NICKMAX 32  /* valid values HANDLEN->32 */
 
 
 /* Handy string lengths */
-
-#define UHOSTMAX	160     /* reasonable, i think?                 */
-#define DIRMAX		512     /* paranoia                             */
-#define LOGLINEMAX	767     /* for misc.c/putlog() <cybah>          */
-#define BADHANDCHARS	"-,+*=:!.@#;$%&"
+#define UHOSTMAX        160  /* reasonable, i think?        */
+#define DIRMAX          512  /* paranoia                    */
+#define LOGLINEMAX      767  /* for misc.c/putlog() <cybah> */
+
+/* Invalid characters */
+#define BADNICKCHARS "-,+*=:!.@#;$%&"
+#define BADHANDCHARS "-,+*=:!.@#;$%&"
 
 
 /* Language stuff */
+#define LANGDIR  "./language" /* language file directory                   */
+#define BASELANG "english"    /* language which always gets loaded before 
+                                 all other languages. You do not want to
+                                 change this.                              */
 
-#define LANGDIR	"./language"    /* language file directory              */
-#define BASELANG "english"      /* language which always gets loaded
-                                 * before all other languages. You do
-                                 * not want to change this.             */
 
+/* The 'configure' script should make this next part automatic, so you
+ * shouldn't need to adjust anything below.
+ */
+#define NICKLEN      NICKMAX + 1
+#define UHOSTLEN     UHOSTMAX + 1
+#define DIRLEN       DIRMAX + 1
+#define LOGLINELEN   LOGLINEMAX + 1
+#define NOTENAMELEN  ((HANDLEN * 2) + 1)
 
-/*
- *     The 'configure' script should make this next part automatic,
- *     so you shouldn't need to adjust anything below.
- */
-
-#define NICKLEN         NICKMAX + 1
-#define UHOSTLEN        UHOSTMAX + 1
-#define DIRLEN          DIRMAX + 1
-#define LOGLINELEN	LOGLINEMAX + 1
-#define NOTENAMELEN     ((HANDLEN * 2) + 1)
-#define BADNICKCHARS	"-,+*=:!.@#;$%&"
 
 
 /* Have to use a weird way to make the compiler error out cos not all
@@ -132,9 +130,9 @@
  */
 #ifndef NAME_MAX
 #  ifdef MAXNAMLEN
-#    define NAME_MAX	MAXNAMLEN
+#    define NAME_MAX    MAXNAMLEN
 #  else
-#    define NAME_MAX	255
+#    define NAME_MAX    255
 #  endif
 #endif
 
@@ -177,32 +175,33 @@
  *    Handy aliases for memory tracking and core dumps
  */
 
-#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__)
+#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__)
 
 #ifdef DEBUG_CONTEXT
-#  define Context		eggContext(__FILE__, __LINE__, NULL)
-#  define ContextNote(note)	eggContextNote(__FILE__, __LINE__, NULL, note)
+#  define Context           eggContext(__FILE__, __LINE__, NULL)
+#  define ContextNote(note) eggContextNote(__FILE__, __LINE__, NULL, note)
 #else
-#  define Context		{}
-#  define ContextNote(note)	{}
+#  define Context           {}
+#  define ContextNote(note) {}
 #endif
 
 #ifdef DEBUG_ASSERT
-#  define Assert(expr)	do {						\
-	if (!(expr))							\
-		eggAssert(__FILE__, __LINE__, NULL);			\
+#  define Assert(expr) do {                                             \
+          if (!(expr))                                                  \
+            eggAssert(__FILE__, __LINE__, NULL);                        \
 } while (0)
 #else
-#  define Assert(expr)	do {	} while (0)
+#  define Assert(expr) do {                                             \
+} while (0)
 #endif
 
 #ifndef COMPILING_MEM
 #  undef malloc
-#  define malloc(x)	dont_use_old_malloc(x)
+#  define malloc(x) dont_use_old_malloc(x)
 #  undef free
-#  define free(x)	dont_use_old_free(x)
+#  define free(x)   dont_use_old_free(x)
 #endif /* !COMPILING_MEM */
 
 /* 32 bit type */
@@ -222,11 +221,11 @@
 /* IP type */
 typedef u_32bit_t IP;
 
-#define debug0(x)		putlog(LOG_DEBUG,"*",x)
-#define debug1(x,a1)		putlog(LOG_DEBUG,"*",x,a1)
-#define debug2(x,a1,a2)		putlog(LOG_DEBUG,"*",x,a1,a2)
-#define debug3(x,a1,a2,a3)	putlog(LOG_DEBUG,"*",x,a1,a2,a3)
-#define debug4(x,a1,a2,a3,a4)	putlog(LOG_DEBUG,"*",x,a1,a2,a3,a4)
+#define debug0(x)             putlog(LOG_DEBUG,"*",x)
+#define debug1(x,a1)          putlog(LOG_DEBUG,"*",x,a1)
+#define debug2(x,a1,a2)       putlog(LOG_DEBUG,"*",x,a1,a2)
+#define debug3(x,a1,a2,a3)    putlog(LOG_DEBUG,"*",x,a1,a2,a3)
+#define debug4(x,a1,a2,a3,a4) putlog(LOG_DEBUG,"*",x,a1,a2,a3,a4)
 
 /***********************************************************************/
 
@@ -400,7 +399,7 @@
                                          * in tcl                           */
 #define DCT_SIMUL     0x00000020        /* can be tcl_simul'd               */
 #define DCT_CANBOOT   0x00000040        /* can be booted                    */
-#define DCT_GETNOTES  DCT_CHAT  /* can receive notes                */
+#define DCT_GETNOTES  DCT_CHAT          /* can receive notes                */
 #define DCT_FILES     0x00000080        /* gratuitous hack ;)               */
 #define DCT_FORKTYPE  0x00000100        /* a forking type                   */
 #define DCT_BOT       0x00000200        /* a bot connection of some sort... */
@@ -444,8 +443,7 @@
                                  * the linking stage                     */
 #define STAT_AGGRESSIVE   0x200 /* aggressively sharing with this bot    */
 
-/* Flags for listening sockets
- */
+/* Flags for listening sockets */
 #define LSTN_PUBLIC  0x000001   /* No access restrictions               */
 
 /* chan & global */
@@ -522,11 +520,11 @@
 #define SOCK_NONSOCK    0x0010  /* used for file i/o on debug           */
 #define SOCK_STRONGCONN 0x0020  /* don't report success until sure      */
 #define SOCK_EOFD       0x0040  /* it EOF'd recently during a write     */
-#define SOCK_PROXYWAIT	0x0080  /* waiting for SOCKS traversal          */
-#define SOCK_PASS	0x0100  /* passed on; only notify in case
+#define SOCK_PROXYWAIT  0x0080  /* waiting for SOCKS traversal          */
+#define SOCK_PASS       0x0100  /* passed on; only notify in case
                                  * of traffic                           */
-#define SOCK_VIRTUAL	0x0200  /* not-connected socket (dont read it!) */
-#define SOCK_BUFFER	0x0400  /* buffer data; don't notify dcc funcs  */
+#define SOCK_VIRTUAL    0x0200  /* not-connected socket (dont read it!) */
+#define SOCK_BUFFER     0x0400  /* buffer data; don't notify dcc funcs  */
 
 /* Flags to sock_has_data
  */
@@ -588,20 +586,20 @@
  * "TELNET Echo Option" (RFC 875) for details.
  */
 
-#define TLN_AYT		246     /* Are You There        */
+#define TLN_AYT         246     /* Are You There        */
 
-#define TLN_WILL	251     /* Will                 */
-#define TLN_WILL_C	"\373"
-#define TLN_WONT	252     /* Won't                */
-#define TLN_WONT_C	"\374"
-#define TLN_DO		253     /* Do                   */
-#define TLN_DO_C	"\375"
-#define TLN_DONT	254     /* Don't                */
-#define TLN_DONT_C	"\376"
-#define TLN_IAC		255     /* Interpret As Command */
-#define TLN_IAC_C	"\377"
+#define TLN_WILL        251     /* Will                 */
+#define TLN_WILL_C      "\373"
+#define TLN_WONT        252     /* Won't                */
+#define TLN_WONT_C      "\374"
+#define TLN_DO          253     /* Do                   */
+#define TLN_DO_C        "\375"
+#define TLN_DONT        254     /* Don't                */
+#define TLN_DONT_C      "\376"
+#define TLN_IAC         255     /* Interpret As Command */
+#define TLN_IAC_C       "\377"
 
-#define TLN_ECHO	1       /* Echo                 */
-#define TLN_ECHO_C	"\001"
+#define TLN_ECHO        1       /* Echo                 */
+#define TLN_ECHO_C      "\001"
 
 #endif /* _EGG_EGGDROP_H */
Index: eggdrop1.6/src/flags.h
diff -u eggdrop1.6/src/flags.h:1.12 eggdrop1.6/src/flags.h:1.13
--- eggdrop1.6/src/flags.h:1.12	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/flags.h	Tue Jan 28 23:48:40 2003
@@ -1,7 +1,7 @@
 /*
  * flags.h
  *
- * $Id: flags.h,v 1.12 2003/01/28 06:37:24 wcc Exp $
+ * $Id: flags.h,v 1.13 2003/01/29 05:48:40 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -44,8 +44,7 @@
 
 /*
  * userflags:
- *   abcdefgh?jklmnopqr?tuvwxyz
- *   + user defined A-Z
+ *   abcdefgh?jklmnopqr?tuvwxyz + user defined A-Z
  *   unused letters: is
  *
  * botflags:
@@ -53,134 +52,124 @@
  *   unused letters: cdefjkmnoqtuvwxyz
  *
  * chanflags:
- *   a??defg???klmno?qr??uv??yz
- *   + user defined A-Z
+ *   a??defg???klmno?qr??uv??yz + user defined A-Z
  *   unused letters: bchijpstwx
  */
-#define USER_VALID 0x03fbfeff   /* all USER_ flags in use              */
-#define CHAN_VALID 0x03777c79   /* all flags that can be chan specific */
-#define BOT_VALID  0x7fe689C1   /* all BOT_ flags in use               */
-
-
-#define USER_AUTOOP        0x00000001   /* a  auto-op                           */
-#define USER_BOT           0x00000002   /* b  user is a bot                     */
-#define USER_COMMON        0x00000004   /* c  user is actually a public site    */
-#define USER_DEOP          0x00000008   /* d  user is global de-op              */
-#define USER_EXEMPT        0x00000010   /* e  exempted from stopnethack         */
-#define USER_FRIEND        0x00000020   /* f  user is global friend             */
-#define USER_GVOICE        0x00000040   /* g  auto-voice                        */
-#define USER_HIGHLITE      0x00000080   /* h  highlighting (bold)               */
-#define USER_I             0x00000100   /* i  unused                            */
-#define USER_JANITOR       0x00000200   /* j  user is file area master          */
-#define USER_KICK          0x00000400   /* k  user is global auto-kick          */
-#define USER_HALFOP        0x00000800   /* l  user is +h on all channels        */
-#define USER_MASTER        0x00001000   /* m  user has full bot access          */
-#define USER_OWNER         0x00002000   /* n  user is the bot owner             */
-#define USER_OP            0x00004000   /* o  user is +o on all channels        */
-#define USER_PARTY         0x00008000   /* p  user has party line access        */
-#define USER_QUIET         0x00010000   /* q  user is global de-voice           */
-#define USER_DEHALFOP      0x00020000   /* r  user is global de-halfop          */
-#define USER_S             0x00040000   /* s  unused                            */
-#define USER_BOTMAST       0x00080000   /* t  user is botnet master             */
-#define USER_UNSHARED      0x00100000   /* u  not shared with sharebots         */
-#define USER_VOICE         0x00200000   /* v  user is +v on all channels        */
-#define USER_WASOPTEST     0x00400000   /* w  wasop test needed for stopnethack */
-#define USER_XFER          0x00800000   /* x  user has file area access         */
-#define USER_AUTOHALFOP    0x01000000   /* y  auto-halfop                       */
-#define USER_WASHALFOPTEST 0x02000000   /* z  washalfop test needed for
-                                         * stopnethack                       */
-#define USER_DEFAULT       0x40000000   /* use default-flags                    */
-
-/* Flags specifically for bots
- */
-#define BOT_ALT       0x00000001        /* a  auto-link here if all +h's
-                                         * fail                  */
-#define BOT_BOT       0x00000002        /* b  sanity bot flag            */
-#define BOT_C         0x00000004        /* c  unused                     */
-#define BOT_D         0x00000008        /* d  unused                     */
-#define BOT_E         0x00000010        /* e  unused                     */
-#define BOT_F         0x00000020        /* f  unused                     */
-#define BOT_GLOBAL    0x00000040        /* g  all channel are shared     */
-#define BOT_HUB       0x00000080        /* h  auto-link to ONE of these
-                                         * bots                  */
-#define BOT_ISOLATE   0x00000100        /* i  isolate party line from
-                                         * botnet                        */
-#define BOT_J         0x00000200        /* j  unused                     */
-#define BOT_K         0x00000400        /* k  unused                     */
-#define BOT_LEAF      0x00000800        /* l  may not link other bots    */
-#define BOT_M         0x00001000        /* m  unused                     */
-#define BOT_N         0x00002000        /* n  unused                     */
-#define BOT_O         0x00004000        /* o  unused                     */
-#define BOT_PASSIVE   0x00008000        /* p  share passively with this
-                                         * bot                   */
-#define BOT_Q         0x00010000        /* q  unused */
-#define BOT_REJECT    0x00020000        /* r  automatically reject
-                                         * anywhere                      */
-#define BOT_AGGRESSIVE 0x00040000       /* s  bot shares user files      */
-#define BOT_T         0x00080000        /* t  unused                     */
-#define BOT_U         0x00100000        /* u  unused                     */
-#define BOT_V         0x00200000        /* v  unused                     */
-#define BOT_W         0x00400000        /* w  unused                     */
-#define BOT_X         0x00800000        /* x  unused                     */
-#define BOT_Y         0x01000000        /* y  unused                     */
-#define BOT_Z         0x02000000        /* z  unused                     */
-#define BOT_FLAG0     0x00200000        /* 0  user-defined flag #0       */
-#define BOT_FLAG1     0x00400000        /* 1  user-defined flag #1       */
-#define BOT_FLAG2     0x00800000        /* 2  user-defined flag #2       */
-#define BOT_FLAG3     0x01000000        /* 3  user-defined flag #3       */
-#define BOT_FLAG4     0x02000000        /* 4  user-defined flag #4       */
-#define BOT_FLAG5     0x04000000        /* 5  user-defined flag #5       */
-#define BOT_FLAG6     0x08000000        /* 6  user-defined flag #6       */
-#define BOT_FLAG7     0x10000000        /* 7  user-defined flag #7       */
-#define BOT_FLAG8     0x20000000        /* 8  user-defined flag #8       */
-#define BOT_FLAG9     0x40000000        /* 9  user-defined flag #9       */
-
-#define BOT_SHARE    (BOT_AGGRESSIVE|BOT_PASSIVE)
-
-
-/* Flag checking macros
- */
-#define chan_op(x)			((x).chan & USER_OP)
-#define glob_op(x)			((x).global & USER_OP)
-#define chan_halfop(x)			((x).chan & USER_HALFOP)
-#define glob_halfop(x)			((x).global & USER_HALFOP)
-#define chan_deop(x)			((x).chan & USER_DEOP)
-#define glob_deop(x)			((x).global & USER_DEOP)
-#define chan_dehalfop(x)		((x).chan & USER_DEHALFOP)
-#define glob_dehalfop(x)		((x).global & USER_DEHALFOP)
-#define glob_master(x)			((x).global & USER_MASTER)
-#define glob_bot(x)				((x).global & USER_BOT)
-#define glob_owner(x)			((x).global & USER_OWNER)
-#define chan_master(x)			((x).chan & USER_MASTER)
-#define chan_owner(x)			((x).chan & USER_OWNER)
-#define chan_autoop(x)			((x).chan & USER_AUTOOP)
-#define glob_autoop(x)			((x).global & USER_AUTOOP)
-#define chan_autohalfop(x)		((x).chan & USER_AUTOHALFOP)
-#define glob_autohalfop(x)		((x).global & USER_AUTOHALFOP)
-#define chan_gvoice(x)			((x).chan & USER_GVOICE)
-#define glob_gvoice(x)			((x).global & USER_GVOICE)
-#define chan_kick(x)			((x).chan & USER_KICK)
-#define glob_kick(x)			((x).global & USER_KICK)
-#define chan_voice(x)			((x).chan & USER_VOICE)
-#define glob_voice(x)			((x).global & USER_VOICE)
-#define chan_wasoptest(x)		((x).chan & USER_WASOPTEST)
-#define glob_wasoptest(x)		((x).global & USER_WASOPTEST)
-#define chan_washalfoptest(x)	((x).chan & USER_WASHALFOPTEST)
-#define glob_washalfoptest(x)	((x).global & USER_WASHALFOPTEST)
-#define chan_quiet(x)			((x).chan & USER_QUIET)
-#define glob_quiet(x)			((x).global & USER_QUIET)
-#define chan_friend(x)			((x).chan & USER_FRIEND)
-#define glob_friend(x)			((x).global & USER_FRIEND)
-#define glob_botmast(x)			((x).global & USER_BOTMAST)
-#define glob_party(x)			((x).global & USER_PARTY)
-#define glob_xfer(x)			((x).global & USER_XFER)
-#define glob_hilite(x) 			((x).global & USER_HIGHLITE)
-#define chan_exempt(x)			((x).chan & USER_EXEMPT)
-#define glob_exempt(x)			((x).global & USER_EXEMPT)
-
-#define bot_global(x)		((x).bot & BOT_GLOBAL)
-#define bot_chan(x)		((x).chan & BOT_AGGRESSIVE)
-#define bot_shared(x)		((x).bot & BOT_SHARE)
+#define USER_VALID 0x03fbfeff   /* Sum of all USER_ flags */
+#define CHAN_VALID 0x03777c79   /* Sum of all CHAN_ flags */
+#define BOT_VALID  0x7fe689C1   /* Sum of all BOT_  flags */
+
+
+#define USER_AUTOOP        0x00000001 /* a  auto-op                               */
+#define USER_BOT           0x00000002 /* b  user is a bot                         */
+#define USER_COMMON        0x00000004 /* c  user is actually a public site        */
+#define USER_DEOP          0x00000008 /* d  user is global de-op                  */
+#define USER_EXEMPT        0x00000010 /* e  exempted from stopnethack             */
+#define USER_FRIEND        0x00000020 /* f  user is global friend                 */
+#define USER_GVOICE        0x00000040 /* g  auto-voice                            */
+#define USER_HIGHLITE      0x00000080 /* h  highlighting (bold)                   */
+#define USER_I             0x00000100 /* i  unused                                */
+#define USER_JANITOR       0x00000200 /* j  user is file area master              */
+#define USER_KICK          0x00000400 /* k  user is global auto-kick              */
+#define USER_HALFOP        0x00000800 /* l  user is +h on all channels            */
+#define USER_MASTER        0x00001000 /* m  user has full bot access              */
+#define USER_OWNER         0x00002000 /* n  user is the bot owner                 */
+#define USER_OP            0x00004000 /* o  user is +o on all channels            */
+#define USER_PARTY         0x00008000 /* p  user has party line access            */
+#define USER_QUIET         0x00010000 /* q  user is global de-voice               */
+#define USER_DEHALFOP      0x00020000 /* r  user is global de-halfop              */
+#define USER_S             0x00040000 /* s  unused                                */
+#define USER_BOTMAST       0x00080000 /* t  user is botnet master                 */
+#define USER_UNSHARED      0x00100000 /* u  not shared with sharebots             */
+#define USER_VOICE         0x00200000 /* v  user is +v on all channels            */
+#define USER_WASOPTEST     0x00400000 /* w  wasop test needed for stopnethack     */
+#define USER_XFER          0x00800000 /* x  user has file area access             */
+#define USER_AUTOHALFOP    0x01000000 /* y  auto-halfop                           */
+#define USER_WASHALFOPTEST 0x02000000 /* z  washalfop test needed for stopnethack */
+#define USER_DEFAULT       0x40000000 /*    use default-flags                     */
+
+/* Flags specifically for bots */
+#define BOT_ALT        0x00000001 /* a  auto-link here if all hubs fail */
+#define BOT_BOT        0x00000002 /* b  sanity bot flag                 */
+#define BOT_C          0x00000004 /* c  unused                          */
+#define BOT_D          0x00000008 /* d  unused                          */
+#define BOT_E          0x00000010 /* e  unused                          */
+#define BOT_F          0x00000020 /* f  unused                          */
+#define BOT_GLOBAL     0x00000040 /* g  all channel are shared          */
+#define BOT_HUB        0x00000080 /* h  auto-link to ONE of these bots  */
+#define BOT_ISOLATE    0x00000100 /* i  isolate party line from botnet  */
+#define BOT_J          0x00000200 /* j  unused                          */
+#define BOT_K          0x00000400 /* k  unused                          */
+#define BOT_LEAF       0x00000800 /* l  may not link other bots         */
+#define BOT_M          0x00001000 /* m  unused                          */
+#define BOT_N          0x00002000 /* n  unused                          */
+#define BOT_O          0x00004000 /* o  unused                          */
+#define BOT_PASSIVE    0x00008000 /* p  share passively with this bot   */
+#define BOT_Q          0x00010000 /* q  unused                          */
+#define BOT_REJECT     0x00020000 /* r  automatically reject anywhere   */
+#define BOT_AGGRESSIVE 0x00040000 /* s  bot shares user files           */
+#define BOT_T          0x00080000 /* t  unused                          */
+#define BOT_U          0x00100000 /* u  unused                          */
+#define BOT_V          0x00200000 /* v  unused                          */
+#define BOT_W          0x00400000 /* w  unused                          */
+#define BOT_X          0x00800000 /* x  unused                          */
+#define BOT_Y          0x01000000 /* y  unused                          */
+#define BOT_Z          0x02000000 /* z  unused                          */
+#define BOT_FLAG0      0x00200000 /* 0  user-defined flag #0            */
+#define BOT_FLAG1      0x00400000 /* 1  user-defined flag #1            */
+#define BOT_FLAG2      0x00800000 /* 2  user-defined flag #2            */
+#define BOT_FLAG3      0x01000000 /* 3  user-defined flag #3            */
+#define BOT_FLAG4      0x02000000 /* 4  user-defined flag #4            */
+#define BOT_FLAG5      0x04000000 /* 5  user-defined flag #5            */
+#define BOT_FLAG6      0x08000000 /* 6  user-defined flag #6            */
+#define BOT_FLAG7      0x10000000 /* 7  user-defined flag #7            */
+#define BOT_FLAG8      0x20000000 /* 8  user-defined flag #8            */
+#define BOT_FLAG9      0x40000000 /* 9  user-defined flag #9            */
+#define BOT_SHARE      (BOT_AGGRESSIVE|BOT_PASSIVE)
+
+
+/* Flag checking macros */
+#define chan_op(x)              ((x).chan & USER_OP)
+#define glob_op(x)              ((x).global & USER_OP)
+#define chan_halfop(x)          ((x).chan & USER_HALFOP)
+#define glob_halfop(x)          ((x).global & USER_HALFOP)
+#define chan_deop(x)            ((x).chan & USER_DEOP)
+#define glob_deop(x)            ((x).global & USER_DEOP)
+#define chan_dehalfop(x)        ((x).chan & USER_DEHALFOP)
+#define glob_dehalfop(x)        ((x).global & USER_DEHALFOP)
+#define glob_master(x)          ((x).global & USER_MASTER)
+#define glob_bot(x)             ((x).global & USER_BOT)
+#define glob_owner(x)           ((x).global & USER_OWNER)
+#define chan_master(x)          ((x).chan & USER_MASTER)
+#define chan_owner(x)           ((x).chan & USER_OWNER)
+#define chan_autoop(x)          ((x).chan & USER_AUTOOP)
+#define glob_autoop(x)          ((x).global & USER_AUTOOP)
+#define chan_autohalfop(x)      ((x).chan & USER_AUTOHALFOP)
+#define glob_autohalfop(x)      ((x).global & USER_AUTOHALFOP)
+#define chan_gvoice(x)          ((x).chan & USER_GVOICE)
+#define glob_gvoice(x)          ((x).global & USER_GVOICE)
+#define chan_kick(x)            ((x).chan & USER_KICK)
+#define glob_kick(x)            ((x).global & USER_KICK)
+#define chan_voice(x)           ((x).chan & USER_VOICE)
+#define glob_voice(x)           ((x).global & USER_VOICE)
+#define chan_wasoptest(x)       ((x).chan & USER_WASOPTEST)
+#define glob_wasoptest(x)       ((x).global & USER_WASOPTEST)
+#define chan_washalfoptest(x)   ((x).chan & USER_WASHALFOPTEST)
+#define glob_washalfoptest(x)   ((x).global & USER_WASHALFOPTEST)
+#define chan_quiet(x)           ((x).chan & USER_QUIET)
+#define glob_quiet(x)           ((x).global & USER_QUIET)
+#define chan_friend(x)          ((x).chan & USER_FRIEND)
+#define glob_friend(x)          ((x).global & USER_FRIEND)
+#define glob_botmast(x)         ((x).global & USER_BOTMAST)
+#define glob_party(x)           ((x).global & USER_PARTY)
+#define glob_xfer(x)            ((x).global & USER_XFER)
+#define glob_hilite(x)          ((x).global & USER_HIGHLITE)
+#define chan_exempt(x)          ((x).chan & USER_EXEMPT)
+#define glob_exempt(x)          ((x).global & USER_EXEMPT)
+
+#define bot_global(x)           ((x).bot & BOT_GLOBAL)
+#define bot_chan(x)             ((x).chan & BOT_AGGRESSIVE)
+#define bot_shared(x)           ((x).bot & BOT_SHARE)
 
 
 #ifndef MAKING_MODS
Index: eggdrop1.6/src/lang.h
diff -u eggdrop1.6/src/lang.h:1.29 eggdrop1.6/src/lang.h:1.30
--- eggdrop1.6/src/lang.h:1.29	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/lang.h	Tue Jan 28 23:48:40 2003
@@ -2,7 +2,7 @@
  * lang.h
  *   Conversion definitions for language support
  *
- * $Id: lang.h,v 1.29 2003/01/28 06:37:24 wcc Exp $
+ * $Id: lang.h,v 1.30 2003/01/29 05:48:40 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -26,485 +26,471 @@
 #ifndef _EGG_LANG_H
 #define _EGG_LANG_H
 
-#define MISC_USAGE		get_language(0x001)
-#define MISC_FAILED		get_language(0x002)
+#define MISC_USAGE              get_language(0x001)
+#define MISC_FAILED             get_language(0x002)
 
-/* Userfile messages
- */
-#define USERF_XFERDONE		get_language(0x400)
-/* was: USERF_BADREREAD - 0x401 */
-#define USERF_CANTREAD		get_language(0x402)
-#define USERF_CANTSEND		get_language(0x403)
-#define USERF_NOMATCH		get_language(0x404)
-#define USERF_OLDFMT		get_language(0x405)
-#define USERF_INVALID		get_language(0x406)
-#define USERF_CORRUPT		get_language(0x407)
-#define USERF_DUPE		get_language(0x408)
-#define USERF_BROKEPASS		get_language(0x409)
-#define USERF_IGNBANS		get_language(0x40a)
-#define USERF_WRITING		get_language(0x40b)
-#define USERF_ERRWRITE		get_language(0x40c)
-#define USERF_ERRWRITE2		get_language(0x40d)
-#define USERF_NONEEDNEW		get_language(0x40e)
-#define USERF_REHASHING		get_language(0x40f)
-#define USERF_UNKNOWN		get_language(0x410)
-#define USERF_NOUSERREC		get_language(0x411)
-#define USERF_BACKUP		get_language(0x412)
-#define USERF_FAILEDXFER	get_language(0x413)
-#define USERF_OLDSHARE		get_language(0x414)
-#define USERF_ANTIQUESHARE	get_language(0x415)
-#define USERF_REJECTED		get_language(0x416)
-
-/* Misc messages
- */
-#define MISC_EXPIRED		get_language(0x500)
-#define MISC_TOTAL		get_language(0x501)
-#define MISC_ERASED		get_language(0x502)
-/* was: MISC_LEFT - 0x503 */
-#define MISC_ONLOCALE		get_language(0x504)
-#define MISC_MATCHING		get_language(0x505)
-#define MISC_SKIPPING		get_language(0x506)
-#define MISC_TRUNCATED		get_language(0x507)
-#define MISC_FOUNDMATCH		get_language(0x508)
-#define MISC_AMBIGUOUS		get_language(0x509)
-#define MISC_NOSUCHCMD		get_language(0x50a)
-#define MISC_CMDBINDS		get_language(0x50b)
-#define MISC_RESTARTING		get_language(0x50c)
-#define MISC_MATCH_PLURAL	get_language(0x50d)
-#define MISC_LOGSWITCH		get_language(0x50e)
-#define MISC_OWNER		get_language(0x50f)
-#define MISC_MASTER		get_language(0x510)
-#define MISC_OP			get_language(0x511)
-#define MISC_IDLE		get_language(0x512)
-#define MISC_AWAY		get_language(0x513)
-/* was: MISC_IGNORING - 0x514 */
-/* was: MISC_UNLINKED - 0x515 */
-#define MISC_DISCONNECTED	get_language(0x516)
-#define MISC_INVALIDBOT		get_language(0x517)
-#define MISC_LOOP		get_language(0x518)
-/* was: MISC_MUTUAL - 0x519 */
-#define MISC_FROM		get_language(0x51a)
-#define MISC_OUTDATED		get_language(0x51b)
-#define MISC_REJECTED		get_language(0x51c)
-#define MISC_IMPOSTER		get_language(0x51d)
-#define MISC_TRYING		get_language(0x51e)
-#define MISC_MOTDFILE		get_language(0x51f)
-#define MISC_NOMOTDFILE		get_language(0x520)
-#define MISC_USEFORMAT		get_language(0x521)
-#define MISC_CHADDRFORMAT	get_language(0x522)
-/* was: MISC_UNKNOWN - 0x523 */
-/* was: MISC_CHANNELS - 0x524 */
-/* was: MISC_TRYINGMISTAKE - 0x525 */
-#define MISC_PENDING		get_language(0x526)
-#define MISC_WANTOPS		get_language(0x527)
-#define MISC_LURKING		get_language(0x528)
-#define MISC_BACKGROUND		get_language(0x529)
-#define MISC_TERMMODE		get_language(0x52a)
-#define MISC_STATMODE		get_language(0x52b)
-#define MISC_LOGMODE		get_language(0x52c)
-#define MISC_ONLINEFOR		get_language(0x52d)
-#define MISC_CACHEHIT		get_language(0x52e)
-#define MISC_TCLLIBRARY		get_language(0x52f)
-#define MISC_NEWUSERFLAGS	get_language(0x530)
-#define MISC_NOTIFY		get_language(0x531)
-#define MISC_PERMOWNER		get_language(0x532)
-/* was: MISC_ROOTWARN - 0x533 */
-#define MISC_NOCONFIGFILE	get_language(0x534)
-#define MISC_NOUSERFILE		get_language(0x535)
-#define MISC_NOUSERFILE2	get_language(0x536)
-#define MISC_USERFCREATE1	get_language(0x537)
-#define MISC_USERFCREATE2	get_language(0x538)
-#define MISC_USERFEXISTS	get_language(0x539)
-#define MISC_CANTWRITETEMP	get_language(0x53a)
-#define MISC_CANTRELOADUSER	get_language(0x53b)
-#define MISC_MISSINGUSERF	get_language(0x53c)
-/* was: MISC_BOTSCONNECTED - 0x53d */
-#define MISC_BANNER		get_language(0x53e)
-#define MISC_CLOGS		get_language(0x53f)
-#define MISC_BANNER_STEALTH	get_language(0x540)
-#define MISC_LOGREPEAT		get_language(0x541)
-#define MISC_JUPED		get_language(0x542)
-#define MISC_NOFREESOCK		get_language(0x543)
-#define MISC_TCLVERSION		get_language(0x544)
-#define MISC_TCLHVERSION	get_language(0x545)
+/* Userfile messages */
+#define USERF_XFERDONE          get_language(0x400)
+/* was: USERF_BADREREAD         0x401            */
+#define USERF_CANTREAD          get_language(0x402)
+#define USERF_CANTSEND          get_language(0x403)
+#define USERF_NOMATCH           get_language(0x404)
+#define USERF_OLDFMT            get_language(0x405)
+#define USERF_INVALID           get_language(0x406)
+#define USERF_CORRUPT           get_language(0x407)
+#define USERF_DUPE              get_language(0x408)
+#define USERF_BROKEPASS         get_language(0x409)
+#define USERF_IGNBANS           get_language(0x40a)
+#define USERF_WRITING           get_language(0x40b)
+#define USERF_ERRWRITE          get_language(0x40c)
+#define USERF_ERRWRITE2         get_language(0x40d)
+#define USERF_NONEEDNEW         get_language(0x40e)
+#define USERF_REHASHING         get_language(0x40f)
+#define USERF_UNKNOWN           get_language(0x410)
+#define USERF_NOUSERREC         get_language(0x411)
+#define USERF_BACKUP            get_language(0x412)
+#define USERF_FAILEDXFER        get_language(0x413)
+#define USERF_OLDSHARE          get_language(0x414)
+#define USERF_ANTIQUESHARE      get_language(0x415)
+#define USERF_REJECTED          get_language(0x416)
+
+/* Misc messages */
+#define MISC_EXPIRED            get_language(0x500)
+#define MISC_TOTAL              get_language(0x501)
+#define MISC_ERASED             get_language(0x502)
+/* was: MISC_LEFT               0x503            */
+#define MISC_ONLOCALE           get_language(0x504)
+#define MISC_MATCHING           get_language(0x505)
+#define MISC_SKIPPING           get_language(0x506)
+#define MISC_TRUNCATED          get_language(0x507)
+#define MISC_FOUNDMATCH         get_language(0x508)
+#define MISC_AMBIGUOUS          get_language(0x509)
+#define MISC_NOSUCHCMD          get_language(0x50a)
+#define MISC_CMDBINDS           get_language(0x50b)
+#define MISC_RESTARTING         get_language(0x50c)
+#define MISC_MATCH_PLURAL       get_language(0x50d)
+#define MISC_LOGSWITCH          get_language(0x50e)
+#define MISC_OWNER              get_language(0x50f)
+#define MISC_MASTER             get_language(0x510)
+#define MISC_OP                 get_language(0x511)
+#define MISC_IDLE               get_language(0x512)
+#define MISC_AWAY               get_language(0x513)
+/* was: MISC_IGNORING           0x514            */
+/* was: MISC_UNLINKED           0x515            */
+#define MISC_DISCONNECTED       get_language(0x516)
+#define MISC_INVALIDBOT         get_language(0x517)
+#define MISC_LOOP               get_language(0x518)
+/* was: MISC_MUTUAL             0x519            */
+#define MISC_FROM               get_language(0x51a)
+#define MISC_OUTDATED           get_language(0x51b)
+#define MISC_REJECTED           get_language(0x51c)
+#define MISC_IMPOSTER           get_language(0x51d)
+#define MISC_TRYING             get_language(0x51e)
+#define MISC_MOTDFILE           get_language(0x51f)
+#define MISC_NOMOTDFILE         get_language(0x520)
+#define MISC_USEFORMAT          get_language(0x521)
+#define MISC_CHADDRFORMAT       get_language(0x522)
+/* was: MISC_UNKNOWN            0x523            */
+/* was: MISC_CHANNELS           0x524            */
+/* was: MISC_TRYINGMISTAKE      0x525            */
+#define MISC_PENDING            get_language(0x526)
+#define MISC_WANTOPS            get_language(0x527)
+#define MISC_LURKING            get_language(0x528)
+#define MISC_BACKGROUND         get_language(0x529)
+#define MISC_TERMMODE           get_language(0x52a)
+#define MISC_STATMODE           get_language(0x52b)
+#define MISC_LOGMODE            get_language(0x52c)
+#define MISC_ONLINEFOR          get_language(0x52d)
+#define MISC_CACHEHIT           get_language(0x52e)
+#define MISC_TCLLIBRARY         get_language(0x52f)
+#define MISC_NEWUSERFLAGS       get_language(0x530)
+#define MISC_NOTIFY             get_language(0x531)
+#define MISC_PERMOWNER          get_language(0x532)
+/* was: MISC_ROOTWARN           0x533            */
+#define MISC_NOCONFIGFILE       get_language(0x534)
+#define MISC_NOUSERFILE         get_language(0x535)
+#define MISC_NOUSERFILE2        get_language(0x536)
+#define MISC_USERFCREATE1       get_language(0x537)
+#define MISC_USERFCREATE2       get_language(0x538)
+#define MISC_USERFEXISTS        get_language(0x539)
+#define MISC_CANTWRITETEMP      get_language(0x53a)
+#define MISC_CANTRELOADUSER     get_language(0x53b)
+#define MISC_MISSINGUSERF       get_language(0x53c)
+/* was: MISC_BOTSCONNECTED      0x53d            */
+#define MISC_BANNER             get_language(0x53e)
+#define MISC_CLOGS              get_language(0x53f)
+#define MISC_BANNER_STEALTH     get_language(0x540)
+#define MISC_LOGREPEAT          get_language(0x541)
+#define MISC_JUPED              get_language(0x542)
+#define MISC_NOFREESOCK         get_language(0x543)
+#define MISC_TCLVERSION         get_language(0x544)
+#define MISC_TCLHVERSION        get_language(0x545)
 
 /* IRC */
-#define IRC_BANNED		get_language(0x600)
-#define IRC_YOUREBANNED		get_language(0x601)
-/* BOT log messages when attempting to place a ban which matches me */
-#define IRC_IBANNEDME		get_language(0x602)
-#define IRC_FUNKICK		get_language(0x603)
-#define IRC_HI			get_language(0x604)
-#define IRC_GOODBYE		get_language(0x605)
-#define IRC_BANNED2		get_language(0x606)
-#define IRC_NICKTOOLONG		get_language(0x607)
-#define IRC_INTRODUCED		get_language(0x608)
-#define IRC_COMMONSITE		get_language(0x609)
-#define IRC_SALUT1		get_language(0x60a)
-#define IRC_SALUT2		get_language(0x60b)
-#define IRC_SALUT2A		get_language(0x60c)
-#define IRC_SALUT2B		get_language(0x60d)
-#define IRC_INITOWNER1		get_language(0x60e)
-#define IRC_INIT1		get_language(0x60f)
-#define IRC_INITNOTE		get_language(0x610)
-#define IRC_INITINTRO		get_language(0x611)
-#define IRC_PASS		get_language(0x612)
-#define IRC_NOPASS		get_language(0x613)
-/* was: IRC_NOPASS2 - 0x614 */
-#define IRC_EXISTPASS		get_language(0x615)
-#define IRC_PASSFORMAT		get_language(0x616)
-#define IRC_SETPASS		get_language(0x617)
-#define IRC_FAILPASS		get_language(0x618)
-#define IRC_CHANGEPASS		get_language(0x619)
-#define IRC_FAILCOMMON		get_language(0x61a)
-#define IRC_MISIDENT		get_language(0x61b)
-#define IRC_DENYACCESS		get_language(0x61c)
-#define IRC_RECOGNIZED		get_language(0x61d)
-#define IRC_ADDHOSTMASK		get_language(0x61e)
-/* was: IRC_DELMAILADDR - 0x61f */
-#define IRC_FIELDCURRENT	get_language(0x620)
-#define IRC_FIELDCHANGED	get_language(0x621)
-#define IRC_FIELDTOREMOVE	get_language(0x622)
-/* was: IRC_NOEMAIL - 0x623 */
-#define IRC_INFOLOCKED		get_language(0x624)
-#define IRC_REMINFOON		get_language(0x625)
-#define IRC_REMINFO		get_language(0x626)
-#define IRC_NOINFOON		get_language(0x627)
-#define IRC_NOINFO		get_language(0x628)
-#define IRC_NOMONITOR		get_language(0x629)
-#define IRC_RESETCHAN		get_language(0x62a)
-#define IRC_JUMP		get_language(0x62b)
-#define IRC_CHANHIDDEN		get_language(0x62c)
-#define IRC_ONCHANNOW		get_language(0x62d)
-#define IRC_NEVERJOINED		get_language(0x62e)
-#define IRC_LASTSEENAT		get_language(0x62f)
-#define IRC_DONTKNOWYOU		get_language(0x630)
-#define IRC_NOHELP		get_language(0x631)
-#define IRC_NOHELP2		get_language(0x632)
-#define IRC_NOTONCHAN		get_language(0x634)
-#define IRC_GETORIGNICK		get_language(0x635)
-#define IRC_BADBOTNICK		get_language(0x636)
-#define IRC_BOTNICKINUSE	get_language(0x637)
-#define IRC_CANTCHANGENICK	get_language(0x638)
-#define IRC_BOTNICKJUPED	get_language(0x639)
-#define IRC_CHANNELJUPED	get_language(0x63a)
-#define IRC_NOTREGISTERED1	get_language(0x63b)
-#define	IRC_NOTREGISTERED2	get_language(0x63c)
-#define IRC_FLOODIGNORE1	get_language(0x63d)
-/* was: IRC_FLOODIGNORE2 - 0x63e */
-#define IRC_FLOODIGNORE3	get_language(0x63f)
-#define IRC_FLOODKICK		get_language(0x640)
-#define IRC_SERVERTRY		get_language(0x641)
-#define IRC_DNSFAILED		get_language(0x642)
-#define IRC_FAILEDCONNECT	get_language(0x643)
-#define IRC_SERVERSTONED	get_language(0x644)
-#define IRC_DISCONNECTED	get_language(0x645)
-#define IRC_NOSERVER		get_language(0x646)
-#define IRC_MODEQUEUE		get_language(0x647)
-#define IRC_SERVERQUEUE		get_language(0x648)
-#define IRC_HELPQUEUE		get_language(0x649)
-/* was: IRC_BOTNOTONIRC - 0x64a */
-#define IRC_NOTACTIVECHAN	get_language(0x64b)
-#define IRC_PROCESSINGCHAN	get_language(0x64c)
-#define IRC_CHANNEL		get_language(0x64d)
-#define IRC_DESIRINGCHAN	get_language(0x64e)
-#define IRC_CHANNELTOPIC	get_language(0x64f)
-#define IRC_PENDINGOP		get_language(0x650)
-#define IRC_PENDINGDEOP		get_language(0x651)
-#define IRC_PENDINGKICK		get_language(0x652)
-#define IRC_FAKECHANOP		get_language(0x653)
-#define IRC_ENDCHANINFO		get_language(0x654)
-#define IRC_MASSKICK		get_language(0x655)
-#define IRC_REMOVEDBAN		get_language(0x656)
-#define IRC_UNEXPECTEDMODE	get_language(0x657)
-#define IRC_POLITEKICK		get_language(0x658)
-#define IRC_AUTOJUMP		get_language(0x659)
-#define IRC_CHANGINGSERV	get_language(0x65a)
-#define IRC_TOOMANYCHANS	get_language(0x65b)
-#define IRC_CHANFULL		get_language(0x65c)
-#define IRC_CHANINVITEONLY	get_language(0x65d)
-#define IRC_BANNEDFROMCHAN	get_language(0x65e)
-#define IRC_SERVNOTONCHAN	get_language(0x65f)
-#define IRC_BADCHANKEY		get_language(0x660)
-#define IRC_INTRO1		get_language(0x661)
-#define IRC_BADHOST1		get_language(0x662)
-#define IRC_BADHOST2		get_language(0x663)
-#define IRC_NEWBOT1		get_language(0x664)
-#define IRC_NEWBOT2		get_language(0x665)
-#define IRC_TELNET		get_language(0x666)
-#define IRC_TELNET1		get_language(0x667)
-#define IRC_LIMBO		get_language(0x668)
-#define IRC_TELNETFLOOD		get_language(0x669)
-#define IRC_PREBANNED		get_language(0x66a)
-#define IRC_JOIN_FLOOD		get_language(0x66b)
-#define IRC_KICK_PROTECT	get_language(0x66c)
-#define IRC_DEOP_PROTECT	get_language(0x66f)
-#define IRC_COMMENTKICK		get_language(0x66d)
-#define IRC_GETALTNICK		get_language(0x66e)
-#define IRC_REMOVEDEXEMPT	get_language(0x670)
-#define IRC_REMOVEDINVITE	get_language(0x671)
-#define IRC_FLOODIGNORE4	get_language(0x672)
-#define IRC_NICK_FLOOD		get_language(0x673)
-
-/* Eggdrop command line usage
- */
-#define EGG_USAGE		get_language(0x700)
-#define EGG_RUNNING1		get_language(0x701)
-#define EGG_RUNNING2		get_language(0x702)
-#define EGG_NOWRITE		get_language(0x703)
-
-#define USER_ISGLOBALOP		get_language(0x800)
-#define USER_ISBOT		get_language(0x801)
-#define USER_ISMASTER		get_language(0x802)
-
-/* '.bans/.invites/.exempts' common messages
- */
-#define MODES_CREATED		get_language(0x130)
-#define MODES_LASTUSED		get_language(0x131)
-#define MODES_INACTIVE		get_language(0x132)
-#define MODES_PLACEDBY		get_language(0x133)
-#define MODES_NOTACTIVE		get_language(0x135)
-#define MODES_NOTACTIVE2	get_language(0x137)
-#define MODES_NOTBYBOT		get_language(0x138)
-
-/* Messages used when listing with `.bans'
- */
-#define BANS_GLOBAL		get_language(0x104)
-#define BANS_BYCHANNEL		get_language(0x106)
-#define BANS_USEBANSALL		get_language(0x109)
-#define BANS_NOLONGER		get_language(0x10a)
-
-/* Messages used when listing with '.exempts'
- */
-#define EXEMPTS_GLOBAL		get_language(0x114)
-#define EXEMPTS_BYCHANNEL	get_language(0x116)
-#define EXEMPTS_USEEXEMPTSALL	get_language(0x119)
-#define EXEMPTS_NOLONGER	get_language(0x11a)
-
-/* Messages used when listing with '.invites'
- */
-#define INVITES_GLOBAL		get_language(0x124)
-#define INVITES_BYCHANNEL	get_language(0x126)
-#define INVITES_USEINVITESALL	get_language(0x129)
-#define INVITES_NOLONGER	get_language(0x12a)
+#define IRC_BANNED              get_language(0x600)
+#define IRC_YOUREBANNED         get_language(0x601)
+#define IRC_IBANNEDME           get_language(0x602)
+#define IRC_FUNKICK             get_language(0x603)
+#define IRC_HI                  get_language(0x604)
+#define IRC_GOODBYE             get_language(0x605)
+#define IRC_BANNED2             get_language(0x606)
+#define IRC_NICKTOOLONG         get_language(0x607)
+#define IRC_INTRODUCED          get_language(0x608)
+#define IRC_COMMONSITE          get_language(0x609)
+#define IRC_SALUT1              get_language(0x60a)
+#define IRC_SALUT2              get_language(0x60b)
+#define IRC_SALUT2A             get_language(0x60c)
+#define IRC_SALUT2B             get_language(0x60d)
+#define IRC_INITOWNER1          get_language(0x60e)
+#define IRC_INIT1               get_language(0x60f)
+#define IRC_INITNOTE            get_language(0x610)
+#define IRC_INITINTRO           get_language(0x611)
+#define IRC_PASS                get_language(0x612)
+#define IRC_NOPASS              get_language(0x613)
+/* was: IRC_NOPASS2             0x614            */
+#define IRC_EXISTPASS           get_language(0x615)
+#define IRC_PASSFORMAT          get_language(0x616)
+#define IRC_SETPASS             get_language(0x617)
+#define IRC_FAILPASS            get_language(0x618)
+#define IRC_CHANGEPASS          get_language(0x619)
+#define IRC_FAILCOMMON          get_language(0x61a)
+#define IRC_MISIDENT            get_language(0x61b)
+#define IRC_DENYACCESS          get_language(0x61c)
+#define IRC_RECOGNIZED          get_language(0x61d)
+#define IRC_ADDHOSTMASK         get_language(0x61e)
+/* was: IRC_DELMAILADDR         0x61f            */
+#define IRC_FIELDCURRENT        get_language(0x620)
+#define IRC_FIELDCHANGED        get_language(0x621)
+#define IRC_FIELDTOREMOVE       get_language(0x622)
+/* was: IRC_NOEMAIL             0x623            */
+#define IRC_INFOLOCKED          get_language(0x624)
+#define IRC_REMINFOON           get_language(0x625)
+#define IRC_REMINFO             get_language(0x626)
+#define IRC_NOINFOON            get_language(0x627)
+#define IRC_NOINFO              get_language(0x628)
+#define IRC_NOMONITOR           get_language(0x629)
+#define IRC_RESETCHAN           get_language(0x62a)
+#define IRC_JUMP                get_language(0x62b)
+#define IRC_CHANHIDDEN          get_language(0x62c)
+#define IRC_ONCHANNOW           get_language(0x62d)
+#define IRC_NEVERJOINED         get_language(0x62e)
+#define IRC_LASTSEENAT          get_language(0x62f)
+#define IRC_DONTKNOWYOU         get_language(0x630)
+#define IRC_NOHELP              get_language(0x631)
+#define IRC_NOHELP2             get_language(0x632)
+#define IRC_NOTONCHAN           get_language(0x634)
+#define IRC_GETORIGNICK         get_language(0x635)
+#define IRC_BADBOTNICK          get_language(0x636)
+#define IRC_BOTNICKINUSE        get_language(0x637)
+#define IRC_CANTCHANGENICK      get_language(0x638)
+#define IRC_BOTNICKJUPED        get_language(0x639)
+#define IRC_CHANNELJUPED        get_language(0x63a)
+#define IRC_NOTREGISTERED1      get_language(0x63b)
+#define IRC_NOTREGISTERED2      get_language(0x63c)
+#define IRC_FLOODIGNORE1        get_language(0x63d)
+/* was: IRC_FLOODIGNORE2        0x63e            */
+#define IRC_FLOODIGNORE3        get_language(0x63f)
+#define IRC_FLOODKICK           get_language(0x640)
+#define IRC_SERVERTRY           get_language(0x641)
+#define IRC_DNSFAILED           get_language(0x642)
+#define IRC_FAILEDCONNECT       get_language(0x643)
+#define IRC_SERVERSTONED        get_language(0x644)
+#define IRC_DISCONNECTED        get_language(0x645)
+#define IRC_NOSERVER            get_language(0x646)
+#define IRC_MODEQUEUE           get_language(0x647)
+#define IRC_SERVERQUEUE         get_language(0x648)
+#define IRC_HELPQUEUE           get_language(0x649)
+/* was: IRC_BOTNOTONIRC         0x64a            */
+#define IRC_NOTACTIVECHAN       get_language(0x64b)
+#define IRC_PROCESSINGCHAN      get_language(0x64c)
+#define IRC_CHANNEL             get_language(0x64d)
+#define IRC_DESIRINGCHAN        get_language(0x64e)
+#define IRC_CHANNELTOPIC        get_language(0x64f)
+#define IRC_PENDINGOP           get_language(0x650)
+#define IRC_PENDINGDEOP         get_language(0x651)
+#define IRC_PENDINGKICK         get_language(0x652)
+#define IRC_FAKECHANOP          get_language(0x653)
+#define IRC_ENDCHANINFO         get_language(0x654)
+#define IRC_MASSKICK            get_language(0x655)
+#define IRC_REMOVEDBAN          get_language(0x656)
+#define IRC_UNEXPECTEDMODE      get_language(0x657)
+#define IRC_POLITEKICK          get_language(0x658)
+#define IRC_AUTOJUMP            get_language(0x659)
+#define IRC_CHANGINGSERV        get_language(0x65a)
+#define IRC_TOOMANYCHANS        get_language(0x65b)
+#define IRC_CHANFULL            get_language(0x65c)
+#define IRC_CHANINVITEONLY      get_language(0x65d)
+#define IRC_BANNEDFROMCHAN      get_language(0x65e)
+#define IRC_SERVNOTONCHAN       get_language(0x65f)
+#define IRC_BADCHANKEY          get_language(0x660)
+#define IRC_INTRO1              get_language(0x661)
+#define IRC_BADHOST1            get_language(0x662)
+#define IRC_BADHOST2            get_language(0x663)
+#define IRC_NEWBOT1             get_language(0x664)
+#define IRC_NEWBOT2             get_language(0x665)
+#define IRC_TELNET              get_language(0x666)
+#define IRC_TELNET1             get_language(0x667)
+#define IRC_LIMBO               get_language(0x668)
+#define IRC_TELNETFLOOD         get_language(0x669)
+#define IRC_PREBANNED           get_language(0x66a)
+#define IRC_JOIN_FLOOD          get_language(0x66b)
+#define IRC_KICK_PROTECT        get_language(0x66c)
+#define IRC_DEOP_PROTECT        get_language(0x66f)
+#define IRC_COMMENTKICK         get_language(0x66d)
+#define IRC_GETALTNICK          get_language(0x66e)
+#define IRC_REMOVEDEXEMPT       get_language(0x670)
+#define IRC_REMOVEDINVITE       get_language(0x671)
+#define IRC_FLOODIGNORE4        get_language(0x672)
+#define IRC_NICK_FLOOD          get_language(0x673)
+
+/* Eggdrop command line usage */
+#define EGG_USAGE               get_language(0x700)
+#define EGG_RUNNING1            get_language(0x701)
+#define EGG_RUNNING2            get_language(0x702)
+#define EGG_NOWRITE             get_language(0x703)
+
+#define USER_ISGLOBALOP         get_language(0x800)
+#define USER_ISBOT              get_language(0x801)
+#define USER_ISMASTER           get_language(0x802)
+
+/* '.bans/.invites/.exempts' common messages */
+#define MODES_CREATED           get_language(0x130)
+#define MODES_LASTUSED          get_language(0x131)
+#define MODES_INACTIVE          get_language(0x132)
+#define MODES_PLACEDBY          get_language(0x133)
+#define MODES_NOTACTIVE         get_language(0x135)
+#define MODES_NOTACTIVE2        get_language(0x137)
+#define MODES_NOTBYBOT          get_language(0x138)
+
+/* Messages used when listing with `.bans' */
+#define BANS_GLOBAL             get_language(0x104)
+#define BANS_BYCHANNEL          get_language(0x106)
+#define BANS_USEBANSALL         get_language(0x109)
+#define BANS_NOLONGER           get_language(0x10a)
+
+/* Messages used when listing with '.exempts' */
+#define EXEMPTS_GLOBAL          get_language(0x114)
+#define EXEMPTS_BYCHANNEL       get_language(0x116)
+#define EXEMPTS_USEEXEMPTSALL   get_language(0x119)
+#define EXEMPTS_NOLONGER        get_language(0x11a)
+
+/* Messages used when listing with '.invites' */
+#define INVITES_GLOBAL          get_language(0x124)
+#define INVITES_BYCHANNEL       get_language(0x126)
+#define INVITES_USEINVITESALL   get_language(0x129)
+#define INVITES_NOLONGER        get_language(0x12a)
+
+
+/* Messages referring to channels */
+#define CHAN_NOSUCH             get_language(0x900)
+#define CHAN_BADCHANMODE        get_language(0x902)
+#define CHAN_MASSDEOP           get_language(0x903)
+#define CHAN_MASSDEOP_KICK      get_language(0x904)
+#define CHAN_FORCEJOIN          get_language(0x907)
+#define CHAN_FAKEMODE           get_language(0x908)
+#define CHAN_FAKEMODE_KICK      get_language(0x909)
+#define CHAN_DESYNCMODE         get_language(0x90a)
+#define CHAN_DESYNCMODE_KICK    get_language(0x90b)
+#define CHAN_FLOOD              get_language(0x90c)
+
+/* Messages referring to ignores */
+#define IGN_NONE                get_language(0xa00)
+#define IGN_CURRENT             get_language(0xa01)
+#define IGN_NOLONGER            get_language(0xa02)
+
+/* Messages referring to bots */
+#define BOT_NOTHERE             get_language(0xb00)
+#define BOT_NONOTES             get_language(0xb01)
+#define BOT_USERAWAY            get_language(0xb02)
+#define BOT_NOTEARRIVED         get_language(0xb07)
+#define BOT_MSGDIE              get_language(0xb18)
+#define BOT_NOSUCHUSER          get_language(0xb19)
+#define BOT_NOCHANNELS          get_language(0xb1a)
+#define BOT_PARTYMEMBS          get_language(0xb1b)
+#define BOT_BOTSCONNECTED       get_language(0xb1c)
+#define BOT_OTHERPEOPLE         get_language(0xb1d)
+/* was: BOT_OUTDATEDWHOM - 0xb1e                 */
+#define BOT_LINKATTEMPT         get_language(0xb1f)
+#define BOT_NOTESTORED2         get_language(0xb20)
+#define BOT_NOTEBOXFULL         get_language(0xb21)
+#define BOT_NOTEISAWAY          get_language(0xb22)
+#define BOT_NOTESENTTO          get_language(0xb23)
+#define BOT_DISCONNECTED        get_language(0xb24)
+#define BOT_PEOPLEONCHAN        get_language(0xb25)
+#define BOT_CANTLINKTHERE       get_language(0xb26)
+#define BOT_CANTUNLINK          get_language(0xb27)
+#define BOT_LOOPDETECT          get_language(0xb28)
+#define BOT_BOGUSLINK           get_language(0xb29)
+/* was: BOT_BOGUSLINK2 - 0xb2a                   */
+#define BOT_DISCONNLEAF         get_language(0xb2b)
+#define BOT_LINKEDTO            get_language(0xb2c)
+#define BOT_ILLEGALLINK         get_language(0xb2d)
+#define BOT_YOUREALEAF          get_language(0xb2e)
+#define BOT_REJECTING           get_language(0xb2f)
+#define BOT_OLDBOT              get_language(0xb30)
+#define BOT_TRACERESULT         get_language(0xb31)
+#define BOT_DOESNTEXIST         get_language(0xb32)
+#define BOT_NOREMOTEBOOT        get_language(0xb33)
+#define BOT_NOOWNERBOOT         get_language(0xb34)
+#define BOT_XFERREJECTED        get_language(0xb35)
+/* was: BOT_NOFILESYS - 0xb36                    */
+#define BOT_BOTNETUSERS         get_language(0xb37)
+#define BOT_PARTYLINE           get_language(0xb38)
+#define BOT_LOCALCHAN           get_language(0xb39)
+#define BOT_USERSONCHAN         get_language(0xb3a)
+#define BOT_NOBOTSLINKED        get_language(0xb3b)
+#define BOT_NOTRACEINFO         get_language(0xb3c)
+#define BOT_COMPLEXTREE         get_language(0xb3d)
+#define BOT_UNLINKALL           get_language(0xb3e)
+#define BOT_KILLLINKATTEMPT     get_language(0xb3f)
+#define BOT_ENDLINKATTEMPT      get_language(0xb40)
+#define BOT_BREAKLINK           get_language(0xb41)
+#define BOT_UNLINKEDFROM        get_language(0xb42)
+#define BOT_NOTCONNECTED        get_language(0xb43)
+#define BOT_WIPEBOTTABLE        get_language(0xb44)
+#define BOT_BOTUNKNOWN          get_language(0xb45)
+#define BOT_CANTLINKMYSELF      get_language(0xb46)
+#define BOT_ALREADYLINKED       get_language(0xb47)
+#define BOT_NOTELNETADDY        get_language(0xb48)
+#define BOT_LINKING             get_language(0xb49)
+#define BOT_CANTFINDRELAYUSER   get_language(0xb4a)
+#define BOT_CANTLINKTO          get_language(0xb4b)
+#define BOT_CANTRELAYMYSELF     get_language(0xb4c)
+#define BOT_CONNECTINGTO        get_language(0xb4d)
+#define BOT_BYEINFO1            get_language(0xb4e)
+#define BOT_ABORTRELAY1         get_language(0xb4f)
+#define BOT_ABORTRELAY2         get_language(0xb50)
+#define BOT_ABORTRELAY3         get_language(0xb51)
+/* was: BOT_PARTYJOINED - 0xb52                  */
+#define BOT_LOSTDCCUSER         get_language(0xb53)
+#define BOT_DROPPINGRELAY       get_language(0xb54)
+#define BOT_RELAYSUCCESS        get_language(0xb55)
+#define BOT_BYEINFO2            get_language(0xb56)
+#define BOT_RELAYLINK           get_language(0xb57)
+#define BOT_PARTYLEFT           get_language(0xb58)
+#define BOT_ENDRELAY1           get_language(0xb59)
+#define BOT_ENDRELAY2           get_language(0xb5a)
+#define BOT_PARTYREJOINED       get_language(0xb5b)
+#define BOT_DROPPEDRELAY        get_language(0xb5c)
+#define BOT_BREAKRELAY          get_language(0xb5d)
+#define BOT_RELAYBROKEN         get_language(0xb5e)
+#define BOT_PINGTIMEOUT         get_language(0xb5f)
+#define BOT_BOTNOTLEAFLIKE      get_language(0xb60)
+#define BOT_BOTDROPPED          get_language(0xb61)
+#define BOT_ALREADYLINKING      get_language(0xb62)
+
+/* Messages pertaining to MODULES */
+#define MOD_ALREADYLOAD         get_language(0x200)
+#define MOD_BADCWD              get_language(0x201)
+#define MOD_NOSTARTDEF          get_language(0x202)
+#define MOD_NEEDED              get_language(0x204)
+#define MOD_NOCLOSEDEF          get_language(0x205)
+#define MOD_UNLOADED            get_language(0x206)
+#define MOD_NOSUCH              get_language(0x207)
+/* was: MOD_NOINFO - 0x208                       */
+#define MOD_LOADERROR           get_language(0x209)
+#define MOD_UNLOADERROR         get_language(0x20a)
+#define MOD_CANTLOADMOD         get_language(0x20b)
+#define MOD_STAGNANT            get_language(0x20c)
+#define MOD_NOCRYPT             get_language(0x20d)
+#define MOD_NOFILESYSMOD        get_language(0x20e)
+#define MOD_LOADED_WITH_LANG    get_language(0x20f)
+#define MOD_LOADED              get_language(0x210)
+
+#define DCC_NOSTRANGERS         get_language(0xc00)
+#define DCC_REFUSED             get_language(0xc01)
+#define DCC_REFUSED2            get_language(0xc02)
+#define DCC_REFUSED3            get_language(0xc03)
+#define DCC_REFUSED4            get_language(0xc04)
+#define DCC_REFUSED5            get_language(0xc05)
+/* was: DCC_REFUSED6            0xc06            */
+#define DCC_REFUSED7            get_language(0xc21)
+#define DCC_TOOMANY             get_language(0xc07)
+/* was: DCC_TRYLATER            0xc08            */
+/* was: DCC_REFUSEDTAND         0xc09            */
+/* was: DCC_NOSTRANGERFILES1    0xc0a            */
+/* was: DCC_NOSTRANGERFILES2    0xc0b            */
+#define DCC_TOOMANYDCCS1        get_language(0xc0c)
+#define DCC_TOOMANYDCCS2        get_language(0xc0d)
+/* was: DCC_DCCNOTSUPPORTED     0xc0e            */
+/* was: DCC_REFUSEDNODCC        0xc0f            */
+/* was: DCC_FILENAMEBADSLASH    0xc10            */
+/* was: DCC_MISSINGFILESIZE     0xc11            */
+/* was: DCC_FILEEXISTS          0xc12            */
+/* was: DCC_CREATEERROR         0xc13            */
+/* was: DCC_FILEBEINGSENT       0xc14            */
+/* was: DCC_REFUSEDNODCC2       0xc15            */
+/* was: DCC_REFUSEDNODCC3       0xc16            */
+/* was: DCC_FILETOOLARGE        0xc17            */
+/* was: DCC_FILETOOLARGE2       0xc18            */
+#define DCC_CONNECTFAILED1      get_language(0xc19)
+#define DCC_CONNECTFAILED2      get_language(0xc1a)
+#define DCC_CONNECTFAILED3      get_language(0xc22)
+/* was: DCC_FILESYSBROKEN                  0xc1b */
+#define DCC_ENTERPASS           get_language(0xc1c)
+#define DCC_FLOODBOOT           get_language(0xc1d)
+#define DCC_BOOTED1             get_language(0xc1e)
+#define DCC_BOOTED2             get_language(0xc1f)
+#define DCC_BOOTED3             get_language(0xc20)
 
-
-/* Messages referring to channels
- */
-#define CHAN_NOSUCH		get_language(0x900)
-#define CHAN_BADCHANMODE	get_language(0x902)
-#define CHAN_MASSDEOP		get_language(0x903)
-#define CHAN_MASSDEOP_KICK	get_language(0x904)
-#define CHAN_FORCEJOIN		get_language(0x907)
-#define CHAN_FAKEMODE		get_language(0x908)
-#define CHAN_FAKEMODE_KICK	get_language(0x909)
-#define CHAN_DESYNCMODE		get_language(0x90a)
-#define CHAN_DESYNCMODE_KICK	get_language(0x90b)
-#define CHAN_FLOOD		get_language(0x90c)
-
-/* Messages referring to ignores
- */
-#define IGN_NONE		get_language(0xa00)
-#define IGN_CURRENT		get_language(0xa01)
-#define IGN_NOLONGER		get_language(0xa02)
-
-/* Messages referring to bots
- */
-#define BOT_NOTHERE		get_language(0xb00)
-#define BOT_NONOTES		get_language(0xb01)
-#define BOT_USERAWAY		get_language(0xb02)
-#define BOT_NOTEARRIVED		get_language(0xb07)
-#define BOT_MSGDIE		get_language(0xb18)
-#define BOT_NOSUCHUSER		get_language(0xb19)
-#define BOT_NOCHANNELS		get_language(0xb1a)
-#define BOT_PARTYMEMBS		get_language(0xb1b)
-#define BOT_BOTSCONNECTED	get_language(0xb1c)
-#define BOT_OTHERPEOPLE		get_language(0xb1d)
-/* was: BOT_OUTDATEDWHOM - 0xb1e */
-#define BOT_LINKATTEMPT		get_language(0xb1f)
-#define BOT_NOTESTORED2		get_language(0xb20)
-#define BOT_NOTEBOXFULL		get_language(0xb21)
-#define BOT_NOTEISAWAY		get_language(0xb22)
-#define BOT_NOTESENTTO		get_language(0xb23)
-#define BOT_DISCONNECTED	get_language(0xb24)
-#define BOT_PEOPLEONCHAN	get_language(0xb25)
-#define BOT_CANTLINKTHERE	get_language(0xb26)
-#define BOT_CANTUNLINK		get_language(0xb27)
-#define BOT_LOOPDETECT		get_language(0xb28)
-#define BOT_BOGUSLINK		get_language(0xb29)
-/* was: BOT_BOGUSLINK2 - 0xb2a */
-#define BOT_DISCONNLEAF		get_language(0xb2b)
-#define BOT_LINKEDTO		get_language(0xb2c)
-#define BOT_ILLEGALLINK		get_language(0xb2d)
-#define BOT_YOUREALEAF		get_language(0xb2e)
-#define BOT_REJECTING		get_language(0xb2f)
-#define BOT_OLDBOT		get_language(0xb30)
-#define BOT_TRACERESULT		get_language(0xb31)
-#define BOT_DOESNTEXIST		get_language(0xb32)
-#define BOT_NOREMOTEBOOT	get_language(0xb33)
-#define BOT_NOOWNERBOOT		get_language(0xb34)
-#define BOT_XFERREJECTED	get_language(0xb35)
-/* was: BOT_NOFILESYS - 0xb36 */
-#define BOT_BOTNETUSERS		get_language(0xb37)
-#define BOT_PARTYLINE		get_language(0xb38)
-#define BOT_LOCALCHAN		get_language(0xb39)
-#define BOT_USERSONCHAN		get_language(0xb3a)
-#define BOT_NOBOTSLINKED	get_language(0xb3b)
-#define BOT_NOTRACEINFO		get_language(0xb3c)
-#define BOT_COMPLEXTREE		get_language(0xb3d)
-#define BOT_UNLINKALL		get_language(0xb3e)
-#define BOT_KILLLINKATTEMPT	get_language(0xb3f)
-#define BOT_ENDLINKATTEMPT	get_language(0xb40)
-#define BOT_BREAKLINK		get_language(0xb41)
-#define BOT_UNLINKEDFROM	get_language(0xb42)
-#define BOT_NOTCONNECTED	get_language(0xb43)
-#define BOT_WIPEBOTTABLE	get_language(0xb44)
-#define BOT_BOTUNKNOWN		get_language(0xb45)
-#define BOT_CANTLINKMYSELF	get_language(0xb46)
-#define BOT_ALREADYLINKED	get_language(0xb47)
-#define BOT_NOTELNETADDY	get_language(0xb48)
-#define BOT_LINKING		get_language(0xb49)
-#define BOT_CANTFINDRELAYUSER	get_language(0xb4a)
-#define BOT_CANTLINKTO		get_language(0xb4b)
-#define BOT_CANTRELAYMYSELF	get_language(0xb4c)
-#define BOT_CONNECTINGTO	get_language(0xb4d)
-#define BOT_BYEINFO1		get_language(0xb4e)
-#define BOT_ABORTRELAY1		get_language(0xb4f)
-#define BOT_ABORTRELAY2		get_language(0xb50)
-#define BOT_ABORTRELAY3		get_language(0xb51)
-/* was: BOT_PARTYJOINED - 0xb52 */
-#define BOT_LOSTDCCUSER		get_language(0xb53)
-#define BOT_DROPPINGRELAY	get_language(0xb54)
-#define BOT_RELAYSUCCESS	get_language(0xb55)
-#define BOT_BYEINFO2		get_language(0xb56)
-#define BOT_RELAYLINK		get_language(0xb57)
-#define BOT_PARTYLEFT		get_language(0xb58)
-#define BOT_ENDRELAY1		get_language(0xb59)
-#define BOT_ENDRELAY2		get_language(0xb5a)
-#define BOT_PARTYREJOINED	get_language(0xb5b)
-#define BOT_DROPPEDRELAY	get_language(0xb5c)
-#define BOT_BREAKRELAY		get_language(0xb5d)
-#define BOT_RELAYBROKEN		get_language(0xb5e)
-#define BOT_PINGTIMEOUT		get_language(0xb5f)
-#define BOT_BOTNOTLEAFLIKE	get_language(0xb60)
-#define BOT_BOTDROPPED		get_language(0xb61)
-#define BOT_ALREADYLINKING	get_language(0xb62)
-
-/* Messages pertaining to MODULES
- */
-#define MOD_ALREADYLOAD		get_language(0x200)
-#define MOD_BADCWD		get_language(0x201)
-#define MOD_NOSTARTDEF		get_language(0x202)
-#define MOD_NEEDED		get_language(0x204)
-#define MOD_NOCLOSEDEF		get_language(0x205)
-#define MOD_UNLOADED		get_language(0x206)
-#define MOD_NOSUCH		get_language(0x207)
-/* was: MOD_NOINFO - 0x208 */
-#define MOD_LOADERROR		get_language(0x209)
-#define MOD_UNLOADERROR		get_language(0x20a)
-#define MOD_CANTLOADMOD		get_language(0x20b)
-#define MOD_STAGNANT		get_language(0x20c)
-#define MOD_NOCRYPT		get_language(0x20d)
-#define MOD_NOFILESYSMOD	get_language(0x20e)
-#define MOD_LOADED_WITH_LANG	get_language(0x20f)
-#define MOD_LOADED		get_language(0x210)
-
-#define DCC_NOSTRANGERS		get_language(0xc00)
-#define DCC_REFUSED		get_language(0xc01)
-#define DCC_REFUSED2		get_language(0xc02)
-#define DCC_REFUSED3		get_language(0xc03)
-#define DCC_REFUSED4		get_language(0xc04)
-#define DCC_REFUSED5		get_language(0xc05)
-/* was: DCC_REFUSED6 - 0xc06 */
-#define DCC_REFUSED7		get_language(0xc21)
-#define DCC_TOOMANY		get_language(0xc07)
-/* was: DCC_TRYLATER - 0xc08 */
-/* was: DCC_REFUSEDTAND - 0xc09 */
-/* was: DCC_NOSTRANGERFILES1 - 0xc0a */
-/* was: DCC_NOSTRANGERFILES2 - 0xc0b */
-#define DCC_TOOMANYDCCS1	get_language(0xc0c)
-#define DCC_TOOMANYDCCS2	get_language(0xc0d)
-/* was: DCC_DCCNOTSUPPORTED - 0xc0e */
-/* was: DCC_REFUSEDNODCC - 0xc0f */
-/* was: DCC_FILENAMEBADSLASH - 0xc10 */
-/* was: DCC_MISSINGFILESIZE - 0xc11 */
-/* was: DCC_FILEEXISTS - 0xc12 */
-/* was: DCC_CREATEERROR - 0xc13 */
-/* was: DCC_FILEBEINGSENT - 0xc14 */
-/* was: DCC_REFUSEDNODCC2 - 0xc15 */
-/* was: DCC_REFUSEDNODCC3 - 0xc16 */
-/* was: DCC_FILETOOLARGE - 0xc17 */
-/* was: DCC_FILETOOLARGE2 - 0xc18 */
-#define DCC_CONNECTFAILED1	get_language(0xc19)
-#define DCC_CONNECTFAILED2	get_language(0xc1a)
-#define DCC_CONNECTFAILED3	get_language(0xc22)
-/* was: DCC_FILESYSBROKEN - 0xc1b */
-#define DCC_ENTERPASS		get_language(0xc1c)
-#define DCC_FLOODBOOT		get_language(0xc1d)
-#define DCC_BOOTED1		get_language(0xc1e)
-#define DCC_BOOTED2		get_language(0xc1f)
-#define DCC_BOOTED3		get_language(0xc20)
-
-/* Stuff from chan.c
- */
-/* was: CHAN_LIMBOBOT - 0xd00 */
+/* Stuff from chan.c */
+/* was: CHAN_LIMBOBOT           0xd00            */
 
 /* BOTNET messages
  */
-#define NET_FAKEREJECT		get_language(0xe00)
-#define NET_LINKEDTO		get_language(0xe01)
-#define NET_WRONGBOT		get_language(0xe02)
-#define NET_LEFTTHE		get_language(0xe03)
-#define NET_JOINEDTHE		get_language(0xe04)
-#define NET_AWAY		get_language(0xe05)
-#define NET_UNAWAY		get_language(0xe06)
-#define NET_NICKCHANGE		get_language(0xe07)
-
-/* Stuff from dcc.c
- */
-#define DCC_REJECT		get_language(0xe08)
-#define DCC_LINKED		get_language(0xe09)
-#define DCC_LINKFAIL		get_language(0xe0a)
-#define DCC_BADPASS		get_language(0xe0b)
-#define DCC_PASSREQ		get_language(0xe0c)
-#define DCC_LINKERROR		get_language(0xe0d)
-#define DCC_LOSTBOT		get_language(0xe0e)
-#define DCC_TIMEOUT		get_language(0xe0f)
-#define DCC_LOGGEDIN		get_language(0xe10)
-#define DCC_BADLOGIN		get_language(0xe11)
-#define DCC_HOUSTON		get_language(0xe12)
-#define DCC_JOIN		get_language(0xe13)
-#define DCC_LOSTDCC		get_language(0xe14)
-#define DCC_PWDTIMEOUT		get_language(0xe15)
-#define DCC_CLOSED		get_language(0xe16)
-#define DCC_FAILED		get_language(0xe17)
-#define DCC_BADSRC		get_language(0xe18)
-/* was: DCC_BADIP 0xe19 */
-#define DCC_BADHOST		get_language(0xe1a)
-#define DCC_TELCONN		get_language(0xe1b)
-#define DCC_IDENTFAIL		get_language(0xe1c)
-#define DCC_PORTDIE		get_language(0xe1d)
-#define DCC_BADNICK		get_language(0xe1e)
-#define DCC_NONBOT		get_language(0xe1f)
-#define DCC_NONUSER		get_language(0xe20)
-#define DCC_INVHANDLE		get_language(0xe21)
-#define DCC_DUPLICATE		get_language(0xe22)
-#define DCC_NOPASS		get_language(0xe23)
-#define DCC_LOSTCON		get_language(0xe24)
-#define DCC_TTIMEOUT		get_language(0xe25)
-#define DCC_INSTCOMPL		get_language(0xe26)
-#define DCC_NEWUSER		get_language(0xe27)
-#define DCC_LOSTNEWUSER		get_language(0xe28)
-#define DCC_LOSTNEWUSR2		get_language(0xe29)
-#define DCC_TIMEOUTUSER		get_language(0xe2a)
-#define DCC_TIMEOUTUSR2		get_language(0xe2b)
-#define DCC_TCLERROR		get_language(0xe2c)
-#define DCC_DEADSOCKET		get_language(0xe2d)
-#define DCC_LOSTCONN		get_language(0xe2e)
-#define DCC_EOFIDENT		get_language(0xe2f)
-#define DCC_LOSTIDENT		get_language(0xe30)
-#define DCC_NOACCESS		get_language(0xe31)
-#define DCC_MYBOTNETNICK	get_language(0xe32)
-#define DCC_LOSTDUP		get_language(0xe33)
+#define NET_FAKEREJECT          get_language(0xe00)
+#define NET_LINKEDTO            get_language(0xe01)
+#define NET_WRONGBOT            get_language(0xe02)
+#define NET_LEFTTHE             get_language(0xe03)
+#define NET_JOINEDTHE           get_language(0xe04)
+#define NET_AWAY                get_language(0xe05)
+#define NET_UNAWAY              get_language(0xe06)
+#define NET_NICKCHANGE          get_language(0xe07)
+
+/* Stuff from dcc.c */
+#define DCC_REJECT              get_language(0xe08)
+#define DCC_LINKED              get_language(0xe09)
+#define DCC_LINKFAIL            get_language(0xe0a)
+#define DCC_BADPASS             get_language(0xe0b)
+#define DCC_PASSREQ             get_language(0xe0c)
+#define DCC_LINKERROR           get_language(0xe0d)
+#define DCC_LOSTBOT             get_language(0xe0e)
+#define DCC_TIMEOUT             get_language(0xe0f)
+#define DCC_LOGGEDIN            get_language(0xe10)
+#define DCC_BADLOGIN            get_language(0xe11)
+#define DCC_HOUSTON             get_language(0xe12)
+#define DCC_JOIN                get_language(0xe13)
+#define DCC_LOSTDCC             get_language(0xe14)
+#define DCC_PWDTIMEOUT          get_language(0xe15)
+#define DCC_CLOSED              get_language(0xe16)
+#define DCC_FAILED              get_language(0xe17)
+#define DCC_BADSRC              get_language(0xe18)
+/* was: DCC_BADIP               0xe19            */
+#define DCC_BADHOST             get_language(0xe1a)
+#define DCC_TELCONN             get_language(0xe1b)
+#define DCC_IDENTFAIL           get_language(0xe1c)
+#define DCC_PORTDIE             get_language(0xe1d)
+#define DCC_BADNICK             get_language(0xe1e)
+#define DCC_NONBOT              get_language(0xe1f)
+#define DCC_NONUSER             get_language(0xe20)
+#define DCC_INVHANDLE           get_language(0xe21)
+#define DCC_DUPLICATE           get_language(0xe22)
+#define DCC_NOPASS              get_language(0xe23)
+#define DCC_LOSTCON             get_language(0xe24)
+#define DCC_TTIMEOUT            get_language(0xe25)
+#define DCC_INSTCOMPL           get_language(0xe26)
+#define DCC_NEWUSER             get_language(0xe27)
+#define DCC_LOSTNEWUSER         get_language(0xe28)
+#define DCC_LOSTNEWUSR2         get_language(0xe29)
+#define DCC_TIMEOUTUSER         get_language(0xe2a)
+#define DCC_TIMEOUTUSR2         get_language(0xe2b)
+#define DCC_TCLERROR            get_language(0xe2c)
+#define DCC_DEADSOCKET          get_language(0xe2d)
+#define DCC_LOSTCONN            get_language(0xe2e)
+#define DCC_EOFIDENT            get_language(0xe2f)
+#define DCC_LOSTIDENT           get_language(0xe30)
+#define DCC_NOACCESS            get_language(0xe31)
+#define DCC_MYBOTNETNICK        get_language(0xe32)
+#define DCC_LOSTDUP             get_language(0xe33)
 
 #endif /* _EGG_LANG_H */
Index: eggdrop1.6/src/main.h
diff -u eggdrop1.6/src/main.h:1.21 eggdrop1.6/src/main.h:1.22
--- eggdrop1.6/src/main.h:1.21	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/main.h	Tue Jan 28 23:48:40 2003
@@ -2,7 +2,7 @@
  * main.h
  *   include file to include most other include files
  *
- * $Id: main.h,v 1.21 2003/01/28 06:37:24 wcc Exp $
+ * $Id: main.h,v 1.22 2003/01/29 05:48:40 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -89,28 +89,24 @@
 
 #endif
 
-#define iptolong(a)		(0xffffffff & 				\
-				 (long) (htonl((unsigned long) a)))
-#define fixcolon(x)		do {					\
-	if ((x)[0] == ':')			 			\
-		(x)++;							\
-	else								\
-		(x) = newsplit(&(x));					\
+#define iptolong(a) (0xffffffff & (long) (htonl((unsigned long) a)))
+#define fixcolon(x) do {                                                \
+        if ((x)[0] == ':')                                              \
+          (x)++;                                                        \
+        else                                                            \
+          (x) = newsplit(&(x));                                         \
 } while (0)
 
 /* This macro copies (_len - 1) bytes from _source to _target. The
  * target string is NULL-terminated.
  */
-#define strncpyz(_target, _source, _len)	do {			\
-	strncpy((_target), (_source), (_len) - 1);			\
-	(_target)[(_len) - 1] = 0;					\
+#define strncpyz(_target, _source, _len) do {                           \
+        strncpy((_target), (_source), (_len) - 1);                      \
+        (_target)[(_len) - 1] = 0;                                      \
 } while (0)
 
 #ifdef BORGCUBES
-
-/* For net.c */
-#  define O_NONBLOCK	00000004        /* POSIX non-blocking I/O              */
-
+#  define O_NONBLOCK 00000004 /* POSIX non-blocking I/O */
 #endif /* BORGUBES */
 
 
Index: eggdrop1.6/src/md5/md5c.c
diff -u eggdrop1.6/src/md5/md5c.c:1.8 eggdrop1.6/src/md5/md5c.c:1.9
--- eggdrop1.6/src/md5/md5c.c:1.8	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/md5/md5c.c	Tue Jan 28 23:48:41 2003
@@ -25,18 +25,18 @@
  * F is optimized compared to its RFC 1321 definition just like in Colin
  * Plumb's implementation.
  */
-#define F(x, y, z)			((z) ^ ((x) & ((y) ^ (z))))
-#define G(x, y, z)			((y) ^ ((z) & ((x) ^ (y))))
-#define H(x, y, z)			((x) ^ (y) ^ (z))
-#define I(x, y, z)			((y) ^ ((x) | ~(z)))
+#define F(x, y, z)                      ((z) ^ ((x) & ((y) ^ (z))))
+#define G(x, y, z)                      ((y) ^ ((z) & ((x) ^ (y))))
+#define H(x, y, z)                      ((x) ^ (y) ^ (z))
+#define I(x, y, z)                      ((y) ^ ((x) | ~(z)))
 
 /*
  * The MD5 transformation for all four rounds.
  */
 #define STEP(f, a, b, c, d, x, t, s) \
-	(a) += f((b), (c), (d)) + (x) + (t); \
-	(a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
-	(a) += (b);
+        (a) += f((b), (c), (d)) + (x) + (t); \
+        (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
+        (a) += (b);
 
 /*
  * SET reads 4 input bytes in little-endian byte order and stores them
@@ -48,18 +48,18 @@
  */
 #if defined(__i386__) || defined(__vax__)
 #define SET(n) \
-	(*(MD5_u32plus *)&ptr[(n) * 4])
+        (*(MD5_u32plus *)&ptr[(n) * 4])
 #define GET(n) \
-	SET(n)
+        SET(n)
 #else
 #define SET(n) \
-	(ctx->block[(n)] = \
-	(MD5_u32plus)ptr[(n) * 4] | \
-	((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \
-	((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \
-	((MD5_u32plus)ptr[(n) * 4 + 3] << 24))
+        (ctx->block[(n)] = \
+        (MD5_u32plus)ptr[(n) * 4] | \
+        ((MD5_u32plus)ptr[(n) * 4 + 1] << 8) | \
+        ((MD5_u32plus)ptr[(n) * 4 + 2] << 16) | \
+        ((MD5_u32plus)ptr[(n) * 4 + 3] << 24))
 #define GET(n) \
-	(ctx->block[(n)])
+        (ctx->block[(n)])
 #endif
 
 /*
Index: eggdrop1.6/src/misc.c
diff -u eggdrop1.6/src/misc.c:1.57 eggdrop1.6/src/misc.c:1.58
--- eggdrop1.6/src/misc.c:1.57	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/misc.c	Tue Jan 28 23:48:40 2003
@@ -7,7 +7,7 @@
  *   help system
  *   motd display and %var substitution
  *
- * $Id: misc.c,v 1.57 2003/01/28 06:37:24 wcc Exp $
+ * $Id: misc.c,v 1.58 2003/01/29 05:48:40 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -130,24 +130,24 @@
   return 0;
 }
 
-/*	  This implementation wont overrun dst - 'max' is the max bytes that dst
- *	can be, including the null terminator. So if 'dst' is a 128 byte buffer,
- *	pass 128 as 'max'. The function will _always_ null-terminate 'dst'.
+/*  This implementation wont overrun dst - 'max' is the max bytes that dst
+ *  can be, including the null terminator. So if 'dst' is a 128 byte buffer,
+ *  pass 128 as 'max'. The function will _always_ null-terminate 'dst'.
  *
- *	Returns: The number of characters appended to 'dst'.
+ *  Returns: The number of characters appended to 'dst'.
  *
- *  Usage eg.
+ *  Usage example:
  *
- *		char 	buf[128];
- *		size_t	bufsize = sizeof(buf);
+ *    char buf[128];
+ *    size_t bufsize = sizeof(buf);
  *
- *		buf[0] = 0, bufsize--;
+ *    buf[0] = 0, bufsize--;
  *
- *		while (blah && bufsize) {
- *			bufsize -= egg_strcatn(buf, <some-long-string>, sizeof(buf));
- *		}
+ *    while (blah && bufsize) {
+ *      bufsize -= egg_strcatn(buf, <some-long-string>, sizeof(buf));
+ *    }
  *
- *	<Cybah>
+ *  <Cybah>
  */
 int egg_strcatn(char *dst, const char *src, size_t max)
 {
Index: eggdrop1.6/src/misc_file.c
diff -u eggdrop1.6/src/misc_file.c:1.9 eggdrop1.6/src/misc_file.c:1.10
--- eggdrop1.6/src/misc_file.c:1.9	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/misc_file.c	Tue Jan 28 23:48:40 2003
@@ -2,7 +2,7 @@
  * misc.c -- handles:
  *   copyfile() movefile() file_readable()
  *
- * $Id: misc_file.c,v 1.9 2003/01/28 06:37:24 wcc Exp $
+ * $Id: misc_file.c,v 1.10 2003/01/29 05:48:40 wcc Exp $
  */
 /*
  * Copyright (C) 1999, 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -32,10 +32,10 @@
 /* Copy a file from one place to another (possibly erasing old copy).
  *
  * returns:  0 if OK
- *	     1 if can't open original file
- *	     2 if can't open new file
- *	     3 if original file isn't normal
- *	     4 if ran out of disk space
+ *           1 if can't open original file
+ *           2 if can't open new file
+ *           3 if original file isn't normal
+ *           4 if ran out of disk space
  */
 int copyfile(char *oldpath, char *newpath)
 {
Index: eggdrop1.6/src/mod/assoc.mod/assoc.c
diff -u eggdrop1.6/src/mod/assoc.mod/assoc.c:1.23 eggdrop1.6/src/mod/assoc.mod/assoc.c:1.24
--- eggdrop1.6/src/mod/assoc.mod/assoc.c:1.23	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/assoc.mod/assoc.c	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * assoc.c -- part of assoc.mod
  *   the assoc code, moved here mainly from botnet.c for module work
  *
- * $Id: assoc.c,v 1.23 2003/01/28 06:37:25 wcc Exp $
+ * $Id: assoc.c,v 1.24 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -199,9 +199,8 @@
     putlog(LOG_CMDS, "*", "#%s# assoc", dcc[idx].nick);
     dump_assoc(idx);
   }
-  else if (!u || !(u->flags & USER_BOTMAST)) {
-    dprintf(idx, "%s", ASSOC_NOSUCHCMD);
-  }
+  else if (!u || !(u->flags & USER_BOTMAST))
+    dprintf(idx, "%s", MISC_NOSUCHCMD);
   else {
     num = newsplit(&par);
     if (num[0] == '*') {
Index: eggdrop1.6/src/mod/assoc.mod/assoc.h
diff -u eggdrop1.6/src/mod/assoc.mod/assoc.h:1.6 eggdrop1.6/src/mod/assoc.mod/assoc.h:1.7
--- eggdrop1.6/src/mod/assoc.mod/assoc.h:1.6	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/assoc.mod/assoc.h	Tue Jan 28 23:48:41 2003
@@ -1,7 +1,7 @@
 /*
  * assoc.h -- part of assoc.mod
  *
- * $Id: assoc.h,v 1.6 2003/01/28 06:37:25 wcc Exp $
+ * $Id: assoc.h,v 1.7 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -24,22 +24,21 @@
 #ifndef _EGG_MOD_ASSOC_ASSOC_H
 #define _EGG_MOD_ASSOC_ASSOC_H
 
-#define ASSOC_NOSUCHCMD			MISC_NOSUCHCMD
-#define ASSOC_NOCHNAMES			get_language(0xb000)
-#define ASSOC_CHAN				get_language(0xb001)
-#define ASSOC_NAME				get_language(0xb002)
-#define ASSOC_LCHAN_RANGE		get_language(0xb003)
-#define ASSOC_CHAN_RANGE		get_language(0xb004)
-#define ASSOC_PARTYLINE			get_language(0xb005)
-#define ASSOC_NONAME_CHAN		get_language(0xb006)
-#define ASSOC_REMNAME_CHAN		get_language(0xb007)
-#define ASSOC_REMOUT_CHAN		get_language(0xb008)
-#define ASSOC_NEWNAME_CHAN		get_language(0xb009)
-#define ASSOC_NEWOUT_CHAN		get_language(0xb00a)
-#define ASSOC_CHNAME_NAMED		get_language(0xb00b)
-#define ASSOC_CHNAME_NAMED2		get_language(0xb00c)
-#define ASSOC_CHNAME_REM		get_language(0xb00d)
-#define ASSOC_CHNAME_TOOLONG	get_language(0xb00e)
-#define ASSOC_CHNAME_FIRSTCHAR	get_language(0xb00f)
+#define ASSOC_NOCHNAMES        get_language(0xb000)
+#define ASSOC_CHAN             get_language(0xb001)
+#define ASSOC_NAME             get_language(0xb002)
+#define ASSOC_LCHAN_RANGE      get_language(0xb003)
+#define ASSOC_CHAN_RANGE       get_language(0xb004)
+#define ASSOC_PARTYLINE        get_language(0xb005)
+#define ASSOC_NONAME_CHAN      get_language(0xb006)
+#define ASSOC_REMNAME_CHAN     get_language(0xb007)
+#define ASSOC_REMOUT_CHAN      get_language(0xb008)
+#define ASSOC_NEWNAME_CHAN     get_language(0xb009)
+#define ASSOC_NEWOUT_CHAN      get_language(0xb00a)
+#define ASSOC_CHNAME_NAMED     get_language(0xb00b)
+#define ASSOC_CHNAME_NAMED2    get_language(0xb00c)
+#define ASSOC_CHNAME_REM       get_language(0xb00d)
+#define ASSOC_CHNAME_TOOLONG   get_language(0xb00e)
+#define ASSOC_CHNAME_FIRSTCHAR get_language(0xb00f)
 
 #endif /* _EGG_MOD_ASSOC_ASSOC_H */
Index: eggdrop1.6/src/mod/assoc.mod/help/assoc.help
diff -u eggdrop1.6/src/mod/assoc.mod/help/assoc.help:1.1 eggdrop1.6/src/mod/assoc.mod/help/assoc.help:1.2
--- eggdrop1.6/src/mod/assoc.mod/help/assoc.help:1.1	Thu Oct 21 14:23:02 1999
+++ eggdrop1.6/src/mod/assoc.mod/help/assoc.help	Tue Jan 28 23:48:41 2003
@@ -1,24 +1,23 @@
 %{help=assoc module}
 ###  help on the %bassoc module%b
-   This module provides botnet channel naming, see help on the
-   %b'.assoc'%b command.
+   This module provides botnet channel naming.
+
+See also: assoc
 %{help=assoc}
-###  %bassoc%b 
-   Displays a list of current botnet channel names. 
+###  %bassoc%b
+   This displays a list of current botnet channel names.
 %{+t}
-###  %bassoc%b <channel #> <name>
-   Creates a name for a channel.  The name will propagate across your
-   botnet (if you're hooked into one) and can be used instead of the
-   channel # when changing chat channels (see '.chat').  If you omit
-   the channel # and name, it will just dump a list of the current
-   named channels.
+###  %bassoc%b [<[*]channel number> <name>]
+   This creates a name for a channel. If the channel number
+   is prefixed with a '*', the association will only take
+   place for the local channel. The name will propagate
+   across the botnet and can be used instead of the channel
+   number when changing chat channels. If you omit the
+   channel number and name, it will dump a list of the
+   current named channels. If you omit just the name, the
+   association will be removed.
 
-###  %bassoc%b <*channel #> <name>
-   Creates a name for a local channel.  These channels are local to
-   the bot itself.
- 
-###  %bassoc%b <[*]channel #>
-   Wipes out the name for a channel, if there was one.
+See also: chat
 %{end}
 %{help=all}
 %{+t}
Index: eggdrop1.6/src/mod/blowfish.mod/blowfish.h
diff -u eggdrop1.6/src/mod/blowfish.mod/blowfish.h:1.9 eggdrop1.6/src/mod/blowfish.mod/blowfish.h:1.10
--- eggdrop1.6/src/mod/blowfish.mod/blowfish.h:1.9	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/blowfish.mod/blowfish.h	Tue Jan 28 23:48:41 2003
@@ -1,7 +1,7 @@
 /*
  * blowfish.h -- part of blowfish.mod
  *
- * $Id: blowfish.h,v 1.9 2003/01/28 06:37:25 wcc Exp $
+ * $Id: blowfish.h,v 1.10 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -25,11 +25,11 @@
 #ifndef _EGG_MOD_BLOWFISH_BLOWFISH_H
 #define _EGG_MOD_BLOWFISH_BLOWFISH_H
 
-#define MAXKEYBYTES	56      /* 448 bits */
-#define bf_N		16
-#define noErr		 0
-#define DATAERROR	-1
-#define KEYBYTES	 8
+#define MAXKEYBYTES 56 /* 448 bits */
+#define bf_N        16
+#define noErr        0
+#define DATAERROR   -1
+#define KEYBYTES     8
 
 union aword {
   u_32bit_t word;
@@ -40,12 +40,12 @@
     unsigned int byte1:8;
     unsigned int byte2:8;
     unsigned int byte3:8;
-#else                           /* !WORDS_BIGENDIAN */
+#else /* !WORDS_BIGENDIAN */
     unsigned int byte3:8;
     unsigned int byte2:8;
     unsigned int byte1:8;
     unsigned int byte0:8;
-#endif                          /* !WORDS_BIGENDIAN */
+#endif /* !WORDS_BIGENDIAN */
   } w;
 };
 
Index: eggdrop1.6/src/mod/channels.mod/channels.c
diff -u eggdrop1.6/src/mod/channels.mod/channels.c:1.77 eggdrop1.6/src/mod/channels.mod/channels.c:1.78
--- eggdrop1.6/src/mod/channels.mod/channels.c:1.77	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/channels.mod/channels.c	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * channels.c -- part of channels.mod
  *   support for channels within the bot
  *
- * $Id: channels.c,v 1.77 2003/01/28 06:37:25 wcc Exp $
+ * $Id: channels.c,v 1.78 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -28,40 +28,24 @@
 #include <sys/stat.h>
 #include "src/mod/module.h"
 
-static Function *global		= NULL;
+static Function *global = NULL;
+
+static char chanfile[121], glob_chanmode[64];
 
-static int  setstatic;
-static int  use_info;
-static char chanfile[121];
-static int  chan_hack;
-static int  quiet_save;
-static char glob_chanmode[64];		/* Default chanmode (drummer,990731) */
 static struct udef_struct *udef;
-static int global_stopnethack_mode;
-static int global_revenge_mode;
-static int global_idle_kick;		/* Default idle-kick setting. */
-static int global_aop_min;
-static int global_aop_max;
-static int global_ban_time;
-static int global_exempt_time;
-static int global_invite_time;
+
+static int setstatic, use_info, chan_hack, quiet_save, global_revenge_mode,
+           global_stopnethack_mode, global_idle_kick, global_aop_min,
+           global_aop_max, global_ban_time, global_exempt_time,
+           global_invite_time;
 
 /* Global channel settings (drummer/dw) */
 static char glob_chanset[512];
 
 /* Global flood settings */
-static int gfld_chan_thr;
-static int gfld_chan_time;
-static int gfld_deop_thr;
-static int gfld_deop_time;
-static int gfld_kick_thr;
-static int gfld_kick_time;
-static int gfld_join_thr;
-static int gfld_join_time;
-static int gfld_ctcp_thr;
-static int gfld_ctcp_time;
-static int gfld_nick_thr;
-static int gfld_nick_time;
+static int gfld_chan_thr, gfld_chan_time, gfld_deop_thr, gfld_deop_time,
+           gfld_kick_thr, gfld_kick_time, gfld_join_thr, gfld_join_time,
+           gfld_ctcp_thr, gfld_ctcp_time, gfld_nick_thr, gfld_nick_time;
 
 #include "channels.h"
 #include "cmdschan.c"
@@ -144,28 +128,29 @@
       i = CHANLIMIT;
       chan->limit_prot = 0;
       if (pos) {
-	s1 = newsplit(&set);
-	if (s1[0])
-	  chan->limit_prot = atoi(s1);
+        s1 = newsplit(&set);
+        if (s1[0])
+          chan->limit_prot = atoi(s1);
       }
       break;
     case 'k':
       i = CHANKEY;
       chan->key_prot[0] = 0;
       if (pos) {
-	s1 = newsplit(&set);
-	if (s1[0])
-	  strcpy(chan->key_prot, s1);
+        s1 = newsplit(&set);
+        if (s1[0])
+          strcpy(chan->key_prot, s1);
       }
       break;
     }
     if (i) {
       if (pos) {
-	chan->mode_pls_prot |= i;
-	chan->mode_mns_prot &= ~i;
-      } else {
-	chan->mode_pls_prot &= ~i;
-	chan->mode_mns_prot |= i;
+        chan->mode_pls_prot |= i;
+        chan->mode_mns_prot &= ~i;
+      }
+      else {
+        chan->mode_pls_prot &= ~i;
+        chan->mode_mns_prot |= i;
       }
     }
   }
@@ -184,23 +169,24 @@
     if (i == 0) {
       tst = chan->mode_pls_prot;
       if ((tst) || (chan->limit_prot != 0) || (chan->key_prot[0]))
-	*p++ = '+';
+        *p++ = '+';
       if (chan->limit_prot != 0) {
-	*p++ = 'l';
-	sprintf(&s1[strlen(s1)], "%d ", chan->limit_prot);
+        *p++ = 'l';
+        sprintf(&s1[strlen(s1)], "%d ", chan->limit_prot);
       }
       if (chan->key_prot[0]) {
-	*p++ = 'k';
-	sprintf(&s1[strlen(s1)], "%s ", chan->key_prot);
+        *p++ = 'k';
+        sprintf(&s1[strlen(s1)], "%s ", chan->key_prot);
       }
-    } else {
+    }
+    else {
       tst = chan->mode_mns_prot;
       if (tst)
-	*p++ = '-';
+        *p++ = '-';
       if (tst & CHANKEY)
-	*p++ = 'k';
+        *p++ = 'k';
       if (tst & CHANLIMIT)
-	*p++ = 'l';
+        *p++ = 'l';
     }
     if (tst & CHANINV)
       *p++ = 'i';
@@ -241,7 +227,7 @@
  */
 static int ismodeline(masklist *m, char *user)
 {
-  for (; m && m->mask[0]; m = m->next)  
+  for (; m && m->mask[0]; m = m->next)
     if (!rfc_casecmp(m->mask, user))
       return 1;
   return 0;
@@ -261,14 +247,14 @@
  */
 inline static int chanset_unlink(struct chanset_t *chan)
 {
-  struct chanset_t	*c, *c_old = NULL;
+  struct chanset_t *c, *c_old = NULL;
 
   for (c = chanset; c; c_old = c, c = c->next) {
     if (c == chan) {
       if (c_old)
-	c_old->next = c->next;
+        c_old->next = c->next;
       else
-	chanset = c->next;
+        chanset = c->next;
       return 1;
     }
   }
@@ -282,38 +268,38 @@
  */
 static void remove_channel(struct chanset_t *chan)
 {
-   int		 i;
-   module_entry	*me;
+  int i;
+  module_entry *me;
 
-   /* Remove the channel from the list, so that noone can pull it
-      away from under our feet during the check_tcl_part() call. */
-   (void) chanset_unlink(chan);
-
-   if ((me = module_find("irc", 1, 3)) != NULL)
-     (me->funcs[IRC_DO_CHANNEL_PART])(chan);
-
-   clear_channel(chan, 0);
-   noshare = 1;
-   /* Remove channel-bans */
-   while (chan->bans)
-     u_delban(chan, chan->bans->mask, 1);
-   /* Remove channel-exempts */
-   while (chan->exempts)
-     u_delexempt(chan, chan->exempts->mask, 1);
-   /* Remove channel-invites */
-   while (chan->invites)
-     u_delinvite(chan, chan->invites->mask, 1);
-   /* Remove channel specific user flags */
-   user_del_chan(chan->dname);
-   noshare = 0;
-   nfree(chan->channel.key);
-   for (i = 0; i < 6 && chan->cmode[i].op; i++)
-     nfree(chan->cmode[i].op);
-   if (chan->key)
-     nfree(chan->key);
-   if (chan->rmkey)
-     nfree(chan->rmkey);
-   nfree(chan);
+  /* Remove the channel from the list, so that noone can pull it
+   * away from under our feet during the check_tcl_part() call. */
+  (void) chanset_unlink(chan);
+
+  if ((me = module_find("irc", 1, 3)) != NULL)
+    (me->funcs[IRC_DO_CHANNEL_PART]) (chan);
+
+  clear_channel(chan, 0);
+  noshare = 1;
+  /* Remove channel-bans */
+  while (chan->bans)
+    u_delban(chan, chan->bans->mask, 1);
+  /* Remove channel-exempts */
+  while (chan->exempts)
+    u_delexempt(chan, chan->exempts->mask, 1);
+  /* Remove channel-invites */
+  while (chan->invites)
+    u_delinvite(chan, chan->invites->mask, 1);
+  /* Remove channel specific user flags */
+  user_del_chan(chan->dname);
+  noshare = 0;
+  nfree(chan->channel.key);
+  for (i = 0; i < 6 && chan->cmode[i].op; i++)
+    nfree(chan->cmode[i].op);
+  if (chan->key)
+    nfree(chan->key);
+  if (chan->rmkey)
+    nfree(chan->rmkey);
+  nfree(chan);
 }
 
 /* Bind this to chon and *if* the users console channel == ***
@@ -327,31 +313,31 @@
 
   if (dcc[idx].type == &DCC_CHAT) {
     if (!findchan_by_dname(dcc[idx].u.chat->con_chan) &&
-	((dcc[idx].u.chat->con_chan[0] != '*') ||
-	 (dcc[idx].u.chat->con_chan[1] != 0))) {
+        ((dcc[idx].u.chat->con_chan[0] != '*') ||
+         (dcc[idx].u.chat->con_chan[1] != 0))) {
       get_user_flagrec(dcc[idx].user, &fr, NULL);
       if (glob_op(fr))
-	found = 1;
+        found = 1;
       if (chan_owner(fr))
-	find = USER_OWNER;
+        find = USER_OWNER;
       else if (chan_master(fr))
-	find = USER_MASTER;
+        find = USER_MASTER;
       else
-	find = USER_OP;
+        find = USER_OP;
       fr.match = FR_CHAN;
       while (chan && !found) {
-	get_user_flagrec(dcc[idx].user, &fr, chan->dname);
-	if (fr.chan & find)
-	  found = 1;
-	else
-	  chan = chan->next;
+        get_user_flagrec(dcc[idx].user, &fr, chan->dname);
+        if (fr.chan & find)
+          found = 1;
+        else
+          chan = chan->next;
       }
       if (!chan)
-	chan = chanset;
+        chan = chanset;
       if (chan)
-	strcpy(dcc[idx].u.chat->con_chan, chan->dname);
+        strcpy(dcc[idx].u.chat->con_chan, chan->dname);
       else
-	strcpy(dcc[idx].u.chat->con_chan, "*");
+        strcpy(dcc[idx].u.chat->con_chan, "*");
     }
   }
   return 0;
@@ -394,7 +380,7 @@
   if (!quiet_save)
     putlog(LOG_MISC, "*", "Writing channel file...");
   fprintf(f, "#Dynamic Channel File for %s (%s) -- written %s\n",
-	  botnetnick, ver, ctime(&now));
+          botnetnick, ver, ctime(&now));
   for (chan = chanset; chan; chan = chan->next) {
     convert_element(chan->dname, name);
     get_mode_protect(chan, w);
@@ -404,70 +390,64 @@
     convert_element(chan->need_key, need3);
     convert_element(chan->need_unban, need4);
     convert_element(chan->need_limit, need5);
-    fprintf(f, "channel %s %s%schanmode %s idle-kick %d stopnethack-mode %d \
-revenge-mode %d \
-need-op %s need-invite %s need-key %s need-unban %s need-limit %s \
-flood-chan %d:%d flood-ctcp %d:%d flood-join %d:%d \
-flood-kick %d:%d flood-deop %d:%d flood-nick %d:%d aop-delay %d:%d \
-ban-time %d exempt-time %d invite-time %d \
-%cenforcebans %cdynamicbans %cuserbans %cautoop %cautohalfop %cbitch \
-%cgreet %cprotectops %cprotecthalfops %cprotectfriends %cdontkickops \
-%cstatuslog %crevenge %crevengebot %cautovoice %csecret \
-%cshared %ccycle %cseen %cinactive %cdynamicexempts %cuserexempts \
-%cdynamicinvites %cuserinvites %cnodesynch ",
-	channel_static(chan) ? "set" : "add",
-	name,
-	channel_static(chan) ? " " : " { ",
-	w2,
-	chan->idle_kick, /* idle-kick 0 is same as dont-idle-kick (less code)*/
-	chan->stopnethack_mode,
-        chan->revenge_mode,
-	need1, need2, need3, need4, need5,
-	chan->flood_pub_thr, chan->flood_pub_time,
-        chan->flood_ctcp_thr, chan->flood_ctcp_time,
-        chan->flood_join_thr, chan->flood_join_time,
-        chan->flood_kick_thr, chan->flood_kick_time,
-        chan->flood_deop_thr, chan->flood_deop_time,
-	chan->flood_nick_thr, chan->flood_nick_time,
-	chan->aop_min, chan->aop_max,
-	chan->ban_time,
-	chan->exempt_time,
-	chan->invite_time,
-	PLSMNS(channel_enforcebans(chan)),
-	PLSMNS(channel_dynamicbans(chan)),
-	PLSMNS(!channel_nouserbans(chan)),
-	PLSMNS(channel_autoop(chan)),
-	PLSMNS(channel_autohalfop(chan)),
-	PLSMNS(channel_bitch(chan)),
-	PLSMNS(channel_greet(chan)),
-	PLSMNS(channel_protectops(chan)),
-	PLSMNS(channel_protecthalfops(chan)),
-	PLSMNS(channel_protectfriends(chan)),
-	PLSMNS(channel_dontkickops(chan)),
-	PLSMNS(channel_logstatus(chan)),
-	PLSMNS(channel_revenge(chan)),
-	PLSMNS(channel_revengebot(chan)),
-	PLSMNS(channel_autovoice(chan)),
-	PLSMNS(channel_secret(chan)),
-	PLSMNS(channel_shared(chan)),
-	PLSMNS(channel_cycle(chan)),
-	PLSMNS(channel_seen(chan)),
-	PLSMNS(channel_inactive(chan)),
-	PLSMNS(channel_dynamicexempts(chan)),
-	PLSMNS(!channel_nouserexempts(chan)),
- 	PLSMNS(channel_dynamicinvites(chan)),
-	PLSMNS(!channel_nouserinvites(chan)),
-	PLSMNS(channel_nodesynch(chan)));
+    fprintf(f,
+            "channel %s %s%schanmode %s idle-kick %d stopnethack-mode %d \
+            revenge-mode %d need-op %s need-invite %s need-key %s \
+            need-unban %s need-limit %s flood-chan %d:%d flood-ctcp %d:%d \
+            flood-join %d:%d flood-kick %d:%d flood-deop %d:%d \
+            flood-nick %d:%d aop-delay %d:%d ban-time %d exempt-time %d \
+            invite-time %d %cenforcebans %cdynamicbans %cuserbans %cautoop \
+            %cautohalfop %cbitch %cgreet %cprotectops %cprotecthalfops \
+            %cprotectfriends %cdontkickops %cstatuslog %crevenge %crevengebot \
+            %cautovoice %csecret %cshared %ccycle %cseen %cinactive \
+            %cdynamicexempts %cuserexempts %cdynamicinvites \
+            %cuserinvites %cnodesynch ",
+            channel_static(chan) ? "set" : "add", name, channel_static(chan) ?
+            " " : " { ", w2, chan->idle_kick, chan->stopnethack_mode,
+            chan->revenge_mode, need1, need2, need3, need4, need5,
+            chan->flood_pub_thr, chan->flood_pub_time,
+            chan->flood_ctcp_thr, chan->flood_ctcp_time,
+            chan->flood_join_thr, chan->flood_join_time,
+            chan->flood_kick_thr, chan->flood_kick_time,
+            chan->flood_deop_thr, chan->flood_deop_time,
+            chan->flood_nick_thr, chan->flood_nick_time,
+            chan->aop_min, chan->aop_max, chan->ban_time,
+            chan->exempt_time, chan->invite_time,
+            PLSMNS(channel_enforcebans(chan)),
+            PLSMNS(channel_dynamicbans(chan)),
+            PLSMNS(!channel_nouserbans(chan)),
+            PLSMNS(channel_autoop(chan)),
+            PLSMNS(channel_autohalfop(chan)),
+            PLSMNS(channel_bitch(chan)),
+            PLSMNS(channel_greet(chan)),
+            PLSMNS(channel_protectops(chan)),
+            PLSMNS(channel_protecthalfops(chan)),
+            PLSMNS(channel_protectfriends(chan)),
+            PLSMNS(channel_dontkickops(chan)),
+            PLSMNS(channel_logstatus(chan)),
+            PLSMNS(channel_revenge(chan)),
+            PLSMNS(channel_revengebot(chan)),
+            PLSMNS(channel_autovoice(chan)),
+            PLSMNS(channel_secret(chan)),
+            PLSMNS(channel_shared(chan)),
+            PLSMNS(channel_cycle(chan)),
+            PLSMNS(channel_seen(chan)),
+            PLSMNS(channel_inactive(chan)),
+            PLSMNS(channel_dynamicexempts(chan)),
+            PLSMNS(!channel_nouserexempts(chan)),
+            PLSMNS(channel_dynamicinvites(chan)),
+            PLSMNS(!channel_nouserinvites(chan)),
+            PLSMNS(channel_nodesynch(chan)));
     for (ul = udef; ul; ul = ul->next) {
       if (ul->defined && ul->name) {
-	if (ul->type == UDEF_FLAG)
-	  fprintf(f, "%c%s%s ", getudef(ul->values, chan->dname) ? '+' : '-',
-		  "udef-flag-", ul->name);
-	else if (ul->type == UDEF_INT)
-	  fprintf(f, "%s%s %d ", "udef-int-", ul->name, getudef(ul->values,
-		  chan->dname));
-	else
-	  debug1("UDEF-ERROR: unknown type %d", ul->type);
+        if (ul->type == UDEF_FLAG)
+          fprintf(f, "%c%s%s ", getudef(ul->values, chan->dname) ? '+' : '-',
+                  "udef-flag-", ul->name);
+        else if (ul->type == UDEF_INT)
+          fprintf(f, "%s%s %d ", "udef-int-", ul->name, getudef(ul->values,
+                  chan->dname));
+        else
+          debug1("UDEF-ERROR: unknown type %d", ul->type);
       }
     }
     fprintf(f, "%s\n", channel_static(chan) ? "" : "}");
@@ -500,7 +480,7 @@
     f = fopen(chanfile, "w");
     if (!f)
       putlog(LOG_MISC, "*", "Couldn't create channel file: %s.  Dropping",
-	     chanfile);
+             chanfile);
     else
       fclose(f);
   }
@@ -552,15 +532,15 @@
       putlog(LOG_MISC, "*", "No longer supporting channel %s", chan->dname);
       remove_channel(chan);
       chan = chanset;
-    } else
+    }
+    else
       chan = chan->next;
   }
 }
 
-static cmd_t my_chon[] =
-{
-  {"*",		"",	(Function) channels_chon,	"channels:chon"},
-  {NULL,	NULL,	NULL,				NULL}
+static cmd_t my_chon[] = {
+  {"*",  "",   (Function) channels_chon, "channels:chon"},
+  {NULL, NULL, NULL,                                NULL}
 };
 
 static void channels_report(int idx, int details)
@@ -576,116 +556,117 @@
     if ((idx == DP_STDOUT) || glob_master(fr) || chan_master(fr)) {
       s[0] = 0;
       if (channel_greet(chan))
-	strcat(s, "greet, ");
+        strcat(s, "greet, ");
       if (channel_autoop(chan))
-	strcat(s, "auto-op, ");
+        strcat(s, "auto-op, ");
       if (channel_bitch(chan))
-	strcat(s, "bitch, ");
+        strcat(s, "bitch, ");
       if (s[0])
-	s[strlen(s) - 2] = 0;
+        s[strlen(s) - 2] = 0;
       if (!s[0])
-	strcpy(s, MISC_LURKING);
+        strcpy(s, MISC_LURKING);
       get_mode_protect(chan, s2);
       if (!channel_inactive(chan)) {
-	if (channel_active(chan)) {
-	  /* If it's a !chan, we want to display it's unique name too <cybah> */
-	  if (chan->dname[0]=='!') {
-	    dprintf(idx, "    %-10s: %2d member%s enforcing \"%s\" (%s), "
-	            "unique name %s\n", chan->dname, chan->channel.members,
-	            (chan->channel.members==1) ? "," : "s,", s2, s, chan->name);
-	  } else {
-	    dprintf(idx, "    %-10s: %2d member%s enforcing \"%s\" (%s)\n",
-	            chan->dname, chan->channel.members,
-	            chan->channel.members == 1 ? "," : "s,", s2, s);
-	  }
-	} else {
-	  dprintf(idx, "    %-10s: (%s), enforcing \"%s\"  (%s)\n", chan->dname,
-		  channel_pending(chan) ? "pending" : "not on channel", s2, s);
-	}
-      } else {
-	dprintf(idx, "    %-10s: channel is set +inactive\n",
-		chan->dname);
+        if (channel_active(chan)) {
+          /* If it's a !chan, we want to display it's unique name too <cybah> */
+          if (chan->dname[0] == '!') {
+            dprintf(idx, "    %-10s: %2d member%s enforcing \"%s\" (%s), "
+                    "unique name %s\n", chan->dname, chan->channel.members,
+                    (chan->channel.members == 1) ? "," : "s,", s2, s,
+                    chan->name);
+          }
+          else {
+            dprintf(idx, "    %-10s: %2d member%s enforcing \"%s\" (%s)\n",
+                    chan->dname, chan->channel.members,
+                    chan->channel.members == 1 ? "," : "s,", s2, s);
+          }
+        }
+        else {
+          dprintf(idx, "    %-10s: (%s), enforcing \"%s\"  (%s)\n", chan->dname,
+                  channel_pending(chan) ? "pending" : "not on channel", s2, s);
+        }
+      }
+      else {
+        dprintf(idx, "    %-10s: channel is set +inactive\n", chan->dname);
       }
       if (details) {
-	s[0] = 0;
-	i = 0;
-	if (channel_enforcebans(chan))
-	  i += my_strcpy(s + i, "enforcebans ");
-	if (channel_dynamicbans(chan))
-	  i += my_strcpy(s + i, "dynamicbans ");
-	if (!channel_nouserbans(chan))
-	  i += my_strcpy(s + i, "userbans ");
-	if (channel_autoop(chan))
-	  i += my_strcpy(s + i, "autoop ");
-	if (channel_bitch(chan))
-	  i += my_strcpy(s + i, "bitch ");
-	if (channel_greet(chan))
-	  i += my_strcpy(s + i, "greet ");
-	if (channel_protectops(chan))
-	  i += my_strcpy(s + i, "protectops ");
-	if (channel_protecthalfops(chan))
-	  i += my_strcpy(s + i, "protecthalfops ");
-	if (channel_protectfriends(chan))
-	  i += my_strcpy(s + i, "protectfriends ");
-	if (channel_dontkickops(chan))
-	  i += my_strcpy(s + i, "dontkickops ");
-	if (channel_logstatus(chan))
-	  i += my_strcpy(s + i, "statuslog ");
-	if (channel_revenge(chan))
-	  i += my_strcpy(s + i, "revenge ");
-	if (channel_revenge(chan))
-	  i += my_strcpy(s + i, "revengebot ");
-	if (channel_secret(chan))
-	  i += my_strcpy(s + i, "secret ");
-	if (channel_shared(chan))
-	  i += my_strcpy(s + i, "shared ");
-	if (!channel_static(chan))
-	  i += my_strcpy(s + i, "dynamic ");
-	if (channel_autovoice(chan))
-	  i += my_strcpy(s + i, "autovoice ");
-	if (channel_autohalfop(chan))
-	  i += my_strcpy(s + i, "autohalfop ");
-	if (channel_cycle(chan))
-	  i += my_strcpy(s + i, "cycle ");
-	if (channel_seen(chan))
-	  i += my_strcpy(s + i, "seen ");
-	if (channel_dynamicexempts(chan))
-	  i += my_strcpy(s + i, "dynamicexempts ");
-	if (!channel_nouserexempts(chan))
-	  i += my_strcpy(s + i, "userexempts ");
-	if (channel_dynamicinvites(chan))
-	  i += my_strcpy(s + i, "dynamicinvites ");
-	if (!channel_nouserinvites(chan))
-	  i += my_strcpy(s + i, "userinvites ");
-	if (channel_inactive(chan))
-	  i += my_strcpy(s + i, "inactive ");
-	if (channel_nodesynch(chan))
-	  i += my_strcpy(s + i, "nodesynch ");
-	dprintf(idx, "      Options: %s\n", s);
-	if (chan->need_op[0])
-	  dprintf(idx, "      To get ops I do: %s\n", chan->need_op);
-	if (chan->need_invite[0])
-	  dprintf(idx, "      To get invited I do: %s\n", chan->need_invite);
-	if (chan->need_limit[0])
-	  dprintf(idx, "      To get the channel limit up'd I do: %s\n",
-		  chan->need_limit);
-	if (chan->need_unban[0])
-	  dprintf(idx, "      To get unbanned I do: %s\n", chan->need_unban);
-	if (chan->need_key[0])
-	  dprintf(idx, "      To get the channel key I do: %s\n",
-		  chan->need_key);
-	if (chan->idle_kick)
-	  dprintf(idx, "      Kicking idle users after %d min\n",
-		  chan->idle_kick);
-	if (chan->stopnethack_mode)
-	  dprintf(idx, "      stopnethack-mode %d\n",
-		  chan->stopnethack_mode);
+        s[0] = 0;
+        i = 0;
+        if (channel_enforcebans(chan))
+          i += my_strcpy(s + i, "enforcebans ");
+        if (channel_dynamicbans(chan))
+          i += my_strcpy(s + i, "dynamicbans ");
+        if (!channel_nouserbans(chan))
+          i += my_strcpy(s + i, "userbans ");
+        if (channel_autoop(chan))
+          i += my_strcpy(s + i, "autoop ");
+        if (channel_bitch(chan))
+          i += my_strcpy(s + i, "bitch ");
+        if (channel_greet(chan))
+          i += my_strcpy(s + i, "greet ");
+        if (channel_protectops(chan))
+          i += my_strcpy(s + i, "protectops ");
+        if (channel_protecthalfops(chan))
+          i += my_strcpy(s + i, "protecthalfops ");
+        if (channel_protectfriends(chan))
+          i += my_strcpy(s + i, "protectfriends ");
+        if (channel_dontkickops(chan))
+          i += my_strcpy(s + i, "dontkickops ");
+        if (channel_logstatus(chan))
+          i += my_strcpy(s + i, "statuslog ");
+        if (channel_revenge(chan))
+          i += my_strcpy(s + i, "revenge ");
+        if (channel_revenge(chan))
+          i += my_strcpy(s + i, "revengebot ");
+        if (channel_secret(chan))
+          i += my_strcpy(s + i, "secret ");
+        if (channel_shared(chan))
+          i += my_strcpy(s + i, "shared ");
+        if (!channel_static(chan))
+          i += my_strcpy(s + i, "dynamic ");
+        if (channel_autovoice(chan))
+          i += my_strcpy(s + i, "autovoice ");
+        if (channel_autohalfop(chan))
+          i += my_strcpy(s + i, "autohalfop ");
+        if (channel_cycle(chan))
+          i += my_strcpy(s + i, "cycle ");
+        if (channel_seen(chan))
+          i += my_strcpy(s + i, "seen ");
+        if (channel_dynamicexempts(chan))
+          i += my_strcpy(s + i, "dynamicexempts ");
+        if (!channel_nouserexempts(chan))
+          i += my_strcpy(s + i, "userexempts ");
+        if (channel_dynamicinvites(chan))
+          i += my_strcpy(s + i, "dynamicinvites ");
+        if (!channel_nouserinvites(chan))
+          i += my_strcpy(s + i, "userinvites ");
+        if (channel_inactive(chan))
+          i += my_strcpy(s + i, "inactive ");
+        if (channel_nodesynch(chan))
+          i += my_strcpy(s + i, "nodesynch ");
+        dprintf(idx, "      Options: %s\n", s);
+        if (chan->need_op[0])
+          dprintf(idx, "      To get ops I do: %s\n", chan->need_op);
+        if (chan->need_invite[0])
+          dprintf(idx, "      To get invited I do: %s\n", chan->need_invite);
+        if (chan->need_limit[0])
+          dprintf(idx, "      To get the channel limit up'd I do: %s\n",
+                  chan->need_limit);
+        if (chan->need_unban[0])
+          dprintf(idx, "      To get unbanned I do: %s\n", chan->need_unban);
+        if (chan->need_key[0])
+          dprintf(idx, "      To get the channel key I do: %s\n",
+                  chan->need_key);
+        if (chan->idle_kick)
+          dprintf(idx, "      Kicking idle users after %d min\n",
+                  chan->idle_kick);
+        if (chan->stopnethack_mode)
+          dprintf(idx, "      stopnethack-mode %d\n", chan->stopnethack_mode);
         if (chan->revenge_mode)
-          dprintf(idx, "      revenge-mode %d\n",
-                  chan->revenge_mode);
-	dprintf(idx, "    Bans last %d mins.\n", chan->ban_time);
-	dprintf(idx, "    Exemptions last %d mins.\n", chan->exempt_time);
-	dprintf(idx, "    Invitations last %d mins.\n", chan->invite_time);
+          dprintf(idx, "      revenge-mode %d\n", chan->revenge_mode);
+        dprintf(idx, "    Bans last %d mins.\n", chan->ban_time);
+        dprintf(idx, "    Exemptions last %d mins.\n", chan->exempt_time);
+        dprintf(idx, "    Invitations last %d mins.\n", chan->invite_time);
       }
     }
   }
@@ -698,9 +679,9 @@
   for (; m; m = m->next) {
     result += sizeof(masklist);
     if (m->mask)
-        result += strlen(m->mask) + 1;
+      result += strlen(m->mask) + 1;
     if (m->who)
-        result += strlen(m->who) + 1;
+      result += strlen(m->who) + 1;
   }
   return result;
 }
@@ -735,16 +716,16 @@
 
 #if (((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)) || (TCL_MAJOR_VERSION > 8))
 static char *traced_globchanset(ClientData cdata, Tcl_Interp *irp,
-				CONST char *name1, CONST char *name2,
-                                int flags)
+                                CONST char *name1, CONST char *name2, int flags)
 #else
-static char *traced_globchanset(ClientData cdata, Tcl_Interp *irp, 
+static char *traced_globchanset(ClientData cdata, Tcl_Interp *irp,
                                 char *name1, char *name2, int flags)
 #endif
 {
   char *t, *s;
   int i;
   int items;
+
 #if (((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)) || (TCL_MAJOR_VERSION > 8))
   CONST char **item, *s2;
 #else
@@ -755,68 +736,67 @@
     Tcl_SetVar2(interp, name1, name2, glob_chanset, TCL_GLOBAL_ONLY);
     if (flags & TCL_TRACE_UNSETS)
       Tcl_TraceVar(interp, "global-chanset",
-	    TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-	    traced_globchanset, NULL);
-  } else { /* Write */
+                   TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
+                   traced_globchanset, NULL);
+  }
+  else {                        /* Write */
     s2 = Tcl_GetVar2(interp, name1, name2, TCL_GLOBAL_ONLY);
     Tcl_SplitList(interp, s2, &items, &item);
-    for (i = 0; i<items; i++) {
-      if (!(item[i]) || (strlen(item[i]) < 2)) continue;
+    for (i = 0; i < items; i++) {
+      if (!(item[i]) || (strlen(item[i]) < 2))
+        continue;
       s = glob_chanset;
       while (s[0]) {
-	t = strchr(s, ' '); /* Can't be NULL coz of the extra space */
-	t[0] = 0;
-	if (!strcmp(s + 1, item[i] + 1)) {
-	  s[0] = item[i][0]; /* +- */
-	  t[0] = ' ';
-	  break;
-	}
-	t[0] = ' ';
-	s = t + 1;
+        t = strchr(s, ' ');     /* Can't be NULL coz of the extra space */
+        t[0] = 0;
+        if (!strcmp(s + 1, item[i] + 1)) {
+          s[0] = item[i][0];    /* +- */
+          t[0] = ' ';
+          break;
+        }
+        t[0] = ' ';
+        s = t + 1;
       }
     }
-    if (item) /* hmm it cant be 0 */
+    if (item)                   /* hmm it cant be 0 */
       Tcl_Free((char *) item);
     Tcl_SetVar2(interp, name1, name2, glob_chanset, TCL_GLOBAL_ONLY);
   }
   return NULL;
 }
 
-static tcl_ints my_tcl_ints[] =
-{
-  {"share-greet",		NULL,				0},
-  {"use-info",			&use_info,			0},
-  {"quiet-save",		&quiet_save,			0},
-  {"global-stopnethack-mode",	&global_stopnethack_mode,	0},
-  {"global-revenge-mode",       &global_revenge_mode,           0},
-  {"global-idle-kick",		&global_idle_kick,		0},
-  {"global-ban-time",		&global_ban_time,		0},
-  {"global-exempt-time",	&global_exempt_time,		0},
-  {"global-invite-time",	&global_invite_time,		0},
+static tcl_ints my_tcl_ints[] = {
+  {"share-greet",             NULL,                     0},
+  {"use-info",                &use_info,                0},
+  {"quiet-save",              &quiet_save,              0},
+  {"global-stopnethack-mode", &global_stopnethack_mode, 0},
+  {"global-revenge-mode",     &global_revenge_mode,     0},
+  {"global-idle-kick",        &global_idle_kick,        0},
+  {"global-ban-time",         &global_ban_time,         0},
+  {"global-exempt-time",      &global_exempt_time,      0},
+  {"global-invite-time",      &global_invite_time,      0},
   /* keeping [ban|exempt|invite]-time for compatability <Wcc[07/20/02]> */
-  {"ban-time",			&global_ban_time,		0},
-  {"exempt-time",		&global_exempt_time,		0},
-  {"invite-time",		&global_invite_time,		0},
-  {NULL,			NULL,				0}
+  {"ban-time",                &global_ban_time,         0},
+  {"exempt-time",             &global_exempt_time,      0},
+  {"invite-time",             &global_invite_time,      0},
+  {NULL,                      NULL,                     0}
 };
 
-static tcl_coups mychan_tcl_coups[] =
-{
-  {"global-flood-chan",		&gfld_chan_thr,		&gfld_chan_time},
-  {"global-flood-deop",		&gfld_deop_thr,		&gfld_deop_time},
-  {"global-flood-kick",		&gfld_kick_thr,		&gfld_kick_time},
-  {"global-flood-join",		&gfld_join_thr,		&gfld_join_time},
-  {"global-flood-ctcp",		&gfld_ctcp_thr,		&gfld_ctcp_time},
-  {"global-flood-nick",		&gfld_nick_thr, 	&gfld_nick_time},
-  {"global-aop-delay",		&global_aop_min,	&global_aop_max},
-  {NULL,			NULL,			NULL}
+static tcl_coups mychan_tcl_coups[] = {
+  {"global-flood-chan", &gfld_chan_thr,  &gfld_chan_time},
+  {"global-flood-deop", &gfld_deop_thr,  &gfld_deop_time},
+  {"global-flood-kick", &gfld_kick_thr,  &gfld_kick_time},
+  {"global-flood-join", &gfld_join_thr,  &gfld_join_time},
+  {"global-flood-ctcp", &gfld_ctcp_thr,  &gfld_ctcp_time},
+  {"global-flood-nick", &gfld_nick_thr,  &gfld_nick_time},
+  {"global-aop-delay",  &global_aop_min, &global_aop_max},
+  {NULL,                NULL,                       NULL}
 };
 
-static tcl_strings my_tcl_strings[] =
-{
-  {"chanfile",		chanfile,	120,	STR_PROTECT},
-  {"global-chanmode",	glob_chanmode,	64,	0},
-  {NULL,		NULL,		0,	0}
+static tcl_strings my_tcl_strings[] = {
+  {"chanfile",        chanfile,      120, STR_PROTECT},
+  {"global-chanmode", glob_chanmode, 64,            0},
+  {NULL,              NULL,          0,             0}
 };
 
 static char *channels_close()
@@ -837,8 +817,8 @@
   del_hook(HOOK_MINUTELY, (Function) check_expired_exempts);
   del_hook(HOOK_MINUTELY, (Function) check_expired_invites);
   Tcl_UntraceVar(interp, "global-chanset",
-		 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-		 traced_globchanset, NULL);
+                 TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
+                 traced_globchanset, NULL);
   rem_help_reference("channels.help");
   rem_help_reference("chaninfo.help");
   module_undepend(MODULE_NAME);
@@ -847,8 +827,7 @@
 
 EXPORT_SCOPE char *channels_start();
 
-static Function channels_table[] =
-{
+static Function channels_table[] = {
   /* 0 - 3 */
   (Function) channels_start,
   (Function) channels_close,
@@ -871,28 +850,28 @@
   (Function) clear_channel,
   /* 16 - 19 */
   (Function) set_handle_laston,
-  (Function) NULL, /* [17] used to be ban_time <Wcc[07/19/02]> */
+  (Function) NULL,           /* [17] used to be ban_time <Wcc[07/19/02]>    */
   (Function) & use_info,
   (Function) get_handle_chaninfo,
   /* 20 - 23 */
   (Function) u_sticky_mask,
   (Function) ismasked,
   (Function) add_chanrec_by_handle,
-  (Function) NULL, /* [23] used to be isexempted() <cybah> */
+  (Function) NULL,           /* [23] used to be isexempted() <cybah>         */
   /* 24 - 27 */
-  (Function) NULL, /* [24] used to be exempt_time <Wcc[07/19/02]> */
-  (Function) NULL, /* [25] used to be isinvited() <cybah> */
-  (Function) NULL, /* [26] used to be ban_time <Wcc[07/19/02]> */
+  (Function) NULL,           /* [24] used to be exempt_time <Wcc[07/19/02]>  */
+  (Function) NULL,           /* [25] used to be isinvited() <cybah>          */
+  (Function) NULL,           /* [26] used to be ban_time <Wcc[07/19/02]>     */
   (Function) NULL,
   /* 28 - 31 */
-  (Function) NULL, /* [28] used to be u_setsticky_exempt() <cybah> */
+  (Function) NULL,           /* [28] used to be u_setsticky_exempt() <cybah> */
   (Function) u_delexempt,
   (Function) u_addexempt,
   (Function) NULL,
   /* 32 - 35 */
-  (Function) NULL,/* [32] used to be u_sticky_exempt() <cybah> */
+  (Function) NULL,           /* [32] used to be u_sticky_exempt() <cybah>    */
   (Function) NULL,
-  (Function) NULL,	/* [34] used to be killchanset().	*/
+  (Function) NULL,           /* [34] used to be killchanset().               */
   (Function) u_delinvite,
   /* 36 - 39 */
   (Function) u_addinvite,
@@ -944,30 +923,30 @@
   global_invite_time = 60;
   strcpy(glob_chanset,
          "-enforcebans "
-	 "+dynamicbans "
-	 "+userbans "
-	 "-autoop "
-	 "-bitch "
-	 "+greet "
-	 "+protectops "
-	 "+statuslog "
-	 "-revenge "
-	 "-secret "
-	 "-autovoice "
-	 "+cycle "
-	 "+dontkickops "
-	 "-inactive "
-	 "-protectfriends "
-	 "+shared "
-	 "-seen "
-	 "+userexempts "
-	 "+dynamicexempts "
-	 "+userinvites "
-	 "+dynamicinvites "
-	 "-revengebot "
-	 "-protecthalfops "
-	 "-autohalfop "
-	 "-nodesynch ");
+         "+dynamicbans "
+         "+userbans "
+         "-autoop "
+         "-bitch "
+         "+greet "
+         "+protectops "
+         "+statuslog "
+         "-revenge "
+         "-secret "
+         "-autovoice "
+         "+cycle "
+         "+dontkickops "
+         "-inactive "
+         "-protectfriends "
+         "+shared "
+         "-seen "
+         "+userexempts "
+         "+dynamicexempts "
+         "+userinvites "
+         "+dynamicinvites "
+         "-revengebot "
+         "-protecthalfops "
+         "-autohalfop "
+         "-nodesynch ");
   module_register(MODULE_NAME, channels_table, 1, 0);
   if (!module_depend(MODULE_NAME, "eggdrop", 106, 7)) {
     module_undepend(MODULE_NAME);
@@ -981,8 +960,8 @@
   add_hook(HOOK_REHASH, (Function) channels_rehash);
   add_hook(HOOK_PRE_REHASH, (Function) channels_prerehash);
   Tcl_TraceVar(interp, "global-chanset",
-	       TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
-	       traced_globchanset, NULL);
+               TCL_TRACE_READS | TCL_TRACE_WRITES | TCL_TRACE_UNSETS,
+               traced_globchanset, NULL);
   add_builtins(H_chon, my_chon);
   add_builtins(H_dcc, C_dcc_irc);
   add_tcl_commands(channels_cmds);
Index: eggdrop1.6/src/mod/channels.mod/channels.h
diff -u eggdrop1.6/src/mod/channels.mod/channels.h:1.22 eggdrop1.6/src/mod/channels.mod/channels.h:1.23
--- eggdrop1.6/src/mod/channels.mod/channels.h:1.22	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/channels.mod/channels.h	Tue Jan 28 23:48:41 2003
@@ -1,7 +1,7 @@
 /*
  * channels.h -- part of channels.mod
  *
- * $Id: channels.h,v 1.22 2003/01/28 06:37:25 wcc Exp $
+ * $Id: channels.h,v 1.23 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -29,9 +29,8 @@
 #define UDEF_FLAG 1
 #define UDEF_INT 2
 
-#define MASKREASON_MAX	307	/* Max length of ban/invite/exempt/etc.
-				   reasons.				*/
-#define MASKREASON_LEN	(MASKREASON_MAX + 1)
+#define MASKREASON_MAX 307    /* Max length of ban/invite/exempt/etc reasons. */
+#define MASKREASON_LEN (MASKREASON_MAX + 1)
 
 
 #ifdef MAKING_CHANNELS
@@ -40,22 +39,22 @@
  * structure for each channel where they have a defined value.
  */
 struct udef_chans {
-  struct udef_chans *next;	/* Ptr to next value.			*/
-  char *chan;			/* Dname of channel name.		*/
-  int value;			/* Actual value.			*/
+  struct udef_chans *next;     /* Ptr to next value.                   */
+  char *chan;                  /* Dname of channel name.               */
+  int value;                   /* Actual value.                        */
 };
 
 /* Structure for user defined channel settings.
  */
 struct udef_struct {
-  struct udef_struct *next;	/* Ptr to next setting.			*/
-  char *name;			/* Name of setting.			*/
-  int defined;			/* Boolean that specifies whether this
-				   flag was defined by, e.g. a Tcl
-				   script yet.				*/
-  int type;			/* Type of setting: UDEF_FLAG, UDEF_INT	*/
-  struct udef_chans *values;	/* Ptr to linked list of udef channel
-				   structures.				*/
+  struct udef_struct *next;    /* Ptr to next setting.                 */
+  char *name;                  /* Name of setting.                     */
+  int defined;                 /* Boolean that specifies whether this
+                                * flag was defined by, e.g. a Tcl
+                                * script yet.                          */
+  int type;                    /* Type of setting: UDEF_FLAG, UDEF_INT */
+  struct udef_chans *values;   /* Ptr to linked list of udef channel
+                                * structures.                          */
 };
 
 static void del_chanrec(struct userrec *u, char *);
@@ -64,31 +63,31 @@
 static void add_chanrec_by_handle(struct userrec *bu, char *hand, char *chname);
 static void get_handle_chaninfo(char *handle, char *chname, char *s);
 static void set_handle_chaninfo(struct userrec *bu, char *handle,
-				char *chname, char *info);
+                                char *chname, char *info);
 static void set_handle_laston(char *chan, struct userrec *u, time_t n);
 static int u_sticky_mask(maskrec *u, char *uhost);
 static int u_setsticky_mask(struct chanset_t *chan, maskrec *m, char *uhost,
-			    int sticky, char *botcmd);
+                            int sticky, char *botcmd);
 
 static int u_equals_mask(maskrec *u, char *uhost);
 static int u_match_mask(struct maskrec *rec, char *mask);
-static int u_delexempt (struct chanset_t *c, char *who, int doit);
-static int u_addexempt (struct chanset_t *chan, char *exempt, char *from,
- 			char *note, time_t expire_time, int flags);
-static int u_delinvite (struct chanset_t *c, char *who, int doit);
-static int u_addinvite (struct chanset_t *chan, char *invite, char *from,
- 			char *note,  time_t expire_time, int flags);
+static int u_delexempt(struct chanset_t *c, char *who, int doit);
+static int u_addexempt(struct chanset_t *chan, char *exempt, char *from,
+                       char *note, time_t expire_time, int flags);
+static int u_delinvite(struct chanset_t *c, char *who, int doit);
+static int u_addinvite(struct chanset_t *chan, char *invite, char *from,
+                       char *note, time_t expire_time, int flags);
 static int u_delban(struct chanset_t *c, char *who, int doit);
 static int u_addban(struct chanset_t *chan, char *ban, char *from, char *note,
-		    time_t expire_time, int flags);
+                    time_t expire_time, int flags);
 static void tell_bans(int idx, int show_inact, char *match);
 static int write_bans(FILE *f, int idx);
 static void check_expired_bans(void);
-static void tell_exempts (int idx, int show_inact, char *match);
-static int write_exempts (FILE *f, int idx);
+static void tell_exempts(int idx, int show_inact, char *match);
+static int write_exempts(FILE *f, int idx);
 static void check_expired_exempts(void);
-static void tell_invites (int idx, int show_inact, char *match);
-static int write_invites (FILE *f, int idx);
+static void tell_invites(int idx, int show_inact, char *match);
+static int write_invites(FILE *f, int idx);
 static void check_expired_invites(void);
 static void write_channels(void);
 static void read_channels(int);
@@ -98,11 +97,11 @@
 static int ismasked(masklist *m, char *user);
 static int ismodeline(masklist *m, char *user);
 static int tcl_channel_modify(Tcl_Interp *irp, struct chanset_t *chan,
-			      int items, char **item);
+                              int items, char **item);
 static int tcl_channel_add(Tcl_Interp *irp, char *, char *);
 static char *convert_element(char *src, char *dst);
 static int expmem_udef(struct udef_struct *);
-static int expmem_udef_chans (struct udef_chans *);
+static int expmem_udef_chans(struct udef_chans *);
 static void free_udef(struct udef_struct *);
 static void free_udef_chans(struct udef_chans *);
 static int getudef(struct udef_chans *, char *);
@@ -153,7 +152,7 @@
 /* 32 - 35 */
 /* *HOLE* channels_funcs[32] used to be u_sticky_exempt() <cybah> */
 /* *HOLE* channels_funcs[33] used to be u_match_invite() <cybah> */
-/* *HOLE* channels_funcs[34] used to be killchanset().			*/
+/* *HOLE* channels_funcs[34] used to be killchanset(). */
 #define u_delinvite ((int (*)(struct chanset_t *, char *, int))channels_funcs[35])
 /* 36 - 39 */
 #define u_addinvite ((int (*)(struct chanset_t *, char *, char *, char *, time_t, int))channels_funcs[36])
@@ -173,7 +172,7 @@
 /* 48 - 51 */
 #define global_invite_time (*(int *)(channels_funcs[48]))
 
-#endif				/* MAKING_CHANNELS */
+#endif /* MAKING_CHANNELS */
 
 /* Macro's here because their functions were replaced by something more
  * generic. <cybah>
@@ -190,4 +189,4 @@
 #define u_setsticky_exempt(chan, host, sticky)  u_setsticky_mask(chan, ((struct chanset_t *)chan) ? ((struct chanset_t *)chan)->exempts : global_exempts, host, sticky, "se")
 #define u_setsticky_invite(chan, host, sticky)  u_setsticky_mask(chan, ((struct chanset_t *)chan) ? ((struct chanset_t *)chan)->invites : global_invites, host, sticky, "sInv")
 
-#endif				/* _EGG_MOD_CHANNELS_CHANNELS_H */
+#endif /* _EGG_MOD_CHANNELS_CHANNELS_H */
Index: eggdrop1.6/src/mod/channels.mod/cmdschan.c
diff -u eggdrop1.6/src/mod/channels.mod/cmdschan.c:1.59 eggdrop1.6/src/mod/channels.mod/cmdschan.c:1.60
--- eggdrop1.6/src/mod/channels.mod/cmdschan.c:1.59	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/channels.mod/cmdschan.c	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * cmdschan.c -- part of channels.mod
  *   commands from a user via dcc that cause server interaction
  *
- * $Id: cmdschan.c,v 1.59 2003/01/28 06:37:25 wcc Exp $
+ * $Id: cmdschan.c,v 1.60 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -25,7 +25,7 @@
 
 #include <ctype.h>
 
-static struct flag_record user	 = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 };
+static struct flag_record user = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 };
 static struct flag_record victim = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 };
 
 
@@ -39,7 +39,8 @@
 
   if (!par[0]) {
     dprintf(idx, "Usage: +ban <hostmask> [channel] [%%<XdXhXm>] [reason]\n");
-  } else {
+  }
+  else {
     who = newsplit(&par);
     if (par[0] && strchr(CHANMETA, par[0]))
       chname = newsplit(&par);
@@ -47,50 +48,52 @@
       chname = 0;
     if (chname || !(u->flags & USER_MASTER)) {
       if (!chname)
-	chname = dcc[idx].u.chat->con_chan;
+        chname = dcc[idx].u.chat->con_chan;
       get_user_flagrec(u, &user, chname);
       chan = findchan_by_dname(chname);
       /* *shrug* ??? (guppy:10Feb1999) */
       if (!chan) {
         dprintf(idx, "That channel doesn't exist!\n");
         return;
-      } else if (!((glob_op(user) && !chan_deop(user)) || (glob_halfop(user) && 
-		 !chan_dehalfop(user)) || chan_op(user) || chan_halfop(user))) {
+      }
+      else if (!((glob_op(user) && !chan_deop(user)) || (glob_halfop(user) &&
+               !chan_dehalfop(user)) || chan_op(user) || chan_halfop(user))) {
         dprintf(idx, "You don't have access to set bans on %s.\n", chname);
         return;
       }
-    } else
+    }
+    else
       chan = 0;
     /* Added by Q and Solal -- Requested by Arty2, special thanx :) */
     if (par[0] == '%') {
       p = newsplit(&par);
       p_expire = p + 1;
       while (*(++p) != 0) {
-	switch (tolower(*p)) {
-	case 'd':
-	  *p = 0;
-	  expire_foo = strtol(p_expire, NULL, 10);
-	  if (expire_foo > 365)
-	    expire_foo = 365;
-	  expire_time += 86400 * expire_foo;
-	  p_expire = p + 1;
-	  break;
-	case 'h':
-	  *p = 0;
-	  expire_foo = strtol(p_expire, NULL, 10);
-	  if (expire_foo > 8760)
-	    expire_foo = 8760;
-	  expire_time += 3600 * expire_foo;
-	  p_expire = p + 1;
-	  break;
-	case 'm':
-	  *p = 0;
-	  expire_foo = strtol(p_expire, NULL, 10);
-	  if (expire_foo > 525600)
-	    expire_foo = 525600;
-	  expire_time += 60 * expire_foo;
-	  p_expire = p + 1;
-	}
+        switch (tolower(*p)) {
+        case 'd':
+          *p = 0;
+          expire_foo = strtol(p_expire, NULL, 10);
+          if (expire_foo > 365)
+            expire_foo = 365;
+          expire_time += 86400 * expire_foo;
+          p_expire = p + 1;
+          break;
+        case 'h':
+          *p = 0;
+          expire_foo = strtol(p_expire, NULL, 10);
+          if (expire_foo > 8760)
+            expire_foo = 8760;
+          expire_time += 3600 * expire_foo;
+          p_expire = p + 1;
+          break;
+        case 'm':
+          *p = 0;
+          expire_foo = strtol(p_expire, NULL, 10);
+          if (expire_foo > 525600)
+            expire_foo = 525600;
+          expire_time += 60 * expire_foo;
+          p_expire = p + 1;
+        }
       }
     }
     if (!par[0])
@@ -102,63 +105,68 @@
     /* Fix missing ! or @ BEFORE checking against myself */
     if (!strchr(who, '!')) {
       if (!strchr(who, '@'))
-	egg_snprintf(s, sizeof s, "%s!*@*", who);	/* Lame nick ban */
+        egg_snprintf(s, sizeof s, "%s!*@*", who);       /* Lame nick ban */
       else
-	egg_snprintf(s, sizeof s, "*!%s", who);
-    } else if (!strchr(who, '@'))
-      egg_snprintf(s, sizeof s, "%s@*", who);	/* brain-dead? */
+        egg_snprintf(s, sizeof s, "*!%s", who);
+    }
+    else if (!strchr(who, '@'))
+      egg_snprintf(s, sizeof s, "%s@*", who);   /* brain-dead? */
     else
       strncpyz(s, who, sizeof s);
     if ((me = module_find("server", 0, 0)) && me->funcs)
       egg_snprintf(s1, sizeof s1, "%s!%s", me->funcs[SERVER_BOTNAME],
-	            me->funcs[SERVER_BOTUSERHOST]);
+                   me->funcs[SERVER_BOTUSERHOST]);
     else
       egg_snprintf(s1, sizeof s1, "%s!%s@%s", origbotname, botuser, hostname);
     if (wild_match(s, s1)) {
       dprintf(idx, "I'm not going to ban myself.\n");
       putlog(LOG_CMDS, "*", "#%s# attempted +ban %s", dcc[idx].nick, s);
-    } else {
+    }
+    else {
       /* IRC can't understand bans longer than 70 characters */
       if (strlen(s) > 70) {
-	s[69] = '*';
-	s[70] = 0;
+        s[69] = '*';
+        s[70] = 0;
       }
       if (chan) {
-	u_addban(chan, s, dcc[idx].nick, par,
-		 expire_time ? now + expire_time : 0, 0);
-	if (par[0] == '*') {
-	  sticky = 1;
-	  par++;
-	  putlog(LOG_CMDS, "*", "#%s# (%s) +ban %s %s (%s) (sticky)",
-		 dcc[idx].nick, dcc[idx].u.chat->con_chan, s, chan->dname, par);
-	  dprintf(idx, "New %s sticky ban: %s (%s)\n", chan->dname, s, par);
-	} else {
-	  putlog(LOG_CMDS, "*", "#%s# (%s) +ban %s %s (%s)", dcc[idx].nick,
-		 dcc[idx].u.chat->con_chan, s, chan->dname, par);
-	  dprintf(idx, "New %s ban: %s (%s)\n", chan->dname, s, par);
-	}
-	/* Avoid unnesessary modes if you got +dynamicbans, and there is
-	 * no reason to set mode if irc.mod aint loaded. (dw 001120)
-	 */
-	if ((me = module_find("irc", 0, 0)))
-	  (me->funcs[IRC_CHECK_THIS_BAN])(chan, s, sticky);
-      } else {
-	u_addban(NULL, s, dcc[idx].nick, par,
-		 expire_time ? now + expire_time : 0, 0);
-	if (par[0] == '*') {
-	  sticky = 1;
-	  par++;
-	  putlog(LOG_CMDS, "*", "#%s# (GLOBAL) +ban %s (%s) (sticky)",
-		 dcc[idx].nick, s, par);
-	  dprintf(idx, "New sticky ban: %s (%s)\n", s, par);
-	} else {
-	  putlog(LOG_CMDS, "*", "#%s# (GLOBAL) +ban %s (%s)", dcc[idx].nick,
-		 s, par);
-	  dprintf(idx, "New ban: %s (%s)\n", s, par);
-	}
-	if ((me = module_find("irc", 0, 0)))
-	  for (chan = chanset; chan != NULL; chan = chan->next)
-	    (me->funcs[IRC_CHECK_THIS_BAN])(chan, s, sticky);
+        u_addban(chan, s, dcc[idx].nick, par,
+                 expire_time ? now + expire_time : 0, 0);
+        if (par[0] == '*') {
+          sticky = 1;
+          par++;
+          putlog(LOG_CMDS, "*", "#%s# (%s) +ban %s %s (%s) (sticky)",
+                 dcc[idx].nick, dcc[idx].u.chat->con_chan, s, chan->dname, par);
+          dprintf(idx, "New %s sticky ban: %s (%s)\n", chan->dname, s, par);
+        }
+        else {
+          putlog(LOG_CMDS, "*", "#%s# (%s) +ban %s %s (%s)", dcc[idx].nick,
+                 dcc[idx].u.chat->con_chan, s, chan->dname, par);
+          dprintf(idx, "New %s ban: %s (%s)\n", chan->dname, s, par);
+        }
+        /* Avoid unnesessary modes if you got +dynamicbans, and there is
+         * no reason to set mode if irc.mod aint loaded. (dw 001120)
+         */
+        if ((me = module_find("irc", 0, 0)))
+          (me->funcs[IRC_CHECK_THIS_BAN]) (chan, s, sticky);
+      }
+      else {
+        u_addban(NULL, s, dcc[idx].nick, par,
+                 expire_time ? now + expire_time : 0, 0);
+        if (par[0] == '*') {
+          sticky = 1;
+          par++;
+          putlog(LOG_CMDS, "*", "#%s# (GLOBAL) +ban %s (%s) (sticky)",
+                 dcc[idx].nick, s, par);
+          dprintf(idx, "New sticky ban: %s (%s)\n", s, par);
+        }
+        else {
+          putlog(LOG_CMDS, "*", "#%s# (GLOBAL) +ban %s (%s)", dcc[idx].nick,
+                 s, par);
+          dprintf(idx, "New ban: %s (%s)\n", s, par);
+        }
+        if ((me = module_find("irc", 0, 0)))
+          for (chan = chanset; chan != NULL; chan = chan->next)
+            (me->funcs[IRC_CHECK_THIS_BAN]) (chan, s, sticky);
       }
     }
   }
@@ -177,7 +185,8 @@
   }
   if (!par[0]) {
     dprintf(idx, "Usage: +exempt <hostmask> [channel] [%%<XdXhXm>] [reason]\n");
-  } else {
+  }
+  else {
     who = newsplit(&par);
     if (par[0] && strchr(CHANMETA, par[0]))
       chname = newsplit(&par);
@@ -185,50 +194,52 @@
       chname = 0;
     if (chname || !(u->flags & USER_MASTER)) {
       if (!chname)
-	chname = dcc[idx].u.chat->con_chan;
-      get_user_flagrec(u,&user,chname);
+        chname = dcc[idx].u.chat->con_chan;
+      get_user_flagrec(u, &user, chname);
       chan = findchan_by_dname(chname);
       /* *shrug* ??? (guppy:10Feb99) */
       if (!chan) {
         dprintf(idx, "That channel doesn't exist!\n");
-	return;
-      } else if (!((glob_op(user) && !chan_deop(user)) || (glob_halfop(user) &&
-		 !chan_dehalfop(user)) || chan_op(user) || chan_halfop(user))) {
+        return;
+      }
+      else if (!((glob_op(user) && !chan_deop(user)) || (glob_halfop(user) &&
+               !chan_dehalfop(user)) || chan_op(user) || chan_halfop(user))) {
         dprintf(idx, "You don't have access to set exempts on %s.\n", chname);
         return;
       }
-    } else
+    }
+    else
       chan = 0;
     /* Added by Q and Solal  - Requested by Arty2, special thanx :) */
     if (par[0] == '%') {
-      p = newsplit (&par);
+      p = newsplit(&par);
       p_expire = p + 1;
       while (*(++p) != 0) {
-	switch (tolower(*p)) {
-	case 'd':
-	  *p = 0;
-	  expire_foo = strtol (p_expire, NULL, 10);
-	  if (expire_foo > 365)
-	    expire_foo = 365;
-	  expire_time += 86400 * expire_foo;
-	  p_expire = p + 1;
-	  break;
-	case 'h':
-	  *p = 0;
-	  expire_foo = strtol (p_expire, NULL, 10);
-	  if (expire_foo > 8760)
-	    expire_foo = 8760;
-	  expire_time += 3600 * expire_foo;
-	  p_expire = p + 1;
-	  break;
-	case 'm':
-	  *p = 0;
-	  expire_foo = strtol (p_expire, NULL, 10);
-	  if (expire_foo > 525600)
-	    expire_foo = 525600;
-	  expire_time += 60 * expire_foo;
-	  p_expire = p + 1;
-	}
+        switch (tolower(*p)) {
+        case 'd':
+          *p = 0;
+          expire_foo = strtol(p_expire, NULL, 10);
+          if (expire_foo > 365)
+            expire_foo = 365;
+          expire_time += 86400 * expire_foo;
+          p_expire = p + 1;
+          break;
+        case 'h':
+          *p = 0;
+          expire_foo = strtol(p_expire, NULL, 10);
+          if (expire_foo > 8760)
+            expire_foo = 8760;
+          expire_time += 3600 * expire_foo;
+          p_expire = p + 1;
+          break;
+        case 'm':
+          *p = 0;
+          expire_foo = strtol(p_expire, NULL, 10);
+          if (expire_foo > 525600)
+            expire_foo = 525600;
+          expire_time += 60 * expire_foo;
+          p_expire = p + 1;
+        }
       }
     }
     if (!par[0])
@@ -240,16 +251,17 @@
     /* Fix missing ! or @ BEFORE checking against myself */
     if (!strchr(who, '!')) {
       if (!strchr(who, '@'))
-	egg_snprintf(s, sizeof s, "%s!*@*", who);	/* Lame nick exempt */
+        egg_snprintf(s, sizeof s, "%s!*@*", who);       /* Lame nick exempt */
       else
-	egg_snprintf(s, sizeof s, "*!%s", who);
-    } else if (!strchr(who, '@'))
-      egg_snprintf(s, sizeof s, "%s@*", who);		/* brain-dead? */
+        egg_snprintf(s, sizeof s, "*!%s", who);
+    }
+    else if (!strchr(who, '@'))
+      egg_snprintf(s, sizeof s, "%s@*", who);   /* brain-dead? */
     else
       strncpyz(s, who, sizeof s);
-    if ((me = module_find("server",0,0)) && me->funcs)
+    if ((me = module_find("server", 0, 0)) && me->funcs)
       egg_snprintf(s1, sizeof s1, "%s!%s", me->funcs[SERVER_BOTNAME],
-		     me->funcs[SERVER_BOTUSERHOST]);
+                   me->funcs[SERVER_BOTUSERHOST]);
     else
       egg_snprintf(s1, sizeof s1, "%s!%s@%s", origbotname, botuser, hostname);
 
@@ -260,33 +272,36 @@
     }
     if (chan) {
       u_addexempt(chan, s, dcc[idx].nick, par,
-		  expire_time ? now + expire_time : 0, 0);
+                  expire_time ? now + expire_time : 0, 0);
       if (par[0] == '*') {
-	par++;
-	putlog(LOG_CMDS, "*", "#%s# (%s) +exempt %s %s (%s) (sticky)",
-	       dcc[idx].nick, dcc[idx].u.chat->con_chan, s, chan->dname, par);
-	dprintf(idx, "New %s sticky exempt: %s (%s)\n", chan->dname, s, par);
-      } else {
-	putlog(LOG_CMDS, "*", "#%s# (%s) +exempt %s %s (%s)", dcc[idx].nick,
-	       dcc[idx].u.chat->con_chan, s, chan->dname, par);
-	dprintf(idx, "New %s exempt: %s (%s)\n", chan->dname, s, par);
+        par++;
+        putlog(LOG_CMDS, "*", "#%s# (%s) +exempt %s %s (%s) (sticky)",
+               dcc[idx].nick, dcc[idx].u.chat->con_chan, s, chan->dname, par);
+        dprintf(idx, "New %s sticky exempt: %s (%s)\n", chan->dname, s, par);
+      }
+      else {
+        putlog(LOG_CMDS, "*", "#%s# (%s) +exempt %s %s (%s)", dcc[idx].nick,
+               dcc[idx].u.chat->con_chan, s, chan->dname, par);
+        dprintf(idx, "New %s exempt: %s (%s)\n", chan->dname, s, par);
       }
       add_mode(chan, '+', 'e', s);
-    } else {
+    }
+    else {
       u_addexempt(NULL, s, dcc[idx].nick, par,
-		  expire_time ? now + expire_time : 0, 0);
+                  expire_time ? now + expire_time : 0, 0);
       if (par[0] == '*') {
-	par++;
-	putlog(LOG_CMDS, "*", "#%s# (GLOBAL) +exempt %s (%s) (sticky)",
-	       dcc[idx].nick, s, par);
-	dprintf(idx, "New sticky exempt: %s (%s)\n", s, par);
-      } else {
-	putlog(LOG_CMDS, "*", "#%s# (GLOBAL) +exempt %s (%s)", dcc[idx].nick,
-	       s, par);
-	dprintf(idx, "New exempt: %s (%s)\n", s, par);
+        par++;
+        putlog(LOG_CMDS, "*", "#%s# (GLOBAL) +exempt %s (%s) (sticky)",
+               dcc[idx].nick, s, par);
+        dprintf(idx, "New sticky exempt: %s (%s)\n", s, par);
+      }
+      else {
+        putlog(LOG_CMDS, "*", "#%s# (GLOBAL) +exempt %s (%s)", dcc[idx].nick,
+               s, par);
+        dprintf(idx, "New exempt: %s (%s)\n", s, par);
       }
       for (chan = chanset; chan != NULL; chan = chan->next)
-	add_mode(chan, '+', 'e', s);
+        add_mode(chan, '+', 'e', s);
     }
   }
 }
@@ -305,7 +320,8 @@
 
   if (!par[0]) {
     dprintf(idx, "Usage: +invite <hostmask> [channel] [%%<XdXhXm>] [reason]\n");
-  } else {
+  }
+  else {
     who = newsplit(&par);
     if (par[0] && strchr(CHANMETA, par[0]))
       chname = newsplit(&par);
@@ -313,50 +329,52 @@
       chname = 0;
     if (chname || !(u->flags & USER_MASTER)) {
       if (!chname)
-	chname = dcc[idx].u.chat->con_chan;
-      get_user_flagrec(u,&user,chname);
+        chname = dcc[idx].u.chat->con_chan;
+      get_user_flagrec(u, &user, chname);
       chan = findchan_by_dname(chname);
       /* *shrug* ??? (guppy:10Feb99) */
       if (!chan) {
-	dprintf(idx, "That channel doesn't exist!\n");
-	return;
-      } else if (!((glob_op(user) && !chan_deop(user)) || (glob_halfop(user) &&
-		 !chan_dehalfop(user)) || chan_op(user) || chan_halfop(user))) {
+        dprintf(idx, "That channel doesn't exist!\n");
+        return;
+      }
+      else if (!((glob_op(user) && !chan_deop(user)) || (glob_halfop(user) &&
+               !chan_dehalfop(user)) || chan_op(user) || chan_halfop(user))) {
         dprintf(idx, "You don't have access to set invites on %s.\n", chname);
         return;
       }
-    } else
+    }
+    else
       chan = 0;
     /* Added by Q and Solal  - Requested by Arty2, special thanx :) */
     if (par[0] == '%') {
-      p = newsplit (&par);
+      p = newsplit(&par);
       p_expire = p + 1;
       while (*(++p) != 0) {
-	switch (tolower(*p)) {
-	case 'd':
-	  *p = 0;
-	  expire_foo = strtol (p_expire, NULL, 10);
-	  if (expire_foo > 365)
-	    expire_foo = 365;
-	  expire_time += 86400 * expire_foo;
-	  p_expire = p + 1;
-	  break;
-	case 'h':
-	  *p = 0;
-	  expire_foo = strtol (p_expire, NULL, 10);
-	  if (expire_foo > 8760)
-	    expire_foo = 8760;
-	  expire_time += 3600 * expire_foo;
-	  p_expire = p + 1;
-	  break;
-	case 'm':
-	  *p = 0;
-	  expire_foo = strtol (p_expire, NULL, 10);
-	  if (expire_foo > 525600)
-	    expire_foo = 525600;
-	  expire_time += 60 * expire_foo;
-	  p_expire = p + 1;
-	}
+        switch (tolower(*p)) {
+        case 'd':
+          *p = 0;
+          expire_foo = strtol(p_expire, NULL, 10);
+          if (expire_foo > 365)
+            expire_foo = 365;
+          expire_time += 86400 * expire_foo;
+          p_expire = p + 1;
+          break;
+        case 'h':
+          *p = 0;
+          expire_foo = strtol(p_expire, NULL, 10);
+          if (expire_foo > 8760)
+            expire_foo = 8760;
+          expire_time += 3600 * expire_foo;
+          p_expire = p + 1;
+          break;
+        case 'm':
+          *p = 0;
+          expire_foo = strtol(p_expire, NULL, 10);
+          if (expire_foo > 525600)
+            expire_foo = 525600;
+          expire_time += 60 * expire_foo;
+          p_expire = p + 1;
+        }
       }
     }
     if (!par[0])
@@ -368,16 +386,17 @@
     /* Fix missing ! or @ BEFORE checking against myself */
     if (!strchr(who, '!')) {
       if (!strchr(who, '@'))
-	egg_snprintf(s, sizeof s, "%s!*@*", who);	/* Lame nick invite */
+        egg_snprintf(s, sizeof s, "%s!*@*", who);       /* Lame nick invite */
       else
-	egg_snprintf(s, sizeof s, "*!%s", who);
-    } else if (!strchr(who, '@'))
-      egg_snprintf(s, sizeof s, "%s@*", who);		/* brain-dead? */
+        egg_snprintf(s, sizeof s, "*!%s", who);
+    }
+    else if (!strchr(who, '@'))
+      egg_snprintf(s, sizeof s, "%s@*", who);   /* brain-dead? */
     else
       strncpyz(s, who, sizeof s);
-    if ((me = module_find("server",0,0)) && me->funcs)
+    if ((me = module_find("server", 0, 0)) && me->funcs)
       egg_snprintf(s1, sizeof s1, "%s!%s", me->funcs[SERVER_BOTNAME],
-		     me->funcs[SERVER_BOTUSERHOST]);
+                   me->funcs[SERVER_BOTUSERHOST]);
     else
       egg_snprintf(s1, sizeof s1, "%s!%s@%s", origbotname, botuser, hostname);
 
@@ -388,33 +407,36 @@
     }
     if (chan) {
       u_addinvite(chan, s, dcc[idx].nick, par,
-		  expire_time ? now + expire_time : 0, 0);
+                  expire_time ? now + expire_time : 0, 0);
       if (par[0] == '*') {
-	par++;
-	putlog(LOG_CMDS, "*", "#%s# (%s) +invite %s %s (%s) (sticky)",
-	       dcc[idx].nick, dcc[idx].u.chat->con_chan, s, chan->dname, par);
-	dprintf(idx, "New %s sticky invite: %s (%s)\n", chan->dname, s, par);
-      } else {
-	putlog(LOG_CMDS, "*", "#%s# (%s) +invite %s %s (%s)", dcc[idx].nick,
-	       dcc[idx].u.chat->con_chan, s, chan->dname, par);
-	dprintf(idx, "New %s invite: %s (%s)\n", chan->dname, s, par);
+        par++;
+        putlog(LOG_CMDS, "*", "#%s# (%s) +invite %s %s (%s) (sticky)",
+               dcc[idx].nick, dcc[idx].u.chat->con_chan, s, chan->dname, par);
+        dprintf(idx, "New %s sticky invite: %s (%s)\n", chan->dname, s, par);
+      }
+      else {
+        putlog(LOG_CMDS, "*", "#%s# (%s) +invite %s %s (%s)", dcc[idx].nick,
+               dcc[idx].u.chat->con_chan, s, chan->dname, par);
+        dprintf(idx, "New %s invite: %s (%s)\n", chan->dname, s, par);
       }
       add_mode(chan, '+', 'I', s);
-    } else {
+    }
+    else {
       u_addinvite(NULL, s, dcc[idx].nick, par,
-		  expire_time ? now + expire_time : 0, 0);
+                  expire_time ? now + expire_time : 0, 0);
       if (par[0] == '*') {
-	par++;
-	putlog(LOG_CMDS, "*", "#%s# (GLOBAL) +invite %s (%s) (sticky)",
-	       dcc[idx].nick, s, par);
-	dprintf(idx, "New sticky invite: %s (%s)\n", s, par);
-      } else {
-	putlog(LOG_CMDS, "*", "#%s# (GLOBAL) +invite %s (%s)", dcc[idx].nick,
-	       s, par);
-	dprintf(idx, "New invite: %s (%s)\n", s, par);
+        par++;
+        putlog(LOG_CMDS, "*", "#%s# (GLOBAL) +invite %s (%s) (sticky)",
+               dcc[idx].nick, s, par);
+        dprintf(idx, "New sticky invite: %s (%s)\n", s, par);
+      }
+      else {
+        putlog(LOG_CMDS, "*", "#%s# (GLOBAL) +invite %s (%s)", dcc[idx].nick,
+               s, par);
+        dprintf(idx, "New invite: %s (%s)\n", s, par);
       }
       for (chan = chanset; chan != NULL; chan = chan->next)
-	add_mode(chan, '+', 'I', s);
+        add_mode(chan, '+', 'I', s);
     }
   }
 }
@@ -469,8 +491,7 @@
     egg_snprintf(s, sizeof s, "%d", -i);
     j = u_delban(chan, s, 1);
     if (j > 0) {
-      putlog(LOG_CMDS, "*", "#%s# (%s) -ban %s", dcc[idx].nick,
-             chan->dname, s);
+      putlog(LOG_CMDS, "*", "#%s# (%s) -ban %s", dcc[idx].nick, chan->dname, s);
       dprintf(idx, "Removed %s channel ban: %s\n", chan->dname, s);
       add_mode(chan, '-', 'b', s);
       return;
@@ -490,7 +511,8 @@
         }
       }
     }
-  } else {
+  }
+  else {
     j = u_delban(chan, ban, 1);
     if (j > 0) {
       putlog(LOG_CMDS, "*", "#%s# (%s) -ban %s", dcc[idx].nick,
@@ -502,8 +524,7 @@
     for (b = chan->channel.ban; b && b->mask && b->mask[0]; b = b->next) {
       if (!rfc_casecmp(b->mask, ban)) {
         add_mode(chan, '-', 'b', b->mask);
-        dprintf(idx, "%s '%s' on %s.\n",
-                IRC_REMOVEDBAN, b->mask, chan->dname);
+        dprintf(idx, "%s '%s' on %s.\n", IRC_REMOVEDBAN, b->mask, chan->dname);
         putlog(LOG_CMDS, "*", "#%s# (%s) -ban %s [on channel]",
                dcc[idx].nick, dcc[idx].u.chat->con_chan, ban);
         return;
@@ -513,7 +534,7 @@
   dprintf(idx, "No such ban.\n");
 }
 
-static void cmd_mns_exempt (struct userrec *u, int idx, char *par)
+static void cmd_mns_exempt(struct userrec *u, int idx, char *par)
 {
   int i = 0, j;
   struct chanset_t *chan = NULL;
@@ -536,9 +557,9 @@
   if (chname || !(u->flags & USER_MASTER)) {
     if (!chname)
       chname = dcc[idx].u.chat->con_chan;
-    get_user_flagrec(u,&user,chname);
+    get_user_flagrec(u, &user, chname);
     if (!((glob_op(user) && !chan_deop(user)) || (glob_halfop(user) &&
-	!chan_dehalfop(user)) || chan_op(user) || chan_halfop(user))) {
+        !chan_dehalfop(user)) || chan_op(user) || chan_halfop(user))) {
       dprintf(idx, "You don't have access to remove exempts on %s.\n", chname);
       return;
     }
@@ -560,52 +581,53 @@
       egg_snprintf(s, sizeof s, "%d", -i);
       j = u_delexempt(chan, s, 1);
       if (j > 0) {
-	putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s", dcc[idx].nick,
-	       chan->dname, s);
-	dprintf(idx, "Removed %s channel exempt: %s\n", chan->dname, s);
-	add_mode(chan, '-', 'e', s);
-	return;
+        putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s", dcc[idx].nick,
+               chan->dname, s);
+        dprintf(idx, "Removed %s channel exempt: %s\n", chan->dname, s);
+        add_mode(chan, '-', 'e', s);
+        return;
       }
       i = 0;
       for (e = chan->channel.exempt; e && e->mask && e->mask[0]; e = e->next) {
-	if (!u_equals_mask(global_exempts, e->mask) &&
-	    !u_equals_mask(chan->exempts, e->mask)) {
-	  i++;
-	  if (i == -j) {
-	    add_mode(chan, '-', 'e', e->mask);
-	    dprintf(idx, "%s '%s' on %s.\n", IRC_REMOVEDEXEMPT,
-		    e->mask, chan->dname);
-	    putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s [on channel]",
-		   dcc[idx].nick, dcc[idx].u.chat->con_chan, exempt);
-	    return;
-	  }
-	}
+        if (!u_equals_mask(global_exempts, e->mask) &&
+            !u_equals_mask(chan->exempts, e->mask)) {
+          i++;
+          if (i == -j) {
+            add_mode(chan, '-', 'e', e->mask);
+            dprintf(idx, "%s '%s' on %s.\n", IRC_REMOVEDEXEMPT,
+                    e->mask, chan->dname);
+            putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s [on channel]",
+                   dcc[idx].nick, dcc[idx].u.chat->con_chan, exempt);
+            return;
+          }
+        }
       }
-    } else {
+    }
+    else {
       j = u_delexempt(chan, exempt, 1);
       if (j > 0) {
-	putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s", dcc[idx].nick,
-	       dcc[idx].u.chat->con_chan, exempt);
-	dprintf(idx, "Removed %s channel exempt: %s\n", chname, exempt);
-	add_mode(chan, '-', 'e', exempt);
-	return;
+        putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s", dcc[idx].nick,
+               dcc[idx].u.chat->con_chan, exempt);
+        dprintf(idx, "Removed %s channel exempt: %s\n", chname, exempt);
+        add_mode(chan, '-', 'e', exempt);
+        return;
       }
       for (e = chan->channel.exempt; e && e->mask && e->mask[0]; e = e->next) {
-	if (!rfc_casecmp(e->mask, exempt)) {
-	  add_mode(chan, '-', 'e', e->mask);
-	  dprintf(idx, "%s '%s' on %s.\n",
-		  IRC_REMOVEDEXEMPT, e->mask, chan->dname);
-	  putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s [on channel]",
-		 dcc[idx].nick, dcc[idx].u.chat->con_chan, exempt);
-	  return;
-	}
+        if (!rfc_casecmp(e->mask, exempt)) {
+          add_mode(chan, '-', 'e', e->mask);
+          dprintf(idx, "%s '%s' on %s.\n",
+                  IRC_REMOVEDEXEMPT, e->mask, chan->dname);
+          putlog(LOG_CMDS, "*", "#%s# (%s) -exempt %s [on channel]",
+                 dcc[idx].nick, dcc[idx].u.chat->con_chan, exempt);
+          return;
+        }
       }
     }
   }
   dprintf(idx, "No such exemption.\n");
 }
 
-static void cmd_mns_invite (struct userrec *u, int idx, char *par)
+static void cmd_mns_invite(struct userrec *u, int idx, char *par)
 {
   int i = 0, j;
   struct chanset_t *chan = NULL;
@@ -628,9 +650,9 @@
   if (chname || !(u->flags & USER_MASTER)) {
     if (!chname)
       chname = dcc[idx].u.chat->con_chan;
-    get_user_flagrec(u,&user,chname);
+    get_user_flagrec(u, &user, chname);
     if (!((glob_op(user) && !chan_deop(user)) || (glob_halfop(user) &&
-	!chan_dehalfop(user)) || chan_op(user) || chan_halfop(user))) {
+        !chan_dehalfop(user)) || chan_op(user) || chan_halfop(user))) {
       dprintf(idx, "You don't have access to remove invites on %s.\n", chname);
       return;
     }
@@ -652,47 +674,48 @@
       egg_snprintf(s, sizeof s, "%d", -i);
       j = u_delinvite(chan, s, 1);
       if (j > 0) {
-	putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s", dcc[idx].nick,
-	       chan->dname, s);
-	dprintf(idx, "Removed %s channel invite: %s\n", chan->dname, s);
-	add_mode(chan, '-', 'I', s);
-	return;
+        putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s", dcc[idx].nick,
+               chan->dname, s);
+        dprintf(idx, "Removed %s channel invite: %s\n", chan->dname, s);
+        add_mode(chan, '-', 'I', s);
+        return;
       }
       i = 0;
       for (inv = chan->channel.invite; inv && inv->mask && inv->mask[0];
-	   inv = inv->next) {
-	if (!u_equals_mask(global_invites, inv->mask) &&
-	    !u_equals_mask(chan->invites, inv->mask)) {
-	  i++;
-	  if (i == -j) {
-	    add_mode(chan, '-', 'I', inv->mask);
-	    dprintf(idx, "%s '%s' on %s.\n", IRC_REMOVEDINVITE,
-		    inv->mask, chan->dname);
-	    putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s [on channel]",
-		   dcc[idx].nick, dcc[idx].u.chat->con_chan, invite);
-	    return;
-	  }
-	}
+           inv = inv->next) {
+        if (!u_equals_mask(global_invites, inv->mask) &&
+            !u_equals_mask(chan->invites, inv->mask)) {
+          i++;
+          if (i == -j) {
+            add_mode(chan, '-', 'I', inv->mask);
+            dprintf(idx, "%s '%s' on %s.\n", IRC_REMOVEDINVITE,
+                    inv->mask, chan->dname);
+            putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s [on channel]",
+                   dcc[idx].nick, dcc[idx].u.chat->con_chan, invite);
+            return;
+          }
+        }
       }
-    } else {
+    }
+    else {
       j = u_delinvite(chan, invite, 1);
       if (j > 0) {
-	putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s", dcc[idx].nick,
-	       dcc[idx].u.chat->con_chan, invite);
-	dprintf(idx, "Removed %s channel invite: %s\n", chname, invite);
-	add_mode(chan, '-', 'I', invite);
-	return;
+        putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s", dcc[idx].nick,
+               dcc[idx].u.chat->con_chan, invite);
+        dprintf(idx, "Removed %s channel invite: %s\n", chname, invite);
+        add_mode(chan, '-', 'I', invite);
+        return;
       }
       for (inv = chan->channel.invite; inv && inv->mask && inv->mask[0];
-	   inv = inv->next) {
-	if (!rfc_casecmp(inv->mask, invite)) {
-	  add_mode(chan, '-', 'I', inv->mask);
-	  dprintf(idx, "%s '%s' on %s.\n",
-		  IRC_REMOVEDINVITE, inv->mask, chan->dname);
-	  putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s [on channel]",
-		 dcc[idx].nick, dcc[idx].u.chat->con_chan, invite);
-	  return;
-	}
+           inv = inv->next) {
+        if (!rfc_casecmp(inv->mask, invite)) {
+          add_mode(chan, '-', 'I', inv->mask);
+          dprintf(idx, "%s '%s' on %s.\n",
+                  IRC_REMOVEDINVITE, inv->mask, chan->dname);
+          putlog(LOG_CMDS, "*", "#%s# (%s) -invite %s [on channel]",
+                 dcc[idx].nick, dcc[idx].u.chat->con_chan, invite);
+          return;
+        }
       }
     }
   }
@@ -704,13 +727,14 @@
   if (!egg_strcasecmp(par, "all")) {
     putlog(LOG_CMDS, "*", "#%s# bans all", dcc[idx].nick);
     tell_bans(idx, 1, "");
-  } else {
+  }
+  else {
     putlog(LOG_CMDS, "*", "#%s# bans %s", dcc[idx].nick, par);
     tell_bans(idx, 0, par);
   }
 }
 
-static void cmd_exempts (struct userrec *u, int idx, char *par)
+static void cmd_exempts(struct userrec *u, int idx, char *par)
 {
   if (!use_exempts) {
     dprintf(idx, "This command can only be used with use-exempts enabled.\n");
@@ -719,13 +743,14 @@
   if (!egg_strcasecmp(par, "all")) {
     putlog(LOG_CMDS, "*", "#%s# exempts all", dcc[idx].nick);
     tell_exempts(idx, 1, "");
-  } else {
+  }
+  else {
     putlog(LOG_CMDS, "*", "#%s# exempts %s", dcc[idx].nick, par);
     tell_exempts(idx, 0, par);
   }
 }
 
-static void cmd_invites (struct userrec *u, int idx, char *par)
+static void cmd_invites(struct userrec *u, int idx, char *par)
 {
   if (!use_invites) {
     dprintf(idx, "This command can only be used with use-invites enabled.\n");
@@ -734,7 +759,8 @@
   if (!egg_strcasecmp(par, "all")) {
     putlog(LOG_CMDS, "*", "#%s# invites all", dcc[idx].nick);
     tell_invites(idx, 1, "");
-  } else {
+  }
+  else {
     putlog(LOG_CMDS, "*", "#%s# invites %s", dcc[idx].nick, par);
     tell_invites(idx, 0, par);
   }
@@ -762,20 +788,23 @@
     if (s[0] == '@')
       locked = 1;
     s1 = s;
-  } else
+  }
+  else
     chname = 0;
   if (!par[0]) {
     if (s1 && s1[0] == '@')
       s1++;
     if (s1 && s1[0]) {
       if (chname) {
-	dprintf(idx, "Info on %s: %s\n", chname, s1);
-	dprintf(idx, "Use '.info %s none' to remove it.\n", chname);
-      } else {
-	dprintf(idx, "Default info: %s\n", s1);
-	dprintf(idx, "Use '.info none' to remove it.\n");
+        dprintf(idx, "Info on %s: %s\n", chname, s1);
+        dprintf(idx, "Use '.info %s none' to remove it.\n", chname);
+      }
+      else {
+        dprintf(idx, "Default info: %s\n", s1);
+        dprintf(idx, "Use '.info none' to remove it.\n");
       }
-    } else
+    }
+    else
       dprintf(idx, "No info has been set for you.\n");
     putlog(LOG_CMDS, "*", "#%s# info %s", dcc[idx].nick, chname ? chname : "");
     return;
@@ -790,7 +819,8 @@
       set_handle_chaninfo(userlist, dcc[idx].nick, chname, NULL);
       dprintf(idx, "Removed your info line on %s.\n", chname);
       putlog(LOG_CMDS, "*", "#%s# info %s none", dcc[idx].nick, chname);
-    } else {
+    }
+    else {
       set_user(&USERENTRY_INFO, u, NULL);
       dprintf(idx, "Removed your default info line.\n");
       putlog(LOG_CMDS, "*", "#%s# info none", dcc[idx].nick);
@@ -803,7 +833,8 @@
     set_handle_chaninfo(userlist, dcc[idx].nick, chname, par);
     dprintf(idx, "Your info on %s is now: %s\n", chname, par);
     putlog(LOG_CMDS, "*", "#%s# info %s ...", dcc[idx].nick, chname);
-  } else {
+  }
+  else {
     set_user(&USERENTRY_INFO, u, par);
     dprintf(idx, "Your default info is now: %s\n", par);
     putlog(LOG_CMDS, "*", "#%s# info ...", dcc[idx].nick);
@@ -835,7 +866,8 @@
       dprintf(idx, "No such channel.\n");
       return;
     }
-  } else
+  }
+  else
     chname = 0;
   if ((u1->flags & USER_BOT) && !(u->flags & USER_MASTER)) {
     dprintf(idx, "You have to be master to change bots info.\n");
@@ -849,25 +881,26 @@
     get_user_flagrec(u, &user, chname);
     get_user_flagrec(u1, &victim, chname);
     if ((chan_owner(victim) || glob_owner(victim)) &&
-	!(glob_owner(user) || chan_owner(user))) {
+        !(glob_owner(user) || chan_owner(user))) {
       dprintf(idx, "You can't change info for the channel owner.\n");
       return;
     }
   }
   putlog(LOG_CMDS, "*", "#%s# chinfo %s %s %s", dcc[idx].nick, handle,
-	 chname ? chname : par, chname ? par : "");
+         chname ? chname : par, chname ? par : "");
   if (!egg_strcasecmp(par, "none"))
     par[0] = 0;
   if (chname) {
     set_handle_chaninfo(userlist, handle, chname, par);
     if (par[0] == '@')
       dprintf(idx, "New info (LOCKED) for %s on %s: %s\n", handle, chname,
-	      &par[1]);
+              &par[1]);
     else if (par[0])
       dprintf(idx, "New info for %s on %s: %s\n", handle, chname, par);
     else
       dprintf(idx, "Wiped info for %s on %s\n", handle, chname);
-  } else {
+  }
+  else {
     set_user(&USERENTRY_INFO, u1, par[0] ? par : NULL);
     if (par[0] == '@')
       dprintf(idx, "New default info (LOCKED) for %s: %s\n", handle, &par[1]);
@@ -896,14 +929,15 @@
     strncpyz(s, stick_type, sizeof s);
   }
   if (!s[0]) {
-    dprintf(idx, "Usage: %sstick [ban/exempt/invite] <hostmask or number> [channel]\n",
-            yn ? "" : "un");
+    dprintf(idx, "Usage: %sstick [ban/exempt/invite] <hostmask or number> "
+            "[channel]\n", yn ? "" : "un");
     return;
   }
   /* Now deal with exemptions */
   if (!egg_strcasecmp(stick_type, "exempt")) {
     if (!use_exempts) {
-      dprintf(idx, "This command can only be used with use-exempts enabled.\n");
+      dprintf(idx, "This command can only be used with use-exempts "
+              "enabled.\n");
       return;
     }
     if (!chname[0]) {
@@ -933,8 +967,9 @@
     }
     dprintf(idx, "No such exempt.\n");
     return;
+  }
   /* Now the invites */
-  } else if (!egg_strcasecmp(stick_type, "invite")) {
+  else if (!egg_strcasecmp(stick_type, "invite")) {
     if (!use_invites) {
       dprintf(idx, "This command can only be used with use-invites enabled.\n");
       return;
@@ -975,8 +1010,8 @@
              dcc[idx].nick, yn ? "" : "un", s);
       dprintf(idx, "%stuck ban: %s\n", yn ? "S" : "Uns", s);
       if ((me = module_find("irc", 0, 0)))
-	for (achan = chanset; achan != NULL; achan = achan->next)
-	  (me->funcs[IRC_CHECK_THIS_BAN])(achan, s, yn);
+        for (achan = chanset; achan != NULL; achan = achan->next)
+          (me->funcs[IRC_CHECK_THIS_BAN]) (achan, s, yn);
       return;
     }
     strncpyz(chname, dcc[idx].u.chat->con_chan, sizeof chname);
@@ -994,7 +1029,7 @@
            yn ? "" : "un", s, chname);
     dprintf(idx, "%stuck %s ban: %s\n", yn ? "S" : "Uns", chname, s);
     if ((me = module_find("irc", 0, 0)))
-      (me->funcs[IRC_CHECK_THIS_BAN])(chan, s, yn);
+      (me->funcs[IRC_CHECK_THIS_BAN]) (chan, s, yn);
     return;
   }
   dprintf(idx, "No such ban.\n");
@@ -1040,7 +1075,7 @@
   }
   get_user_flagrec(u, &user, chan->dname);
   get_user_flagrec(u1, &victim, chan->dname);
-  if ((!glob_master(user) && !chan_master(user)) ||  /* drummer */
+  if ((!glob_master(user) && !chan_master(user)) ||     /* drummer */
       (chan_owner(victim) && !chan_owner(user) && !glob_owner(user)) ||
       (glob_owner(victim) && !glob_owner(user))) {
     dprintf(idx, "You have no permission to do that.\n");
@@ -1049,11 +1084,10 @@
   chanrec = get_chanrec(u1, chan->dname);
   if (chanrec) {
     dprintf(idx, "User %s already has a channel record for %s.\n",
-	    nick, chan->dname);
+            nick, chan->dname);
     return;
   }
-  putlog(LOG_CMDS, "*", "#%s# +chrec %s %s", dcc[idx].nick,
-	 nick, chan->dname);
+  putlog(LOG_CMDS, "*", "#%s# +chrec %s %s", dcc[idx].nick, nick, chan->dname);
   add_chanrec(u1, chan->dname);
   dprintf(idx, "Added %s channel record for %s.\n", chan->dname, nick);
 }
@@ -1084,11 +1118,12 @@
       dprintf(idx, "Invalid console channel.\n");
       return;
     }
-  } else
+  }
+  else
     chn = newsplit(&par);
   get_user_flagrec(u, &user, chn);
   get_user_flagrec(u1, &victim, chn);
-  if ((!glob_master(user) && !chan_master(user)) ||  /* drummer */
+  if ((!glob_master(user) && !chan_master(user)) ||     /* drummer */
       (chan_owner(victim) && !chan_owner(user) && !glob_owner(user)) ||
       (glob_owner(victim) && !glob_owner(user))) {
     dprintf(idx, "You have no permission to do that.\n");
@@ -1118,7 +1153,8 @@
   if (findchan_by_dname(chname)) {
     dprintf(idx, "That channel already exists!\n");
     return;
-  } else if ((chan = findchan(chname))) {
+  }
+  else if ((chan = findchan(chname))) {
     /* This prevents someone adding a channel by it's unique server
      * name <cybah>
      */
@@ -1126,7 +1162,7 @@
     return;
   }
 
-  if (tcl_channel_add(0, chname, par) == TCL_ERROR) /* drummer */
+  if (tcl_channel_add(0, chname, par) == TCL_ERROR)     /* drummer */
     dprintf(idx, "Invalid channel or channel options.\n");
   else
     putlog(LOG_CMDS, "*", "#%s# +chan %s", dcc[idx].nick, chname);
@@ -1153,21 +1189,22 @@
     return;
   }
   if (channel_static(chan)) {
-    dprintf(idx, "Cannot remove %s, it is not a dynamic channel!.\n",
-	    chname);
+    dprintf(idx, "Cannot remove %s, it is not a dynamic channel!.\n", chname);
     return;
   }
 
   for (i = 0; i < dcc_total; i++)
     if ((dcc[i].type->flags & DCT_CHAT) &&
-	!rfc_casecmp(dcc[i].u.chat->con_chan, chan->dname)) {
-      dprintf(i, "%s is no longer a valid channel, changing your console to '*'\n",
-	      chname);
+        !rfc_casecmp(dcc[i].u.chat->con_chan, chan->dname)) {
+      dprintf(i,
+              "%s is no longer a valid channel, changing your console to '*'\n",
+              chname);
       strcpy(dcc[i].u.chat->con_chan, "*");
     }
   remove_channel(chan);
   dprintf(idx, "Channel %s removed from the bot.\n", chname);
-  dprintf(idx, "This includes any channel specific bans, invites, exemptions and user records that you set.\n");
+  dprintf(idx, "This includes any channel specific bans, invites, exemptions "
+          "and user records that you set.\n");
   putlog(LOG_CMDS, "*", "#%s# -chan %s", dcc[idx].nick, chname);
 }
 
@@ -1184,7 +1221,8 @@
       dprintf(idx, "Your console channel is invalid.\n");
       return;
     }
-  } else {
+  }
+  else {
     chname = newsplit(&par);
     get_user_flagrec(u, &user, chname);
     if (!glob_master(user) && !chan_master(user)) {
@@ -1196,7 +1234,7 @@
     dprintf(idx, "No such channel defined.\n");
   else {
     dprintf(idx, "Settings for %s channel %s:\n",
-	    channel_static(chan) ? "static" : "dynamic", chan->dname);
+            channel_static(chan) ? "static" : "dynamic", chan->dname);
     get_mode_protect(chan, work);
     dprintf(idx, "Protect modes (chanmode): %s\n", work[0] ? work : "None");
     if (chan->idle_kick)
@@ -1207,7 +1245,7 @@
       dprintf(idx, "stopnethack-mode: %d\n", chan->stopnethack_mode);
     else
       dprintf(idx, "stopnethack: DON'T!\n");
-      dprintf(idx, "aop-delay: %d:%d\n", chan->aop_min, chan->aop_max);
+    dprintf(idx, "aop-delay: %d:%d\n", chan->aop_min, chan->aop_max);
     if (chan->revenge_mode)
       dprintf(idx, "revenge-mode: %d\n", chan->revenge_mode);
     else
@@ -1227,65 +1265,73 @@
     /* Only bot owners can see/change these (they're TCL commands) */
     if (u->flags & USER_OWNER) {
       if (chan->need_op[0])
-	dprintf(idx, "To regain op's (need-op):\n%s\n", chan->need_op);
+        dprintf(idx, "To regain op's (need-op):\n%s\n", chan->need_op);
       if (chan->need_invite[0])
-	dprintf(idx, "To get invite (need-invite):\n%s\n", chan->need_invite);
+        dprintf(idx, "To get invite (need-invite):\n%s\n", chan->need_invite);
       if (chan->need_key[0])
-	dprintf(idx, "To get key (need-key):\n%s\n", chan->need_key);
+        dprintf(idx, "To get key (need-key):\n%s\n", chan->need_key);
       if (chan->need_unban[0])
-	dprintf(idx, "If I'm banned (need-unban):\n%s\n", chan->need_unban);
+        dprintf(idx, "If I'm banned (need-unban):\n%s\n", chan->need_unban);
       if (chan->need_limit[0])
-	dprintf(idx, "When channel full (need-limit):\n%s\n", chan->need_limit);
+        dprintf(idx, "When channel full (need-limit):\n%s\n",
+                chan->need_limit);
     }
     dprintf(idx, "Other modes:\n");
-    dprintf(idx, "     %cinactive       %cstatuslog      %csecret         %cshared\n",
-	    (chan->status & CHAN_INACTIVE) ? '+' : '-',
-	    (chan->status & CHAN_LOGSTATUS) ? '+' : '-',
-	    (chan->status & CHAN_SECRET) ? '+' : '-',
-	    (chan->status & CHAN_SHARED) ? '+' : '-');
-    dprintf(idx, "     %cgreet          %cseen           %ccycle          %cdontkickops\n",
-	    (chan->status & CHAN_GREET) ? '+' : '-',
-	    (chan->status & CHAN_SEEN) ? '+' : '-',
-	    (chan->status & CHAN_CYCLE) ? '+' : '-',
-	    (chan->status & CHAN_DONTKICKOPS) ? '+' : '-');
-    dprintf(idx, "     %cprotectops     %cprotectfriends %crevenge        %crevengebot\n",
-	    (chan->status & CHAN_PROTECTOPS) ? '+' : '-',
-	    (chan->status & CHAN_PROTECTFRIENDS) ? '+' : '-',
-	    (chan->status & CHAN_REVENGE) ? '+' : '-',
-	    (chan->status & CHAN_REVENGEBOT) ? '+' : '-');
-    dprintf(idx, "     %cbitch          %cautoop         %cautovoice      %cnodesynch\n",
-	    (chan->status & CHAN_BITCH) ? '+' : '-',
-	    (chan->status & CHAN_OPONJOIN) ? '+' : '-',
-	    (chan->status & CHAN_AUTOVOICE) ? '+' : '-',
-	    (chan->status & CHAN_NODESYNCH) ? '+' : '-');
-    dprintf(idx, "     %cenforcebans    %cdynamicbans    %cuserbans       %cautohalfop\n",
-	    (chan->status & CHAN_ENFORCEBANS) ? '+' : '-',
-	    (chan->status & CHAN_DYNAMICBANS) ? '+' : '-',
-	    (chan->status & CHAN_NOUSERBANS) ? '-' : '+',
-	    (chan->status & CHAN_AUTOHALFOP) ? '+' : '-');
+    dprintf(idx,
+            "     %cinactive       %cstatuslog      %csecret         "
+            "%cshared\n", (chan->status & CHAN_INACTIVE) ? '+' : '-',
+            (chan->status & CHAN_LOGSTATUS) ? '+' : '-',
+            (chan->status & CHAN_SECRET) ? '+' : '-',
+            (chan->status & CHAN_SHARED) ? '+' : '-');
+    dprintf(idx,
+            "     %cgreet          %cseen           %ccycle          "
+            "%cdontkickops\n", (chan->status & CHAN_GREET) ? '+' : '-',
+            (chan->status & CHAN_SEEN) ? '+' : '-',
+            (chan->status & CHAN_CYCLE) ? '+' : '-',
+            (chan->status & CHAN_DONTKICKOPS) ? '+' : '-');
+    dprintf(idx,
+            "     %cprotectops     %cprotectfriends %crevenge        "
+            "%crevengebot\n", (chan->status & CHAN_PROTECTOPS) ? '+' : '-',
+            (chan->status & CHAN_PROTECTFRIENDS) ? '+' : '-',
+            (chan->status & CHAN_REVENGE) ? '+' : '-',
+            (chan->status & CHAN_REVENGEBOT) ? '+' : '-');
+    dprintf(idx,
+            "     %cbitch          %cautoop         %cautovoice      "
+            "%cnodesynch\n", (chan->status & CHAN_BITCH) ? '+' : '-',
+            (chan->status & CHAN_OPONJOIN) ? '+' : '-',
+            (chan->status & CHAN_AUTOVOICE) ? '+' : '-',
+            (chan->status & CHAN_NODESYNCH) ? '+' : '-');
+    dprintf(idx,
+            "     %cenforcebans    %cdynamicbans    %cuserbans       "
+            "%cautohalfop\n", (chan->status & CHAN_ENFORCEBANS) ? '+' : '-',
+            (chan->status & CHAN_DYNAMICBANS) ? '+' : '-',
+            (chan->status & CHAN_NOUSERBANS) ? '-' : '+',
+            (chan->status & CHAN_AUTOHALFOP) ? '+' : '-');
     dprintf(idx, "     %cprotecthalfops\n",
-	    (chan->status & CHAN_PROTECTHALFOPS) ? '+' : '-');
-    dprintf(idx, "     %cdynamicexempts %cuserexempts    %cdynamicinvites %cuserinvites\n",
-	    (chan->ircnet_status & CHAN_DYNAMICEXEMPTS) ? '+' : '-',
-	    (chan->ircnet_status & CHAN_NOUSEREXEMPTS) ? '-' : '+',
-	    (chan->ircnet_status & CHAN_DYNAMICINVITES) ? '+' : '-',
-	    (chan->ircnet_status & CHAN_NOUSERINVITES) ? '-' : '+');
+            (chan->status & CHAN_PROTECTHALFOPS) ? '+' : '-');
+    dprintf(idx,
+            "     %cdynamicexempts %cuserexempts    %cdynamicinvites "
+            "%cuserinvites\n",
+            (chan->ircnet_status & CHAN_DYNAMICEXEMPTS) ? '+' : '-',
+            (chan->ircnet_status & CHAN_NOUSEREXEMPTS) ? '-' : '+',
+            (chan->ircnet_status & CHAN_DYNAMICINVITES) ? '+' : '-',
+            (chan->ircnet_status & CHAN_NOUSERINVITES) ? '-' : '+');
 
     ii = 1;
     tmp = 0;
     for (ul = udef; ul; ul = ul->next)
       if (ul->defined && ul->type == UDEF_FLAG) {
-	int	work_len;
+        int work_len;
 
         if (!tmp) {
           dprintf(idx, "User defined channel flags:\n");
           tmp = 1;
         }
-	if (ii == 1)
-	  egg_snprintf(work, sizeof work, "    ");
-	work_len = strlen(work);
+        if (ii == 1)
+          egg_snprintf(work, sizeof work, "    ");
+        work_len = strlen(work);
         egg_snprintf(work + work_len, sizeof(work) - work_len, " %c%s",
-		     getudef(ul->values, chan->dname) ? '+' : '-', ul->name);
+                     getudef(ul->values, chan->dname) ? '+' : '-', ul->name);
         ii++;
         if (ii > 4) {
           dprintf(idx, "%s\n", work);
@@ -1300,18 +1346,18 @@
     tmp = 0;
     for (ul = udef; ul; ul = ul->next)
       if (ul->defined && ul->type == UDEF_INT) {
-	int	work_len = strlen(work);
+        int work_len = strlen(work);
 
         if (!tmp) {
           dprintf(idx, "User defined channel settings:\n");
           tmp = 1;
         }
         egg_snprintf(work + work_len, sizeof(work) - work_len, "%s: %d   ",
-		     ul->name, getudef(ul->values, chan->dname));
+                     ul->name, getudef(ul->values, chan->dname));
         ii++;
         if (ii > 4) {
           dprintf(idx, "%s\n", work);
-	  work[0] = 0;
+          work[0] = 0;
           ii = 1;
         }
       }
@@ -1320,13 +1366,13 @@
 
     dprintf(idx, "flood settings: chan ctcp join kick deop nick\n");
     dprintf(idx, "number:          %3d  %3d  %3d  %3d  %3d  %3d\n",
-	    chan->flood_pub_thr, chan->flood_ctcp_thr,
-	    chan->flood_join_thr, chan->flood_kick_thr,
-	    chan->flood_deop_thr, chan->flood_nick_thr);
+            chan->flood_pub_thr, chan->flood_ctcp_thr,
+            chan->flood_join_thr, chan->flood_kick_thr,
+            chan->flood_deop_thr, chan->flood_nick_thr);
     dprintf(idx, "time  :          %3d  %3d  %3d  %3d  %3d  %3d\n",
-	    chan->flood_pub_time, chan->flood_ctcp_time,
-	    chan->flood_join_time, chan->flood_kick_time,
-	    chan->flood_deop_time, chan->flood_nick_time);
+            chan->flood_pub_time, chan->flood_ctcp_time,
+            chan->flood_join_time, chan->flood_kick_time,
+            chan->flood_deop_time, chan->flood_nick_time);
     putlog(LOG_CMDS, "*", "#%s# chaninfo %s", dcc[idx].nick, chname);
   }
 }
@@ -1345,26 +1391,28 @@
       all = 1;
       get_user_flagrec(u, &user, chanset ? chanset->dname : "");
       if (!glob_master(user)) {
-	dprintf(idx, "You need to be a global master to use .chanset *.\n");
-	return;
+        dprintf(idx, "You need to be a global master to use .chanset *.\n");
+        return;
       }
       newsplit(&par);
-    } else {
+    }
+    else {
       if (strchr(CHANMETA, par[0])) {
         chname = newsplit(&par);
         get_user_flagrec(u, &user, chname);
         if (!glob_master(user) && !chan_master(user)) {
-	  dprintf(idx, "You don't have access to %s. \n", chname);
-	  return;
-	} else if (!(chan = findchan_by_dname(chname)) && (chname[0] != '+')) {
-	  dprintf(idx, "That channel doesn't exist!\n");
-	  return;
-	}
-	if (!chan) {
-	  if (par[0])
-	    *--par = ' ';
-	  par = chname;
-	}
+          dprintf(idx, "You don't have access to %s. \n", chname);
+          return;
+        }
+        else if (!(chan = findchan_by_dname(chname)) && (chname[0] != '+')) {
+          dprintf(idx, "That channel doesn't exist!\n");
+          return;
+        }
+        if (!chan) {
+          if (par[0])
+            *--par = ' ';
+          par = chname;
+        }
       }
       if (!par[0] || par[0] == '*') {
         dprintf(idx, "Usage: chanset [%schannel] <settings>\n", CHANMETA);
@@ -1387,51 +1435,54 @@
       list[0] = newsplit(&par);
       answers[0] = 0;
       while (list[0][0]) {
-	if (list[0][0] == '+' || list[0][0] == '-' ||
-	    (!strcmp(list[0], "dont-idle-kick"))) {
-	  if (tcl_channel_modify(0, chan, 1, list) == TCL_OK) {
-	    strcat(answers, list[0]);
-	    strcat(answers, " ");
-	  } else if (!all || !chan->next)
-	    dprintf(idx, "Error trying to set %s for %s, invalid mode.\n",
-		    list[0], all ? "all channels" : chname);
-	  list[0] = newsplit(&par);
-	  continue;
-	}
-	/* The rest have an unknown amount of args, so assume the rest of the
-	 * line is args. Woops nearly made a nasty little hole here :) we'll
-	 * just ignore any non global +n's trying to set the need-commands.
-	 */
-	if (strncmp(list[0], "need-", 5) || (u->flags & USER_OWNER)) {
-	  if (!strncmp(list[0], "need-", 5) && !(isowner(dcc[idx].nick)) &&
-	      must_be_owner) {
-	    dprintf(idx, "Due to security concerns, only permanent owners can set these modes.\n");
-	    nfree(buf);
-	    return;
-	  }
-	  list[1] = par;
-	  /* Par gets modified in tcl_channel_modify under some
-  	   * circumstances, so save it now.
-	   */
-	  parcpy = nmalloc(strlen(par) + 1);
-	  strcpy(parcpy, par);
+        if (list[0][0] == '+' || list[0][0] == '-' ||
+            (!strcmp(list[0], "dont-idle-kick"))) {
+          if (tcl_channel_modify(0, chan, 1, list) == TCL_OK) {
+            strcat(answers, list[0]);
+            strcat(answers, " ");
+          }
+          else if (!all || !chan->next)
+            dprintf(idx, "Error trying to set %s for %s, invalid mode.\n",
+                    list[0], all ? "all channels" : chname);
+          list[0] = newsplit(&par);
+          continue;
+        }
+        /* The rest have an unknown amount of args, so assume the rest of the
+         * line is args. Woops nearly made a nasty little hole here :) we'll
+         * just ignore any non global +n's trying to set the need-commands.
+         */
+        if (strncmp(list[0], "need-", 5) || (u->flags & USER_OWNER)) {
+          if (!strncmp(list[0], "need-", 5) && !(isowner(dcc[idx].nick)) &&
+              must_be_owner) {
+            dprintf(idx, "Due to security concerns, only permanent owners can "
+                    "set these modes.\n");
+            nfree(buf);
+            return;
+          }
+          list[1] = par;
+          /* Par gets modified in tcl_channel_modify under some
+           * circumstances, so save it now.
+           */
+          parcpy = nmalloc(strlen(par) + 1);
+          strcpy(parcpy, par);
           if (tcl_channel_modify(0, chan, 2, list) == TCL_OK) {
-	    strcat(answers, list[0]);
-	    strcat(answers, " { ");
-	    strcat(answers, parcpy);
-	    strcat(answers, " }");
-	  } else if (!all || !chan->next)
-	    dprintf(idx, "Error trying to set %s for %s, invalid option\n",
-		    list[0], all ? "all channels" : chname);
+            strcat(answers, list[0]);
+            strcat(answers, " { ");
+            strcat(answers, parcpy);
+            strcat(answers, " }");
+          }
+          else if (!all || !chan->next)
+            dprintf(idx, "Error trying to set %s for %s, invalid option\n",
+                    list[0], all ? "all channels" : chname);
           nfree(parcpy);
-	}
-	break;
+        }
+        break;
       }
       if (!all && answers[0]) {
-	dprintf(idx, "Successfully set modes { %s } on %s.\n",
-		answers, chname);
-	putlog(LOG_CMDS, "*", "#%s# chanset %s %s", dcc[idx].nick, chname,
-	       answers);
+        dprintf(idx, "Successfully set modes { %s } on %s.\n", answers,
+                chname);
+        putlog(LOG_CMDS, "*", "#%s# chanset %s %s", dcc[idx].nick, chname,
+               answers);
       }
       if (!all)
         chan = NULL;
@@ -1440,7 +1491,7 @@
     }
     if (all && answers[0]) {
       dprintf(idx, "Successfully set modes { %s } on all channels.\n",
-	      answers);
+              answers);
       putlog(LOG_CMDS, "*", "#%s# chanset * %s", dcc[idx].nick, answers);
     }
     nfree(buf);
@@ -1477,28 +1528,27 @@
  *
  * NOTE: As with msg commands, the function is responsible for any logging.
  */
-static cmd_t C_dcc_irc[] =
-{
-  {"+ban",	"ol|ol",	(Function) cmd_pls_ban,		NULL},
-  {"+exempt",	"ol|ol",	(Function) cmd_pls_exempt,	NULL},
-  {"+invite",	"ol|ol",	(Function) cmd_pls_invite,	NULL},
-  {"+chan",	"n",	(Function) cmd_pls_chan,	NULL},
-  {"+chrec",	"m|m",	(Function) cmd_pls_chrec,	NULL},
-  {"-ban",	"ol|ol",	(Function) cmd_mns_ban,		NULL},
-  {"-chan",	"n",	(Function) cmd_mns_chan,	NULL},
-  {"-chrec",	"m|m",	(Function) cmd_mns_chrec,	NULL},
-  {"bans",	"ol|ol",	(Function) cmd_bans,		NULL},
-  {"-exempt",	"ol|ol",	(Function) cmd_mns_exempt,	NULL},
-  {"-invite",	"ol|ol",	(Function) cmd_mns_invite,	NULL},
-  {"exempts",	"ol|ol",	(Function) cmd_exempts,		NULL},
-  {"invites",	"ol|ol",	(Function) cmd_invites,		NULL},
-  {"chaninfo",	"m|m",	(Function) cmd_chaninfo,	NULL},
-  {"chanload",	"n|n",	(Function) cmd_chanload,	NULL},
-  {"chanset",	"n|n",	(Function) cmd_chanset,		NULL},
-  {"chansave",	"n|n",	(Function) cmd_chansave,	NULL},
-  {"chinfo",	"m|m",	(Function) cmd_chinfo,		NULL},
-  {"info",	"",	(Function) cmd_info,		NULL},
-  {"stick",	"ol|ol",	(Function) cmd_stick,		NULL},
-  {"unstick",	"ol|ol",	(Function) cmd_unstick,		NULL},
-  {NULL,	NULL,	NULL,				NULL}
+static cmd_t C_dcc_irc[] = {
+  {"+ban",     "ol|ol", (Function) cmd_pls_ban,    NULL},
+  {"+exempt",  "ol|ol", (Function) cmd_pls_exempt, NULL},
+  {"+invite",  "ol|ol", (Function) cmd_pls_invite, NULL},
+  {"+chan",    "n",     (Function) cmd_pls_chan,   NULL},
+  {"+chrec",   "m|m",   (Function) cmd_pls_chrec,  NULL},
+  {"-ban",     "ol|ol", (Function) cmd_mns_ban,    NULL},
+  {"-chan",    "n",     (Function) cmd_mns_chan,   NULL},
+  {"-chrec",   "m|m",   (Function) cmd_mns_chrec,  NULL},
+  {"bans",     "ol|ol", (Function) cmd_bans,       NULL},
+  {"-exempt",  "ol|ol", (Function) cmd_mns_exempt, NULL},
+  {"-invite",  "ol|ol", (Function) cmd_mns_invite, NULL},
+  {"exempts",  "ol|ol", (Function) cmd_exempts,    NULL},
+  {"invites",  "ol|ol", (Function) cmd_invites,    NULL},
+  {"chaninfo", "m|m",   (Function) cmd_chaninfo,   NULL},
+  {"chanload", "n|n",   (Function) cmd_chanload,   NULL},
+  {"chanset",  "n|n",   (Function) cmd_chanset,    NULL},
+  {"chansave", "n|n",   (Function) cmd_chansave,   NULL},
+  {"chinfo",   "m|m",   (Function) cmd_chinfo,     NULL},
+  {"info",     "",      (Function) cmd_info,       NULL},
+  {"stick",    "ol|ol", (Function) cmd_stick,      NULL},
+  {"unstick",  "ol|ol", (Function) cmd_unstick,    NULL},
+  {NULL,       NULL,    NULL,                      NULL}
 };
Index: eggdrop1.6/src/mod/channels.mod/help/chaninfo.help
diff -u eggdrop1.6/src/mod/channels.mod/help/chaninfo.help:1.12 eggdrop1.6/src/mod/channels.mod/help/chaninfo.help:1.13
--- eggdrop1.6/src/mod/channels.mod/help/chaninfo.help:1.12	Thu Jun 13 22:46:48 2002
+++ eggdrop1.6/src/mod/channels.mod/help/chaninfo.help	Tue Jan 28 23:48:41 2003
@@ -1,26 +1,26 @@
 %{help=chaninfo}%{+m|m}
 ###  %bchaninfo%b <channel>
-     This lists all the settings for the bot on the given channel. 
+     This lists all the settings for the bot on the given channel.
      It shows any of the following:
-	%bchanmode%b   which modes are enforced on the channel, both + and -
-	           modes can be enforced
-	%bidle-kick%b  kick idle users (non +f's anyway) on the channel after
-	           how many minutes (use 0, or dont-idle-kick to turn this off)
+        %bchanmode%b   which modes are enforced on the channel, both + and -
+                   modes can be enforced
+        %bidle-kick%b  kick idle users (non +f's anyway) on the channel after
+                   how many minutes (use 0, or dont-idle-kick to turn this off)
 %{+n}
      ATTENTION: Due to security concerns, only permanent owners can set the
                 need-* modes.
-	%bneed-op%b      Tcl command to execute when the bot doesn't have
-	                  ops
-	%bneed-invite%b  Tcl command to execute when the bot needs to be
-	                  invited to the channel (i.e. channel has mode +i)
-	%bneed-key%b     Tcl command to execute when the bot needs to find 
-	             out the key to the channel
-	%bneed-unban%b   Tcl command to execute when the bot is banned and
+        %bneed-op%b      Tcl command to execute when the bot doesn't have
+                          ops
+        %bneed-invite%b  Tcl command to execute when the bot needs to be
+                          invited to the channel (i.e. channel has mode +i)
+        %bneed-key%b     Tcl command to execute when the bot needs to find
+                     out the key to the channel
+        %bneed-unban%b   Tcl command to execute when the bot is banned and
                      can't get on the channel
-	%bneed-limit%b   Tcl command to execute when the bot can't
-	                  join the channel because the channel is full
+        %bneed-limit%b   Tcl command to execute when the bot can't
+                          join the channel because the channel is full
 %{+m|m}
-	%bstopnethack-mode%b    de-op anyone who enters the channel with server
+        %bstopnethack-mode%b    de-op anyone who enters the channel with server
                        ops
                        0 turn off,
                        1 isoptest (allow serverop if registered op)
@@ -31,8 +31,8 @@
                          if channel +bitch: see stopnethack-mode 1
                        6 if channel -bitch: see stopnethack-mode 2
                          if channel +bitch: see stopnethack-mode 4
-	%brevenge-mode%b      defines how the bot should punish bad users when
-	                  revenging
+        %brevenge-mode%b      defines how the bot should punish bad users when
+                          revenging
                        0 for deop
                        1 for deop and +d
                        2 for deop, +d and kick
@@ -42,38 +42,38 @@
                        x:x x sec delaytime
                        x:y random delay, minimum x sec, maximum y sec
      The following can be set + or - (e.g. .chanset #channel -enforcebans)
-	%benforcebans%b    kicks people who match channel bans?
-	%bdynamicbans%b    only activate bans on channel when they are needed
-	%buserbans%b       allow other users to place bans on the channel
-	%bdynamicexempts%b only activate exempts on channel when needed?
-	%buserexempts%b    allow exempts to be set by users directly?
-	%bdynamicinvites%b only activate invites on channel when needed?
-	%buserinvites%b    allow invites to be made by users directly?
-	%bautoop%b         automatically op users when they join the channel
-	%bautohalfop%b     automatically halfop users when they join the channel
-	%bbitch%b          only allow users with the +o flag to be ops on the 
-	               channel
-	%bgreet%b          say a users info line when they join the channel
-	%bprotectops%b     re-op a +o user who gets deopped?
-	%bprotecthalfops%b re-halfop a +l user who gets dehalfopped?
-	%bprotectfriends%b re-op a +f user who gets deopped?
-	%bdontkickops%b    never kick +o flag people
-	%binactive%b        never join this channel, or leave if already
-	                    joined. Useful as you can make the bot leave
+        %benforcebans%b    kicks people who match channel bans?
+        %bdynamicbans%b    only activate bans on channel when they are needed
+        %buserbans%b       allow other users to place bans on the channel
+        %bdynamicexempts%b only activate exempts on channel when needed?
+        %buserexempts%b    allow exempts to be set by users directly?
+        %bdynamicinvites%b only activate invites on channel when needed?
+        %buserinvites%b    allow invites to be made by users directly?
+        %bautoop%b         automatically op users when they join the channel
+        %bautohalfop%b     automatically halfop users when they join the channel
+        %bbitch%b          only allow users with the +o flag to be ops on the
+                       channel
+        %bgreet%b          say a users info line when they join the channel
+        %bprotectops%b     re-op a +o user who gets deopped?
+        %bprotecthalfops%b re-halfop a +l user who gets dehalfopped?
+        %bprotectfriends%b re-op a +f user who gets deopped?
+        %bdontkickops%b    never kick +o flag people
+        %binactive%b        never join this channel, or leave if already
+                            joined. Useful as you can make the bot leave
                             a channel without losing it's settings or
                             affecting any sharing.
-	%bstatuslog%b      log the channel status every 5 minutes
-	%bcycle%b          cycle the channel when it becomes op-less
-	%brevenge%b         take revenge on anyone who deops or kicks friends
-	                or ops
-	%brevengebot%b      take revenge on anyone who deops or kicks the bot
-	%bsecret%b          don't provide info about the channel over the
+        %bstatuslog%b      log the channel status every 5 minutes
+        %bcycle%b          cycle the channel when it becomes op-less
+        %brevenge%b         take revenge on anyone who deops or kicks friends
+                        or ops
+        %brevengebot%b      take revenge on anyone who deops or kicks the bot
+        %bsecret%b          don't provide info about the channel over the
                         botnet
-	%bshared%b         share user settings for this channel 
-	                (NOTE: this can be set online now)
-	%bautovoice%b      this causes the bot to also monitor channel voice
-	               settings, using the +v/+q settings.
-	%bnodesynch%b       allow non-ops to perform channel modes? (Stops bot from
+        %bshared%b         share user settings for this channel
+                        (NOTE: this can be set online now)
+        %bautovoice%b      this causes the bot to also monitor channel voice
+                       settings, using the +v/+q settings.
+        %bnodesynch%b       allow non-ops to perform channel modes? (Stops bot from
                    fighting with services such as ChanServ)
      The following are flood settings, they are set by doing
      .chanset <channel> flood-type number:seconds where number and second are
@@ -81,13 +81,13 @@
      be triggered.
           .chanset <channel> flood-type 0:0
      (or 0:1 or 1:0) will deactivate the respective flood setting.
-	%bflood-chan%b  this defines the flood level for public chatter and
-	            actions
-	%bflood-ctcp%b  this defines the flood level for ctcp's to the channel
-	            (include PING & VERSION), except for ACTION's
-	%bflood-join%b  this defines the number of joins from a give user at host
-	            that constitutes a flood
-	%bflood-kick%b   how many kicks in the given time are a flood
-	%bflood-deop%b   deops in the given time
+        %bflood-chan%b  this defines the flood level for public chatter and
+                    actions
+        %bflood-ctcp%b  this defines the flood level for ctcp's to the channel
+                    (include PING & VERSION), except for ACTION's
+        %bflood-join%b  this defines the number of joins from a give user at host
+                    that constitutes a flood
+        %bflood-kick%b   how many kicks in the given time are a flood
+        %bflood-deop%b   deops in the given time
 %{+n|n}
 See also: %{+n}+chan, -chan,%{+n|n} chansave, chanload, chanset
Index: eggdrop1.6/src/mod/channels.mod/help/channels.help
diff -u eggdrop1.6/src/mod/channels.mod/help/channels.help:1.8 eggdrop1.6/src/mod/channels.mod/help/channels.help:1.9
--- eggdrop1.6/src/mod/channels.mod/help/channels.help:1.8	Sun Jul 21 18:56:43 2002
+++ eggdrop1.6/src/mod/channels.mod/help/channels.help	Tue Jan 28 23:48:41 2003
@@ -27,38 +27,38 @@
 See also: invites, -invite, stick, unstick
 %{help=+chan}%{+n}
 ### %b+chan%b <channel>
-     Lets you add another channel to the bot, this cause the bot to 
+     Lets you add another channel to the bot, this cause the bot to
      join the channel, and for you to make changes to it's settings.
      This channel is not permanent unless %b"chanfile"%b has been
      defined in the config file, and is saved every time the userfile
      is saved, or by using %b'.chansave'%b
-     
+
 See also: +chan, -chan, chanload, chanset, chaninfo
 %{help=+chrec}%{+m|m}
 ###  %b+chrec%b <handle> [channel]
    Adds an empty channel record for the user so that channel lastons and info
    lines can be saved.  No flags are associated with the channel.
-   
+
 See also: chattr
 %{help=-ban}%{+lo|lo}
 ###  %b-ban%b <hostmask OR number> [channel]
    Removes the ban from the list of permanent bans stored on the
    bot -- you may reference the ban by the number shown in '.bans'.
-   
+
 See also: bans, +ban, stick, unstick
 %{help=-exempt}%{+lo|lo}
 ###  %b-exempt%b <hostmask OR number>
-   Removes the exemption from the list of permanent exempts stored 
+   Removes the exemption from the list of permanent exempts stored
    on the bot -- you may reference the exempt by the number shown in
    '.exempts'.
-   
+
 See also: exempts, +exempt, stick, unstick
 %{help=-invite}%{+lo|lo}
 ###  %b-invite%b <hostmask OR number>
    Removes the invite from the list of permanent invites stored
    on the bot -- you may reference the ban by the number shown in
    '.invites'.
-   
+
 See also: invites, +invite, stick, unstick
 %{help=-chan}%{+n}
 ### %b-chan%b <channel>
@@ -66,20 +66,20 @@
      made permanent unless a channel-file has been defined in the user
      file, in which case it's saved each time the userfile is, or by using
      .chansave.
-     
+
      %f*** IMPORTANT ***%f
-     
+
      This erases ALL information about the channel, including channel
      settings and channel records for users--%bEVERYTHING%b.
-     
+
      %bDO NOT%b use it to have the bot temporarily leave a channel.  This
      command is for abandoning a channel (e.g. the channel will have
      to be redefined and all user flags for that channel will have to
-     be redone. 
+     be redone.
 
      Even if you don't have chanfile defined, it will still erase
      all the channel records for users on the next userfile save.
-     
+
 See also: +chan, chansave, chanload, chanset, chaninfo
 %{help=-chrec}%{+m|m}
 ###  %b-chrec%b <handle> [channel]
@@ -128,7 +128,7 @@
    currently viewing in the console.  Different bans may be active
    on different channels.  If you specify a channel name, that
    channel will be used instead of your current console channel.
-   
+
 See also: -ban, +ban, console, set ban-time, stick, unstick
 %{help=invites}%{+lo|lo}
 ###  %binvites%b [[channel] wildcard]
@@ -171,13 +171,13 @@
    currently viewing in the console.  Different invites may be active
    on different channels.  If you specify a channel name, that
    channel will be used instead of your current console channel.
-   
+
 See also: -invite, +invite, console, set invite-time, stick, unstick
 %{help=exempts}%{+lo|lo}
 ###  %bexempts%b [[channel] wildcard]
 ###  %bexempts%b all
-   Shows you a list of the global ban exemptions active on the current 
-   channel, and the list of channel-specific ban exemptions, as well 
+   Shows you a list of the global ban exemptions active on the current
+   channel, and the list of channel-specific ban exemptions, as well
    as any ban exemptions that are on the channel but weren't placed by
    the bot.
 
@@ -190,7 +190,7 @@
    exempted. The "(perm)" means that the ban exemption is "permanent":
    that is, it doesn't automatically expire.  If there is an elapsed time
    showing instead, the time displayed is how long the ban exemption has
-   been active.  Those kind of ban exemptions expire after one hour.  The 
+   been active.  Those kind of ban exemptions expire after one hour.  The
    second line of the ban exemption entry is the comment ("revolving check
    policy" -- it would seem that paulie had to stand in line for a while)
    and who put the ban exemption there (paulie).  The last line shows when
@@ -207,7 +207,7 @@
    will show you every ban exemption in memory (with 'perm-exempts' on,
    these are identical).
 
-   If you use 'exempts <wildcard>' it will list all the ban exemptions 
+   If you use 'exempts <wildcard>' it will list all the ban exemptions
    (active or not) that match against your wildcard.  Consider it a 'exempts
    all' list matched against your wildcard.
 
@@ -215,11 +215,11 @@
    currently viewing in the console.  Different ban exemptions may be active
    on different channels.  If you specify a channel name, that
    channel will be used instead of your current console channel.
-   
+
 See also: -exempt, +exempt, console, set exempt-time, stick, unstick
 %{help=chanload}%{+n|n}
 ###  %bchanload%b
-     Reloads the channel settings from the file defined by the 
+     Reloads the channel settings from the file defined by the
      %b"chanfile"%b setting.  This allows you to return to
      a previous setting if you've really messed things up.
 See also: %{+n}+chan, -chan,%{+N} chanload, chanset, chaninfo
@@ -234,13 +234,13 @@
 ###  %bchansave%b
      Saves the channel settings to the file defined by the %b"chanfile"%b
      setting.  This file is reloaded during rehash and restarting the bot.
-     This allows you to change channel modes without having to edit the 
+     This allows you to change channel modes without having to edit the
      config file every time.
 See also: %{+n}+chan, -chan%{+N} chanload, chanset, chaninfo
 %{help=chinfo}%{+m|m}
 ###  %bchinfo%b <user> [channel] [info-line]
    Sets the information line for a user.  This line is shown via /msg
-   commands %b'who'%b and %b'whois'%b, and if you have set greet on, it is 
+   commands %b'who'%b and %b'whois'%b, and if you have set greet on, it is
    shown when a user joins the channel.  If the info line begins with a
    '@', then it is "locked", and that user may no longer change it.
    If the channel name is omitted, the default info line is changed.
@@ -263,14 +263,14 @@
 %{help=stick}%{+ol|ol}
 ###  %bstick%b [ban/exempt/invite] <hostmask OR number> [channel]
    makes a ban/exempt/invite "sticky" -- meaning the bot will
-   always try to keep it active on the channel, even if the 
+   always try to keep it active on the channel, even if the
    channel is using dynamic bans.  obviously if the channel isn't
    using dynamic bans, this has no effect.
 see also: bans, exempts, invites, unstick, +ban, +exempt, +invite
 %{help=unstick}%{+ol|ol}
 ###  %bunstick%b [ban/exempt/invite] <hostmask OR number> [channel]
    turns a "sticky" ban/exempt/invite normal again.
-   
+
 see also: bans, exempts, invites, stick, -ban, -exempt, -invite
 %{help=channels module}%{+n}
 ###  help on the %bchannels module%b
@@ -278,7 +278,7 @@
    information about users, it DOES NOT provide the means
    for sitting on a channel (this is in the irc module).
    The following commands are provided by the channels module:
-      %binfo%b 
+      %binfo%b
 %{+lo|lo}
    for channel ops or halfops:
       %b+ban%b      %b-ban%b      %bbans%b      %bstick%b
@@ -295,7 +295,7 @@
       %b+chan%b     %b-chan%b
    Tcl variables for configuring the channels module:
      %bshare-greet%b  %buse-info%b    %bban-time%b
-     %bexempt-time%b  %binvite-time%b %bchanfile%b     
+     %bexempt-time%b  %binvite-time%b %bchanfile%b
    (Use %b'.help set <variable>'%b for more info)
 %{help=all}%{+n}
 ###  commands for the %bchannels module%b
Index: eggdrop1.6/src/mod/channels.mod/help/set/channels.help
diff -u eggdrop1.6/src/mod/channels.mod/help/set/channels.help:1.3 eggdrop1.6/src/mod/channels.mod/help/set/channels.help:1.4
--- eggdrop1.6/src/mod/channels.mod/help/set/channels.help:1.3	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/channels.mod/help/set/channels.help	Tue Jan 28 23:48:41 2003
@@ -32,7 +32,7 @@
 %{help=set chanfile}
 %{+n}
 ###  %bset chanfile%b
-   this sets the file used to store dynamic channel information 
+   this sets the file used to store dynamic channel information
    for the bot.  it can only be set in the config file.
 %{help=set quiet-save}
 %{+n}
Index: eggdrop1.6/src/mod/channels.mod/tclchan.c
diff -u eggdrop1.6/src/mod/channels.mod/tclchan.c:1.70 eggdrop1.6/src/mod/channels.mod/tclchan.c:1.71
--- eggdrop1.6/src/mod/channels.mod/tclchan.c:1.70	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/channels.mod/tclchan.c	Tue Jan 28 23:48:41 2003
@@ -1,7 +1,7 @@
 /*
  * tclchan.c -- part of channels.mod
  *
- * $Id: tclchan.c,v 1.70 2003/01/28 06:37:25 wcc Exp $
+ * $Id: tclchan.c,v 1.71 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -31,7 +31,8 @@
     for (chan = chanset; chan; chan = chan->next)
       add_mode(chan, '-', 'b', argv[1]);
     Tcl_AppendResult(irp, "1", NULL);
-  } else
+  }
+  else
     Tcl_AppendResult(irp, "0", NULL);
   return TCL_OK;
 }
@@ -49,7 +50,8 @@
   if (u_delban(chan, argv[2], 1) > 0) {
     add_mode(chan, '-', 'b', argv[2]);
     Tcl_AppendResult(irp, "1", NULL);
-  } else
+  }
+  else
     Tcl_AppendResult(irp, "0", NULL);
   return TCL_OK;
 }
@@ -59,11 +61,12 @@
   struct chanset_t *chan;
 
   BADARGS(2, 2, " exempt");
-  if (u_delexempt(NULL,argv[1],1) > 0) {
+  if (u_delexempt(NULL, argv[1], 1) > 0) {
     for (chan = chanset; chan; chan = chan->next)
       add_mode(chan, '-', 'e', argv[1]);
     Tcl_AppendResult(irp, "1", NULL);
-  } else
+  }
+  else
     Tcl_AppendResult(irp, "0", NULL);
   return TCL_OK;
 }
@@ -78,10 +81,11 @@
     Tcl_AppendResult(irp, "invalid channel: ", argv[1], NULL);
     return TCL_ERROR;
   }
-  if (u_delexempt(chan, argv[2],1) > 0) {
+  if (u_delexempt(chan, argv[2], 1) > 0) {
     add_mode(chan, '-', 'e', argv[2]);
     Tcl_AppendResult(irp, "1", NULL);
-  } else
+  }
+  else
     Tcl_AppendResult(irp, "0", NULL);
   return TCL_OK;
 }
@@ -91,11 +95,12 @@
   struct chanset_t *chan;
 
   BADARGS(2, 2, " invite");
-  if (u_delinvite(NULL,argv[1],1) > 0) {
+  if (u_delinvite(NULL, argv[1], 1) > 0) {
     for (chan = chanset; chan; chan = chan->next)
       add_mode(chan, '-', 'I', argv[1]);
     Tcl_AppendResult(irp, "1", NULL);
-  } else
+  }
+  else
     Tcl_AppendResult(irp, "0", NULL);
   return TCL_OK;
 }
@@ -110,11 +115,12 @@
     Tcl_AppendResult(irp, "invalid channel: ", argv[1], NULL);
     return TCL_ERROR;
   }
-  if (u_delinvite(chan, argv[2],1) > 0) {
+  if (u_delinvite(chan, argv[2], 1) > 0) {
     add_mode(chan, '-', 'I', argv[2]);
     Tcl_AppendResult(irp, "1", NULL);
-   } else
-     Tcl_AppendResult(irp, "0", NULL);
+  }
+  else
+    Tcl_AppendResult(irp, "0", NULL);
   return TCL_OK;
 }
 
@@ -133,8 +139,8 @@
     if (u_setsticky_ban(chan, argv[1], !strncmp(argv[0], "un", 2) ? 0 : 1))
       ok = 1;
   }
-  if (!ok && u_setsticky_ban(NULL, argv[1],
-      !strncmp(argv[0], "un", 2) ? 0 : 1))
+  if (!ok && u_setsticky_ban(NULL, argv[1], !strncmp(argv[0], "un", 2) ?
+      0 : 1))
     ok = 1;
   if (ok)
     Tcl_AppendResult(irp, "1", NULL);
@@ -158,8 +164,8 @@
     if (u_setsticky_invite(chan, argv[1], !strncmp(argv[0], "un", 2) ? 0 : 1))
       ok = 1;
   }
-  if (!ok && u_setsticky_invite(NULL, argv[1],
-      !strncmp(argv[0], "un", 2) ? 0 : 1))
+  if (!ok && u_setsticky_invite(NULL, argv[1], !strncmp(argv[0], "un", 2) ?
+      0 : 1))
     ok = 1;
   if (ok)
     Tcl_AppendResult(irp, "1", NULL);
@@ -183,8 +189,8 @@
     if (u_setsticky_exempt(chan, argv[1], !strncmp(argv[0], "un", 2) ? 0 : 1))
       ok = 1;
   }
-  if (!ok && u_setsticky_exempt(NULL, argv[1],
-      !strncmp(argv[0], "un", 2) ? 0 : 1))
+  if (!ok && u_setsticky_exempt(NULL, argv[1], !strncmp(argv[0], "un", 2) ?
+      0 : 1))
     ok = 1;
   if (ok)
     Tcl_AppendResult(irp, "1", NULL);
@@ -232,7 +238,7 @@
     if (u_equals_mask(chan->exempts, argv[1]))
       ok = 1;
   }
-  if (u_equals_mask(global_exempts,argv[1]))
+  if (u_equals_mask(global_exempts, argv[1]))
     ok = 1;
   if (ok)
     Tcl_AppendResult(irp, "1", NULL);
@@ -256,7 +262,7 @@
     if (u_equals_mask(chan->invites, argv[1]))
       ok = 1;
   }
-  if (u_equals_mask(global_invites,argv[1]))
+  if (u_equals_mask(global_invites, argv[1]))
     ok = 1;
   if (ok)
     Tcl_AppendResult(irp, "1", NULL);
@@ -305,10 +311,10 @@
     if (u_sticky_mask(chan->exempts, argv[1]))
       ok = 1;
   }
-  if (u_sticky_mask(global_exempts,argv[1]))
+  if (u_sticky_mask(global_exempts, argv[1]))
     ok = 1;
   if (ok)
-       Tcl_AppendResult(irp, "1", NULL);
+    Tcl_AppendResult(irp, "1", NULL);
   else
     Tcl_AppendResult(irp, "0", NULL);
   return TCL_OK;
@@ -329,12 +335,12 @@
     if (u_sticky_mask(chan->invites, argv[1]))
       ok = 1;
   }
-  if (u_sticky_mask(global_invites,argv[1]))
+  if (u_sticky_mask(global_invites, argv[1]))
     ok = 1;
   if (ok)
     Tcl_AppendResult(irp, "1", NULL);
   else
-       Tcl_AppendResult(irp, "0", NULL);
+    Tcl_AppendResult(irp, "0", NULL);
   return TCL_OK;
 }
 
@@ -377,12 +383,12 @@
     if (u_equals_mask(chan->exempts, argv[1]) == 2)
       ok = 1;
   }
-  if (u_equals_mask(global_exempts,argv[1]) == 2)
+  if (u_equals_mask(global_exempts, argv[1]) == 2)
     ok = 1;
   if (ok)
     Tcl_AppendResult(irp, "1", NULL);
-   else
-     Tcl_AppendResult(irp, "0", NULL);
+  else
+    Tcl_AppendResult(irp, "0", NULL);
   return TCL_OK;
 }
 
@@ -401,7 +407,7 @@
     if (u_equals_mask(chan->invites, argv[1]) == 2)
       ok = 1;
   }
-  if (u_equals_mask(global_invites,argv[1]) == 2)
+  if (u_equals_mask(global_invites, argv[1]) == 2)
     ok = 1;
   if (ok)
     Tcl_AppendResult(irp, "1", NULL);
@@ -449,7 +455,7 @@
     if (u_match_mask(chan->exempts, argv[1]))
       ok = 1;
   }
-  if (u_match_mask(global_exempts,argv[1]))
+  if (u_match_mask(global_exempts, argv[1]))
     ok = 1;
   if (ok)
     Tcl_AppendResult(irp, "1", NULL);
@@ -473,7 +479,7 @@
     if (u_match_mask(chan->invites, argv[1]))
       ok = 1;
   }
-  if (u_match_mask(global_invites,argv[1]))
+  if (u_match_mask(global_invites, argv[1]))
     ok = 1;
   if (ok)
     Tcl_AppendResult(irp, "1", NULL);
@@ -502,7 +508,7 @@
       sticky = 1;
     else {
       Tcl_AppendResult(irp, "invalid option ", argv[6], " (must be one of: ",
-		       "sticky, none)", NULL);
+                       "sticky, none)", NULL);
       return TCL_ERROR;
     }
   }
@@ -523,7 +529,7 @@
   }
   if (u_addban(chan, ban, from, cmt, expire_time, sticky))
     if ((me = module_find("irc", 0, 0)))
-      (me->funcs[IRC_CHECK_THIS_BAN])(chan, ban, sticky);
+      (me->funcs[IRC_CHECK_THIS_BAN]) (chan, ban, sticky);
   return TCL_OK;
 }
 
@@ -542,7 +548,7 @@
       sticky = 1;
     else {
       Tcl_AppendResult(irp, "invalid option ", argv[5], " (must be one of: ",
-		       "sticky, none)", NULL);
+                       "sticky, none)", NULL);
       return TCL_ERROR;
     }
   }
@@ -564,7 +570,7 @@
   if (u_addban(NULL, ban, from, cmt, expire_time, sticky))
     if ((me = module_find("irc", 0, 0)))
       for (chan = chanset; chan != NULL; chan = chan->next)
-	(me->funcs[IRC_CHECK_THIS_BAN])(chan, ban, sticky);
+        (me->funcs[IRC_CHECK_THIS_BAN]) (chan, ban, sticky);
   return TCL_OK;
 }
 
@@ -587,7 +593,7 @@
       sticky = 1;
     else {
       Tcl_AppendResult(irp, "invalid option ", argv[6], " (must be one of: ",
-		       "sticky, none)", NULL);
+                       "sticky, none)", NULL);
       return TCL_ERROR;
     }
   }
@@ -606,8 +612,8 @@
     else
       expire_time = now + (atoi(argv[5]) * 60);
   }
-  if (u_addexempt(chan, exempt, from, cmt, expire_time,sticky))
-      add_mode(chan, '+', 'e', exempt);
+  if (u_addexempt(chan, exempt, from, cmt, expire_time, sticky))
+    add_mode(chan, '+', 'e', exempt);
   return TCL_OK;
 }
 
@@ -625,7 +631,7 @@
       sticky = 1;
     else {
       Tcl_AppendResult(irp, "invalid option ", argv[5], " (must be one of: ",
-		       "sticky, none)", NULL);
+                       "sticky, none)", NULL);
       return TCL_ERROR;
     }
   }
@@ -644,9 +650,9 @@
     else
       expire_time = now + (atoi(argv[4]) * 60);
   }
-  u_addexempt(NULL,exempt, from, cmt, expire_time,sticky);
+  u_addexempt(NULL, exempt, from, cmt, expire_time, sticky);
   for (chan = chanset; chan; chan = chan->next)
-      add_mode(chan, '+', 'e', exempt);
+    add_mode(chan, '+', 'e', exempt);
   return TCL_OK;
 }
 
@@ -669,7 +675,7 @@
       sticky = 1;
     else {
       Tcl_AppendResult(irp, "invalid option ", argv[6], " (must be one of: ",
-		       "sticky, none)", NULL);
+                       "sticky, none)", NULL);
       return TCL_ERROR;
     }
   }
@@ -688,8 +694,8 @@
     else
       expire_time = now + (atoi(argv[5]) * 60);
   }
-  if (u_addinvite(chan, invite, from, cmt, expire_time,sticky))
-      add_mode(chan, '+', 'I', invite);
+  if (u_addinvite(chan, invite, from, cmt, expire_time, sticky))
+    add_mode(chan, '+', 'I', invite);
   return TCL_OK;
 }
 
@@ -707,7 +713,7 @@
       sticky = 1;
     else {
       Tcl_AppendResult(irp, "invalid option ", argv[5], " (must be one of: ",
-		       "sticky, none)", NULL);
+                       "sticky, none)", NULL);
       return TCL_ERROR;
     }
   }
@@ -726,15 +732,16 @@
     else
       expire_time = now + (atoi(argv[4]) * 60);
   }
-  u_addinvite(NULL,invite, from, cmt, expire_time,sticky);
+  u_addinvite(NULL, invite, from, cmt, expire_time, sticky);
   for (chan = chanset; chan; chan = chan->next)
-      add_mode(chan, '+', 'I', invite);
+    add_mode(chan, '+', 'I', invite);
   return TCL_OK;
 }
 
 static int tcl_channel_info(Tcl_Interp *irp, struct chanset_t *chan)
 {
   char a[121], b[121], s[121];
+
 #if (((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)) || (TCL_MAJOR_VERSION > 8))
   CONST char *args[2];
 #else
@@ -819,7 +826,7 @@
     Tcl_AppendElement(irp, "+dontkickops");
   else
     Tcl_AppendElement(irp, "-dontkickops");
-  if (chan->status& CHAN_INACTIVE)
+  if (chan->status & CHAN_INACTIVE)
     Tcl_AppendElement(irp, "+inactive");
   else
     Tcl_AppendElement(irp, "-inactive");
@@ -855,19 +862,19 @@
     Tcl_AppendElement(irp, "+seen");
   else
     Tcl_AppendElement(irp, "-seen");
-  if (chan->ircnet_status& CHAN_DYNAMICEXEMPTS)
+  if (chan->ircnet_status & CHAN_DYNAMICEXEMPTS)
     Tcl_AppendElement(irp, "+dynamicexempts");
   else
     Tcl_AppendElement(irp, "-dynamicexempts");
-  if (chan->ircnet_status& CHAN_NOUSEREXEMPTS)
+  if (chan->ircnet_status & CHAN_NOUSEREXEMPTS)
     Tcl_AppendElement(irp, "-userexempts");
   else
     Tcl_AppendElement(irp, "+userexempts");
-  if (chan->ircnet_status& CHAN_DYNAMICINVITES)
+  if (chan->ircnet_status & CHAN_DYNAMICINVITES)
     Tcl_AppendElement(irp, "+dynamicinvites");
   else
     Tcl_AppendElement(irp, "-dynamicinvites");
-  if (chan->ircnet_status& CHAN_NOUSERINVITES)
+  if (chan->ircnet_status & CHAN_NOUSERINVITES)
     Tcl_AppendElement(irp, "-userinvites");
   else
     Tcl_AppendElement(irp, "+userinvites");
@@ -876,27 +883,31 @@
   else
     Tcl_AppendElement(irp, "-nodesynch");
   for (ul = udef; ul; ul = ul->next) {
-      /* If it's undefined, skip it. */
-      if (!ul->defined || !ul->name) continue;
-
-      if (ul->type == UDEF_FLAG) {
-        simple_sprintf(s, "%c%s", getudef(ul->values, chan->dname) ? '+' : '-',
-		       ul->name);
-        Tcl_AppendElement(irp, s);
-      } else if (ul->type == UDEF_INT) {
-        egg_snprintf(a, sizeof a, "%s", ul->name);
-        egg_snprintf(b, sizeof b, "%d", getudef(ul->values, chan->dname));
-        args[0] = a;
-        args[1] = b;
-        egg_snprintf(s, sizeof s, "%s", Tcl_Merge(2, args));
-        Tcl_AppendElement(irp, s);
-      } else
-        debug1("UDEF-ERROR: unknown type %d", ul->type);
+    /* If it's undefined, skip it. */
+    if (!ul->defined || !ul->name)
+      continue;
+
+    if (ul->type == UDEF_FLAG) {
+      simple_sprintf(s, "%c%s", getudef(ul->values, chan->dname) ? '+' : '-',
+                     ul->name);
+      Tcl_AppendElement(irp, s);
+    }
+    else if (ul->type == UDEF_INT) {
+      egg_snprintf(a, sizeof a, "%s", ul->name);
+      egg_snprintf(b, sizeof b, "%d", getudef(ul->values, chan->dname));
+      args[0] = a;
+      args[1] = b;
+      egg_snprintf(s, sizeof s, "%s", Tcl_Merge(2, args));
+      Tcl_AppendElement(irp, s);
     }
+    else
+      debug1("UDEF-ERROR: unknown type %d", ul->type);
+  }
   return TCL_OK;
 }
 
-static int tcl_channel_get(Tcl_Interp *irp, struct chanset_t *chan, char *setting)
+static int tcl_channel_get(Tcl_Interp *irp, struct chanset_t *chan,
+                           char *setting)
 {
   char s[121];
   struct udef_struct *ul;
@@ -911,76 +922,110 @@
                             if (z & x) simple_sprintf(s, "%d", 0); \
                             else simple_sprintf(s, "%d", 1); }
 
-  if      (CHECK("chanmode"))      get_mode_protect(chan, s);
+  if (CHECK("chanmode"))
+    get_mode_protect(chan, s);
 
-  /* Code in need_op can be longer than 120 chars, so we have to cut it.*/
-  else if (CHECK("need-op"))     { strncpy(s, chan->need_op, 120); s[120] = 0;     }
-  else if (CHECK("need-invite")) { strncpy(s, chan->need_invite, 120); s[120] = 0; }
-  else if (CHECK("need-key"))    { strncpy(s, chan->need_key, 120); s[120] = 0;    }
-  else if (CHECK("need-unban"))  { strncpy(s, chan->need_unban, 120); s[120] = 0;  }
-  else if (CHECK("need-limit"))  { strncpy(s, chan->need_limit, 120); s[120] = 0;  }
-
-  else if (CHECK("idle-kick"))     simple_sprintf(s, "%d", chan->idle_kick);
-  else if (CHECK("stop-net-hack")) simple_sprintf(s, "%d", chan->stopnethack_mode);
-  else if (CHECK("revenge-mode"))  simple_sprintf(s, "%d", chan->revenge_mode);
-  else if (CHECK("ban-time"))  simple_sprintf(s, "%d", chan->ban_time);
-  else if (CHECK("exempt-time"))  simple_sprintf(s, "%d", chan->exempt_time);
-  else if (CHECK("invite-time"))  simple_sprintf(s, "%d", chan->invite_time);
-  else if (CHECK("flood-pub"))     simple_sprintf(s, "%d %d", chan->flood_pub_thr, chan->flood_pub_time);
-  else if (CHECK("flood-ctcp"))    simple_sprintf(s, "%d %d", chan->flood_ctcp_thr, chan->flood_ctcp_time);
-  else if (CHECK("flood-join"))    simple_sprintf(s, "%d %d", chan->flood_join_thr, chan->flood_join_time);
-  else if (CHECK("flood-kick"))    simple_sprintf(s, "%d %d", chan->flood_kick_thr, chan->flood_kick_time);
-  else if (CHECK("flood-deop"))    simple_sprintf(s, "%d %d", chan->flood_deop_thr, chan->flood_deop_time);
-  else if (CHECK("flood-nick"))    simple_sprintf(s, "%d %d", chan->flood_nick_thr, chan->flood_nick_time);
-  else if (CHECK("aop-delay"))     simple_sprintf(s, "%d %d", chan->aop_min, chan->aop_max);
-
-  else if CHKFLAG_POS(CHAN_ENFORCEBANS,    "enforcebans",    chan->status)
-  else if CHKFLAG_POS(CHAN_DYNAMICBANS,    "dynamicbans",    chan->status)
-  else if CHKFLAG_NEG(CHAN_NOUSERBANS,     "userbans",       chan->status)
-  else if CHKFLAG_POS(CHAN_OPONJOIN,       "autoop",         chan->status)
-  else if CHKFLAG_POS(CHAN_AUTOHALFOP,     "autohalfop",     chan->status)
-  else if CHKFLAG_POS(CHAN_BITCH,          "bitch",          chan->status)
-  else if CHKFLAG_POS(CHAN_GREET,          "greet",          chan->status)
-  else if CHKFLAG_POS(CHAN_PROTECTOPS,     "protectops",     chan->status)
+  /* Code in need_op can be longer than 120 chars, so we have to cut it. */
+  else if (CHECK("need-op")) {
+    strncpy(s, chan->need_op, 120);
+    s[120] = 0;
+  }
+  else if (CHECK("need-invite")) {
+    strncpy(s, chan->need_invite, 120);
+    s[120] = 0;
+  }
+  else if (CHECK("need-key")) {
+    strncpy(s, chan->need_key, 120);
+    s[120] = 0;
+  }
+  else if (CHECK("need-unban")) {
+    strncpy(s, chan->need_unban, 120);
+    s[120] = 0;
+  }
+  else if (CHECK("need-limit")) {
+    strncpy(s, chan->need_limit, 120);
+    s[120] = 0;
+  }
+
+  else if (CHECK("idle-kick"))
+    simple_sprintf(s, "%d", chan->idle_kick);
+  else if (CHECK("stop-net-hack"))
+    simple_sprintf(s, "%d", chan->stopnethack_mode);
+  else if (CHECK("revenge-mode"))
+    simple_sprintf(s, "%d", chan->revenge_mode);
+  else if (CHECK("ban-time"))
+    simple_sprintf(s, "%d", chan->ban_time);
+  else if (CHECK("exempt-time"))
+    simple_sprintf(s, "%d", chan->exempt_time);
+  else if (CHECK("invite-time"))
+    simple_sprintf(s, "%d", chan->invite_time);
+  else if (CHECK("flood-pub"))
+    simple_sprintf(s, "%d %d", chan->flood_pub_thr, chan->flood_pub_time);
+  else if (CHECK("flood-ctcp"))
+    simple_sprintf(s, "%d %d", chan->flood_ctcp_thr, chan->flood_ctcp_time);
+  else if (CHECK("flood-join"))
+    simple_sprintf(s, "%d %d", chan->flood_join_thr, chan->flood_join_time);
+  else if (CHECK("flood-kick"))
+    simple_sprintf(s, "%d %d", chan->flood_kick_thr, chan->flood_kick_time);
+  else if (CHECK("flood-deop"))
+    simple_sprintf(s, "%d %d", chan->flood_deop_thr, chan->flood_deop_time);
+  else if (CHECK("flood-nick"))
+    simple_sprintf(s, "%d %d", chan->flood_nick_thr, chan->flood_nick_time);
+  else if (CHECK("aop-delay"))
+    simple_sprintf(s, "%d %d", chan->aop_min, chan->aop_max);
+
+  else if CHKFLAG_POS(CHAN_ENFORCEBANS, "enforcebans", chan->status)
+  else if CHKFLAG_POS(CHAN_DYNAMICBANS, "dynamicbans", chan->status)
+  else if CHKFLAG_NEG(CHAN_NOUSERBANS, "userbans", chan->status)
+  else if CHKFLAG_POS(CHAN_OPONJOIN, "autoop", chan->status)
+  else if CHKFLAG_POS(CHAN_AUTOHALFOP, "autohalfop", chan->status)
+  else if CHKFLAG_POS(CHAN_BITCH, "bitch", chan->status)
+  else if CHKFLAG_POS(CHAN_GREET, "greet", chan->status)
+  else if CHKFLAG_POS(CHAN_PROTECTOPS, "protectops", chan->status)
   else if CHKFLAG_POS(CHAN_PROTECTHALFOPS, "protecthalfops", chan->status)
   else if CHKFLAG_POS(CHAN_PROTECTFRIENDS, "protectfriends", chan->status)
-  else if CHKFLAG_POS(CHAN_DONTKICKOPS,    "dontkickops",    chan->status)
-  else if CHKFLAG_POS(CHAN_INACTIVE,       "inactive",       chan->status)
-  else if CHKFLAG_POS(CHAN_LOGSTATUS,      "statuslog",      chan->status)
-  else if CHKFLAG_POS(CHAN_REVENGE,        "revenge",        chan->status)
-  else if CHKFLAG_POS(CHAN_REVENGEBOT,     "revengebot",     chan->status)
-  else if CHKFLAG_POS(CHAN_SECRET,         "secret",         chan->status)
-  else if CHKFLAG_POS(CHAN_SHARED,         "shared",         chan->status)
-  else if CHKFLAG_POS(CHAN_AUTOVOICE,      "autovoice",      chan->status)
-  else if CHKFLAG_POS(CHAN_CYCLE,          "cycle",          chan->status)
-  else if CHKFLAG_POS(CHAN_SEEN,           "seen",           chan->status)
-  else if CHKFLAG_POS(CHAN_NODESYNCH,      "nodesynch",      chan->status)
-
-  else if CHKFLAG_POS(CHAN_DYNAMICEXEMPTS, "dynamicexempts", chan->ircnet_status)
-  else if CHKFLAG_NEG(CHAN_NOUSEREXEMPTS,  "userexempts",    chan->ircnet_status)
-  else if CHKFLAG_POS(CHAN_DYNAMICINVITES, "dynamicinvites", chan->ircnet_status)
-  else if CHKFLAG_NEG(CHAN_NOUSERINVITES,  "userinvites",    chan->ircnet_status)
+  else if CHKFLAG_POS(CHAN_DONTKICKOPS, "dontkickops", chan->status)
+  else if CHKFLAG_POS(CHAN_INACTIVE, "inactive", chan->status)
+  else if CHKFLAG_POS(CHAN_LOGSTATUS, "statuslog", chan->status)
+  else if CHKFLAG_POS(CHAN_REVENGE, "revenge", chan->status)
+  else if CHKFLAG_POS(CHAN_REVENGEBOT, "revengebot", chan->status)
+  else if CHKFLAG_POS(CHAN_SECRET, "secret", chan->status)
+  else if CHKFLAG_POS(CHAN_SHARED, "shared", chan->status)
+  else if CHKFLAG_POS(CHAN_AUTOVOICE, "autovoice", chan->status)
+  else if CHKFLAG_POS(CHAN_CYCLE, "cycle", chan->status)
+  else if CHKFLAG_POS(CHAN_SEEN, "seen", chan->status)
+  else if CHKFLAG_POS(CHAN_NODESYNCH, "nodesynch", chan->status)
+
+  else if CHKFLAG_POS(CHAN_DYNAMICEXEMPTS, "dynamicexempts",
+                      chan->ircnet_status)
+  else if CHKFLAG_NEG(CHAN_NOUSEREXEMPTS, "userexempts",
+                      chan->ircnet_status)
+  else if CHKFLAG_POS(CHAN_DYNAMICINVITES, "dynamicinvites",
+                      chan->ircnet_status)
+  else if CHKFLAG_NEG(CHAN_NOUSERINVITES, "userinvites",
+                      chan->ircnet_status)
 
   else {
     /* Hopefully it's a user-defined flag. */
     for (ul = udef; ul && ul->name; ul = ul->next) {
-      if (!strcmp(setting, ul->name)) break;
+      if (!strcmp(setting, ul->name))
+        break;
     }
     if (!ul || !ul->name) {
       /* Error if it wasn't found. */
       Tcl_AppendResult(irp, "Unknown channel setting.", NULL);
-      return(TCL_ERROR);
+      return TCL_ERROR;
     }
 
     /* Flag or int, all the same. */
     simple_sprintf(s, "%d", getudef(ul->values, chan->dname));
     Tcl_AppendResult(irp, s, NULL);
-    return(TCL_OK);
+    return TCL_OK;
   }
 
   /* Ok, if we make it this far, the result is "s". */
   Tcl_AppendResult(irp, s, NULL);
-  return(TCL_OK);
+  return TCL_OK;
 }
 
 
@@ -1000,9 +1045,9 @@
     chan = findchan_by_dname(argv[2]);
     if (chan == NULL) {
       if (chan_hack == 1)
-	return TCL_OK;		/* Ignore channel settings for a static
-				 * channel which has been removed from
-				 * the config */
+        return TCL_OK;          /* Ignore channel settings for a static
+                                 * channel which has been removed from
+                                 * the config */
       Tcl_AppendResult(irp, "no such channel record", NULL);
       return TCL_ERROR;
     }
@@ -1015,7 +1060,7 @@
       Tcl_AppendResult(irp, "no such channel record", NULL);
       return TCL_ERROR;
     }
-    return(tcl_channel_get(irp, chan, argv[3]));
+    return (tcl_channel_get(irp, chan, argv[3]));
   }
   if (!strcmp(argv[1], "info")) {
     BADARGS(3, 3, " info channel-name");
@@ -1037,17 +1082,16 @@
     return TCL_OK;
   }
   Tcl_AppendResult(irp, "unknown channel command: should be one of: ",
-		   "add, set, get, info, remove", NULL);
+                   "add, set, get, info, remove", NULL);
   return TCL_ERROR;
 }
 
 /* Parse options for a channel.
  */
 static int tcl_channel_modify(Tcl_Interp *irp, struct chanset_t *chan,
-			      int items, char **item)
+                              int items, char **item)
 {
-  int i, x = 0, found,
-      old_status = chan->status,
+  int i, x = 0, found, old_status = chan->status,
       old_mode_mns_prot = chan->mode_mns_prot,
       old_mode_pls_prot = chan->mode_pls_prot;
   struct udef_struct *ul = udef;
@@ -1058,77 +1102,86 @@
     if (!strcmp(item[i], "need-op")) {
       i++;
       if (i >= items) {
-	if (irp)
-	  Tcl_AppendResult(irp, "channel need-op needs argument", NULL);
-	return TCL_ERROR;
+        if (irp)
+          Tcl_AppendResult(irp, "channel need-op needs argument", NULL);
+        return TCL_ERROR;
       }
       strncpy(chan->need_op, item[i], 120);
       chan->need_op[120] = 0;
-    } else if (!strcmp(item[i], "need-invite")) {
+    }
+    else if (!strcmp(item[i], "need-invite")) {
       i++;
       if (i >= items) {
-	if (irp)
-	  Tcl_AppendResult(irp, "channel need-invite needs argument", NULL);
-	return TCL_ERROR;
+        if (irp)
+          Tcl_AppendResult(irp, "channel need-invite needs argument", NULL);
+        return TCL_ERROR;
       }
       strncpy(chan->need_invite, item[i], 120);
       chan->need_invite[120] = 0;
-    } else if (!strcmp(item[i], "need-key")) {
+    }
+    else if (!strcmp(item[i], "need-key")) {
       i++;
       if (i >= items) {
-	if (irp)
-	  Tcl_AppendResult(irp, "channel need-key needs argument", NULL);
-	return TCL_ERROR;
+        if (irp)
+          Tcl_AppendResult(irp, "channel need-key needs argument", NULL);
+        return TCL_ERROR;
       }
       strncpy(chan->need_key, item[i], 120);
       chan->need_key[120] = 0;
-    } else if (!strcmp(item[i], "need-limit")) {
+    }
+    else if (!strcmp(item[i], "need-limit")) {
       i++;
       if (i >= items) {
-	if (irp)
-	  Tcl_AppendResult(irp, "channel need-limit needs argument", NULL);
-	return TCL_ERROR;
+        if (irp)
+          Tcl_AppendResult(irp, "channel need-limit needs argument", NULL);
+        return TCL_ERROR;
       }
       strncpy(chan->need_limit, item[i], 120);
       chan->need_limit[120] = 0;
-    } else if (!strcmp(item[i], "need-unban")) {
+    }
+    else if (!strcmp(item[i], "need-unban")) {
       i++;
       if (i >= items) {
-	if (irp)
-	  Tcl_AppendResult(irp, "channel need-unban needs argument", NULL);
-	return TCL_ERROR;
+        if (irp)
+          Tcl_AppendResult(irp, "channel need-unban needs argument", NULL);
+        return TCL_ERROR;
       }
       strncpy(chan->need_unban, item[i], 120);
       chan->need_unban[120] = 0;
-    } else if (!strcmp(item[i], "chanmode")) {
+    }
+    else if (!strcmp(item[i], "chanmode")) {
       i++;
       if (i >= items) {
-	if (irp)
-	  Tcl_AppendResult(irp, "channel chanmode needs argument", NULL);
-	return TCL_ERROR;
+        if (irp)
+          Tcl_AppendResult(irp, "channel chanmode needs argument", NULL);
+        return TCL_ERROR;
       }
       strncpy(s, item[i], 120);
       s[120] = 0;
       set_mode_protect(chan, s);
-    } else if (!strcmp(item[i], "idle-kick")) {
+    }
+    else if (!strcmp(item[i], "idle-kick")) {
       i++;
       if (i >= items) {
-	if (irp)
-	  Tcl_AppendResult(irp, "channel idle-kick needs argument", NULL);
-	return TCL_ERROR;
+        if (irp)
+          Tcl_AppendResult(irp, "channel idle-kick needs argument", NULL);
+        return TCL_ERROR;
       }
       chan->idle_kick = atoi(item[i]);
-    } else if (!strcmp(item[i], "dont-idle-kick"))
+    }
+    else if (!strcmp(item[i], "dont-idle-kick"))
       chan->idle_kick = 0;
     else if (!strcmp(item[i], "stopnethack-mode")) {
       i++;
       if (i >= items) {
-	if (irp)
-	  Tcl_AppendResult(irp, "channel stopnethack-mode needs argument", NULL);
-	return TCL_ERROR;
+        if (irp)
+          Tcl_AppendResult(irp, "channel stopnethack-mode needs argument",
+                           NULL);
+        return TCL_ERROR;
       }
       chan->stopnethack_mode = atoi(item[i]);
-    } else if (!strcmp(item[i], "revenge-mode")) {
+    }
+    else if (!strcmp(item[i], "revenge-mode")) {
       i++;
       if (i >= items) {
         if (irp)
@@ -1136,7 +1189,8 @@
         return TCL_ERROR;
       }
       chan->revenge_mode = atoi(item[i]);
-    } else if (!strcmp(item[i], "ban-time")) {
+    }
+    else if (!strcmp(item[i], "ban-time")) {
       i++;
       if (i >= items) {
         if (irp)
@@ -1144,7 +1198,8 @@
         return TCL_ERROR;
       }
       chan->ban_time = atoi(item[i]);
-    } else if (!strcmp(item[i], "exempt-time")) {
+    }
+    else if (!strcmp(item[i], "exempt-time")) {
       i++;
       if (i >= items) {
         if (irp)
@@ -1152,7 +1207,8 @@
         return TCL_ERROR;
       }
       chan->exempt_time = atoi(item[i]);
-    } else if (!strcmp(item[i], "invite-time")) {
+    }
+    else if (!strcmp(item[i], "invite-time")) {
       i++;
       if (i >= items) {
         if (irp)
@@ -1212,7 +1268,7 @@
     else if (!strcmp(item[i], "+inactive"))
       chan->status |= CHAN_INACTIVE;
     else if (!strcmp(item[i], "-inactive"))
-      chan->status&= ~CHAN_INACTIVE;
+      chan->status &= ~CHAN_INACTIVE;
     else if (!strcmp(item[i], "+statuslog"))
       chan->status |= CHAN_LOGSTATUS;
     else if (!strcmp(item[i], "-statuslog"))
@@ -1246,114 +1302,120 @@
     else if (!strcmp(item[i], "-seen"))
       chan->status &= ~CHAN_SEEN;
     else if (!strcmp(item[i], "+dynamicexempts"))
-      chan->ircnet_status|= CHAN_DYNAMICEXEMPTS;
+      chan->ircnet_status |= CHAN_DYNAMICEXEMPTS;
     else if (!strcmp(item[i], "-dynamicexempts"))
-      chan->ircnet_status&= ~CHAN_DYNAMICEXEMPTS;
+      chan->ircnet_status &= ~CHAN_DYNAMICEXEMPTS;
     else if (!strcmp(item[i], "-userexempts"))
-      chan->ircnet_status|= CHAN_NOUSEREXEMPTS;
+      chan->ircnet_status |= CHAN_NOUSEREXEMPTS;
     else if (!strcmp(item[i], "+userexempts"))
-      chan->ircnet_status&= ~CHAN_NOUSEREXEMPTS;
+      chan->ircnet_status &= ~CHAN_NOUSEREXEMPTS;
     else if (!strcmp(item[i], "+dynamicinvites"))
-      chan->ircnet_status|= CHAN_DYNAMICINVITES;
+      chan->ircnet_status |= CHAN_DYNAMICINVITES;
     else if (!strcmp(item[i], "-dynamicinvites"))
-      chan->ircnet_status&= ~CHAN_DYNAMICINVITES;
+      chan->ircnet_status &= ~CHAN_DYNAMICINVITES;
     else if (!strcmp(item[i], "-userinvites"))
-      chan->ircnet_status|= CHAN_NOUSERINVITES;
+      chan->ircnet_status |= CHAN_NOUSERINVITES;
     else if (!strcmp(item[i], "+userinvites"))
-      chan->ircnet_status&= ~CHAN_NOUSERINVITES;
+      chan->ircnet_status &= ~CHAN_NOUSERINVITES;
     /* ignore wasoptest, stopnethack and clearbans in chanfile, remove
-       this later */
-    else if (!strcmp(item[i], "-stopnethack"))  ;
-    else if (!strcmp(item[i], "+stopnethack"))  ;
-    else if (!strcmp(item[i], "-wasoptest"))  ;
-    else if (!strcmp(item[i], "+wasoptest"))  ;  /* Eule 01.2000 */
-    else if (!strcmp(item[i], "+clearbans"))  ;
-    else if (!strcmp(item[i], "-clearbans"))  ;
+     * this later */
+    else if (!strcmp(item[i], "-stopnethack"));
+    else if (!strcmp(item[i], "+stopnethack"));
+    else if (!strcmp(item[i], "-wasoptest"));
+    else if (!strcmp(item[i], "+wasoptest"));   /* Eule 01.2000 */
+    else if (!strcmp(item[i], "+clearbans"));
+    else if (!strcmp(item[i], "-clearbans"));
     else if (!strncmp(item[i], "flood-", 6)) {
       int *pthr = 0, *ptime;
       char *p;
 
       if (!strcmp(item[i] + 6, "chan")) {
-	pthr = &chan->flood_pub_thr;
-	ptime = &chan->flood_pub_time;
-      } else if (!strcmp(item[i] + 6, "join")) {
-	pthr = &chan->flood_join_thr;
-	ptime = &chan->flood_join_time;
-      } else if (!strcmp(item[i] + 6, "ctcp")) {
-	pthr = &chan->flood_ctcp_thr;
-	ptime = &chan->flood_ctcp_time;
-      } else if (!strcmp(item[i] + 6, "kick")) {
-	pthr = &chan->flood_kick_thr;
-	ptime = &chan->flood_kick_time;
-      } else if (!strcmp(item[i] + 6, "deop")) {
-	pthr = &chan->flood_deop_thr;
-	ptime = &chan->flood_deop_time;
-      } else if (!strcmp(item[i] + 6, "nick")) {
-	pthr = &chan->flood_nick_thr;
-	ptime = &chan->flood_nick_time;
-      } else {
-	if (irp)
-	  Tcl_AppendResult(irp, "illegal channel flood type: ", item[i], NULL);
-	return TCL_ERROR;
+        pthr = &chan->flood_pub_thr;
+        ptime = &chan->flood_pub_time;
+      }
+      else if (!strcmp(item[i] + 6, "join")) {
+        pthr = &chan->flood_join_thr;
+        ptime = &chan->flood_join_time;
+      }
+      else if (!strcmp(item[i] + 6, "ctcp")) {
+        pthr = &chan->flood_ctcp_thr;
+        ptime = &chan->flood_ctcp_time;
+      }
+      else if (!strcmp(item[i] + 6, "kick")) {
+        pthr = &chan->flood_kick_thr;
+        ptime = &chan->flood_kick_time;
+      }
+      else if (!strcmp(item[i] + 6, "deop")) {
+        pthr = &chan->flood_deop_thr;
+        ptime = &chan->flood_deop_time;
+      }
+      else if (!strcmp(item[i] + 6, "nick")) {
+        pthr = &chan->flood_nick_thr;
+        ptime = &chan->flood_nick_time;
+      }
+      else {
+        if (irp)
+          Tcl_AppendResult(irp, "illegal channel flood type: ", item[i], NULL);
+        return TCL_ERROR;
       }
       i++;
       if (i >= items) {
-	if (irp)
-	  Tcl_AppendResult(irp, item[i - 1], " needs argument", NULL);
-	return TCL_ERROR;
+        if (irp)
+          Tcl_AppendResult(irp, item[i - 1], " needs argument", NULL);
+        return TCL_ERROR;
       }
       p = strchr(item[i], ':');
       if (p) {
-	*p++ = 0;
-	*pthr = atoi(item[i]);
-	*ptime = atoi(p);
-	*--p = ':';
-      } else {
-	*pthr = atoi(item[i]);
-	*ptime = 1;
+        *p++ = 0;
+        *pthr = atoi(item[i]);
+        *ptime = atoi(p);
+        *--p = ':';
+      }
+      else {
+        *pthr = atoi(item[i]);
+        *ptime = 1;
       }
-    } else if (!strncmp(item[i], "aop-delay", 9)) {
+    }
+    else if (!strncmp(item[i], "aop-delay", 9)) {
       char *p;
+
       i++;
       if (i >= items) {
-	if (irp)
-	  Tcl_AppendResult(irp, item[i - 1], " needs argument", NULL);
-	return TCL_ERROR;
+        if (irp)
+          Tcl_AppendResult(irp, item[i - 1], " needs argument", NULL);
+        return TCL_ERROR;
       }
       p = strchr(item[i], ':');
       if (p) {
-	p++;
-	chan->aop_min = atoi(item[i]);
-	chan->aop_max = atoi(p);
-      } else {
-	chan->aop_min = atoi(item[i]);
-	chan->aop_max = chan->aop_min;
+        p++;
+        chan->aop_min = atoi(item[i]);
+        chan->aop_max = atoi(p);
+      }
+      else {
+        chan->aop_min = atoi(item[i]);
+        chan->aop_max = chan->aop_min;
       }
-    } else {
+    }
+    else {
       if (!strncmp(item[i] + 1, "udef-flag-", 10))
         initudef(UDEF_FLAG, item[i] + 11, 0);
       else if (!strncmp(item[i], "udef-int-", 9))
         initudef(UDEF_INT, item[i] + 9, 0);
       found = 0;
       for (ul = udef; ul; ul = ul->next) {
-        if (ul->type == UDEF_FLAG &&
-	     /* Direct match when set during .chanset ... */
-	    (!egg_strcasecmp(item[i] + 1, ul->name) ||
-	     /* ... or with prefix when set during chanfile load. */
-	     (!strncmp(item[i] + 1, "udef-flag-", 10) &&
-	      !egg_strcasecmp(item[i] + 11, ul->name)))) {
+        if (ul->type == UDEF_FLAG && (!egg_strcasecmp(item[i] + 1, ul->name) ||
+            (!strncmp(item[i] + 1, "udef-flag-", 10) &&
+            !egg_strcasecmp(item[i] + 11, ul->name)))) {
           if (item[i][0] == '+')
             setudef(ul, chan->dname, 1);
           else
             setudef(ul, chan->dname, 0);
           found = 1;
-	  break;
-        } else if (ul->type == UDEF_INT &&
-		    /* Direct match when set during .chanset ... */
-		   (!egg_strcasecmp(item[i], ul->name) ||
-		    /* ... or with prefix when set during chanfile load. */
-		    (!strncmp(item[i], "udef-int-", 9) &&
-		     !egg_strcasecmp(item[i] + 9, ul->name)))) {
+          break;
+        }
+        else if (ul->type == UDEF_INT && (!egg_strcasecmp(item[i], ul->name) ||
+                 !strncmp(item[i], "udef-int-", 9) &&
+                 !egg_strcasecmp(item[i] + 9, ul->name)))) {
           i++;
           if (i >= items) {
             if (irp)
@@ -1362,13 +1424,13 @@
           }
           setudef(ul, chan->dname, atoi(item[i]));
           found = 1;
-	  break;
+          break;
         }
       }
       if (!found) {
-        if (irp && item[i][0]) /* ignore "" */
-      	  Tcl_AppendResult(irp, "illegal channel option: ", item[i], NULL);
-      	x++;
+        if (irp && item[i][0])  /* ignore "" */
+          Tcl_AppendResult(irp, "illegal channel option: ", item[i], NULL);
+        x++;
       }
     }
   }
@@ -1380,25 +1442,25 @@
    */
   if (protect_readonly || chan_hack) {
     if (((old_status ^ chan->status) & CHAN_INACTIVE) &&
-	module_find("irc", 0, 0)) {
-      if (channel_inactive(chan) &&
-	  (chan->status & (CHAN_ACTIVE | CHAN_PEND)))
-	dprintf(DP_SERVER, "PART %s\n", chan->name);
+        module_find("irc", 0, 0)) {
+      if (channel_inactive(chan) && (chan->status & (CHAN_ACTIVE | CHAN_PEND)))
+        dprintf(DP_SERVER, "PART %s\n", chan->name);
       if (!channel_inactive(chan) &&
-	  !(chan->status & (CHAN_ACTIVE | CHAN_PEND)))
-	dprintf(DP_SERVER, "JOIN %s %s\n", (chan->name[0]) ?
-					   chan->name : chan->dname,
-					   chan->channel.key[0] ?
-					   chan->channel.key : chan->key_prot);
+          !(chan->status & (CHAN_ACTIVE | CHAN_PEND)))
+        dprintf(DP_SERVER, "JOIN %s %s\n", (chan->name[0]) ?
+                chan->name : chan->dname,
+                chan->channel.key[0] ? chan->channel.key : chan->key_prot);
     }
     if ((old_status ^ chan->status) & (CHAN_ENFORCEBANS | CHAN_OPONJOIN |
-	CHAN_BITCH | CHAN_AUTOVOICE | CHAN_AUTOHALFOP)) {
+                                       CHAN_BITCH | CHAN_AUTOVOICE |
+                                       CHAN_AUTOHALFOP)) {
       if ((me = module_find("irc", 0, 0)))
-        (me->funcs[IRC_RECHECK_CHANNEL])(chan, 1);
-    } else if (old_mode_pls_prot != chan->mode_pls_prot ||
-	       old_mode_mns_prot != chan->mode_mns_prot)
-    if ((me = module_find("irc", 1, 2)))
-      (me->funcs[IRC_RECHECK_CHANNEL_MODES])(chan);
+        (me->funcs[IRC_RECHECK_CHANNEL]) (chan, 1);
+    }
+    else if (old_mode_pls_prot != chan->mode_pls_prot ||
+             old_mode_mns_prot != chan->mode_mns_prot)
+      if ((me = module_find("irc", 1, 2)))
+        (me->funcs[IRC_RECHECK_CHANNEL_MODES]) (chan);
   }
   if (x > 0)
     return TCL_ERROR;
@@ -1408,6 +1470,7 @@
 static int tcl_do_masklist(maskrec *m, Tcl_Interp *irp)
 {
   char ts[21], ts1[21], ts2[21], *p;
+
 #if (((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)) || (TCL_MAJOR_VERSION > 8))
   CONST char *list[6];
 #else
@@ -1667,7 +1730,7 @@
 
 static void init_masklist(masklist *m)
 {
-  m->mask = (char *)nmalloc(1);
+  m->mask = (char *) nmalloc(1);
   m->mask[0] = 0;
   m->who = NULL;
   m->next = NULL;
@@ -1747,6 +1810,7 @@
   int ret = TCL_OK;
   int join = 0;
   char buf[2048], buf2[256];
+
 #if (((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)) || (TCL_MAJOR_VERSION > 8))
   CONST char **item;
 #else
@@ -1775,8 +1839,9 @@
     return TCL_ERROR;
   if ((chan = findchan_by_dname(newname))) {
     /* Already existing channel, maybe a reload of the channel file */
-    chan->status &= ~CHAN_FLAGGED;	/* don't delete me! :) */
-  } else {
+    chan->status &= ~CHAN_FLAGGED;      /* don't delete me! :) */
+  }
+  else {
     chan = (struct chanset_t *) nmalloc(sizeof(struct chanset_t));
 
     /* Hells bells, why set *every* variable to 0 when we have bzero? */
@@ -1826,7 +1891,8 @@
    * (channel) options.
    */
 #if (((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)) || (TCL_MAJOR_VERSION > 8))
-  if ((tcl_channel_modify(irp, chan, items, (char **)item) != TCL_OK) && !chan_hack) {
+  if ((tcl_channel_modify(irp, chan, items, (char **) item) != TCL_OK) &&
+      !chan_hack) {
 #else
   if ((tcl_channel_modify(irp, chan, items, item) != TCL_OK) && !chan_hack) {
 #endif
@@ -1880,7 +1946,8 @@
   if (!found) {
     Tcl_AppendResult(irp, "not found", NULL);
     return TCL_ERROR;
-  } else
+  }
+  else
     return TCL_OK;
 }
 
@@ -1923,59 +1990,59 @@
   if (!found) {
     Tcl_AppendResult(irp, "not found", NULL);
     return TCL_ERROR;
-  } else
+  }
+  else
     return TCL_OK;
 }
 
-static tcl_cmds channels_cmds[] =
-{
-  {"killban",		tcl_killban},
-  {"killchanban",	tcl_killchanban},
-  {"isbansticky",	tcl_isbansticky},
-  {"isban",		tcl_isban},
-  {"ispermban",		tcl_ispermban},
-  {"matchban",		tcl_matchban},
-  {"newchanban",	tcl_newchanban},
-  {"newban",		tcl_newban},
-  {"killexempt",	tcl_killexempt},
-  {"killchanexempt",	tcl_killchanexempt},
-  {"isexemptsticky",	tcl_isexemptsticky},
-  {"isexempt",		tcl_isexempt},
-  {"ispermexempt",	tcl_ispermexempt},
-  {"matchexempt",	tcl_matchexempt},
-  {"newchanexempt",	tcl_newchanexempt},
-  {"newexempt",		tcl_newexempt},
-  {"killinvite",	tcl_killinvite},
-  {"killchaninvite",	tcl_killchaninvite},
-  {"isinvitesticky",	tcl_isinvitesticky},
-  {"isinvite",		tcl_isinvite},
-  {"isperminvite",	tcl_isperminvite},
-  {"matchinvite",	tcl_matchinvite},
-  {"newchaninvite",	tcl_newchaninvite},
-  {"newinvite",		tcl_newinvite},
-  {"channel",		tcl_channel},
-  {"channels",		tcl_channels},
-  {"exemptlist",	tcl_exemptlist},
-  {"invitelist",	tcl_invitelist},
-  {"banlist",		tcl_banlist},
-  {"savechannels",	tcl_savechannels},
-  {"loadchannels",	tcl_loadchannels},
-  {"validchan",		tcl_validchan},
-  {"isdynamic",		tcl_isdynamic},
-  {"getchaninfo",	tcl_getchaninfo},
-  {"setchaninfo",	tcl_setchaninfo},
-  {"setlaston",		tcl_setlaston},
-  {"addchanrec",	tcl_addchanrec},
-  {"delchanrec",	tcl_delchanrec},
-  {"stick",		tcl_stick},
-  {"unstick",		tcl_stick},
-  {"stickinvite",	tcl_stickinvite},
-  {"unstickinvite",	tcl_stickinvite},
-  {"stickexempt",	tcl_stickexempt},
-  {"unstickexempt",	tcl_stickexempt},
-  {"setudef",		tcl_setudef},
-  {"renudef",		tcl_renudef},
-  {"deludef",		tcl_deludef},
-  {"haschanrec",	tcl_haschanrec},
-  {NULL,		NULL}
+static tcl_cmds channels_cmds[] = {
+  {"killban",               tcl_killban},
+  {"killchanban",       tcl_killchanban},
+  {"isbansticky",       tcl_isbansticky},
+  {"isban",                   tcl_isban},
+  {"ispermban",           tcl_ispermban},
+  {"matchban",             tcl_matchban},
+  {"newchanban",         tcl_newchanban},
+  {"newban",                 tcl_newban},
+  {"killexempt",         tcl_killexempt},
+  {"killchanexempt", tcl_killchanexempt},
+  {"isexemptsticky", tcl_isexemptsticky},
+  {"isexempt",             tcl_isexempt},
+  {"ispermexempt",     tcl_ispermexempt},
+  {"matchexempt",       tcl_matchexempt},
+  {"newchanexempt",   tcl_newchanexempt},
+  {"newexempt",           tcl_newexempt},
+  {"killinvite",         tcl_killinvite},
+  {"killchaninvite", tcl_killchaninvite},
+  {"isinvitesticky", tcl_isinvitesticky},
+  {"isinvite",             tcl_isinvite},
+  {"isperminvite",     tcl_isperminvite},
+  {"matchinvite",       tcl_matchinvite},
+  {"newchaninvite",   tcl_newchaninvite},
+  {"newinvite",           tcl_newinvite},
+  {"channel",               tcl_channel},
+  {"channels",             tcl_channels},
+  {"exemptlist",         tcl_exemptlist},
+  {"invitelist",         tcl_invitelist},
+  {"banlist",               tcl_banlist},
+  {"savechannels",     tcl_savechannels},
+  {"loadchannels",     tcl_loadchannels},
+  {"validchan",           tcl_validchan},
+  {"isdynamic",           tcl_isdynamic},
+  {"getchaninfo",       tcl_getchaninfo},
+  {"setchaninfo",       tcl_setchaninfo},
+  {"setlaston",           tcl_setlaston},
+  {"addchanrec",         tcl_addchanrec},
+  {"delchanrec",         tcl_delchanrec},
+  {"stick",                   tcl_stick},
+  {"unstick",                 tcl_stick},
+  {"stickinvite",       tcl_stickinvite},
+  {"unstickinvite",     tcl_stickinvite},
+  {"stickexempt",       tcl_stickexempt},
+  {"unstickexempt",     tcl_stickexempt},
+  {"setudef",               tcl_setudef},
+  {"renudef",               tcl_renudef},
+  {"deludef",               tcl_deludef},
+  {"haschanrec",         tcl_haschanrec},
+  {NULL,                           NULL}
 };
Index: eggdrop1.6/src/mod/channels.mod/userchan.c
diff -u eggdrop1.6/src/mod/channels.mod/userchan.c:1.31 eggdrop1.6/src/mod/channels.mod/userchan.c:1.32
--- eggdrop1.6/src/mod/channels.mod/userchan.c:1.31	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/channels.mod/userchan.c	Tue Jan 28 23:48:41 2003
@@ -1,7 +1,7 @@
 /*
  * userchan.c -- part of channels.mod
  *
- * $Id: userchan.c,v 1.31 2003/01/28 06:37:25 wcc Exp $
+ * $Id: userchan.c,v 1.32 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -26,7 +26,7 @@
 {
   struct chanuserrec *ch;
 
-  for (ch = u->chanrec; ch; ch = ch->next) 
+  for (ch = u->chanrec; ch; ch = ch->next)
     if (!rfc_casecmp(ch->channel, chname))
       return ch;
   return NULL;
@@ -88,7 +88,7 @@
 }
 
 static void set_handle_chaninfo(struct userrec *bu, char *handle,
-				char *chname, char *info)
+                                char *chname, char *info)
 {
   struct userrec *u;
   struct chanuserrec *ch;
@@ -111,7 +111,8 @@
   if (info && info[0]) {
     ch->info = (char *) user_malloc(strlen(info) + 1);
     strcpy(ch->info, info);
-  } else
+  }
+  else
     ch->info = NULL;
   cst = findchan_by_dname(chname);
   if ((!noshare) && (bu == userlist) &&
@@ -127,14 +128,14 @@
   while (ch) {
     if (!rfc_casecmp(chname, ch->channel)) {
       if (lst == NULL)
-	u->chanrec = ch->next;
+        u->chanrec = ch->next;
       else
-	lst->next = ch->next;
+        lst->next = ch->next;
       if (ch->info != NULL)
-	nfree(ch->info);
+        nfree(ch->info);
       nfree(ch);
       if (!noshare && !(u->flags & USER_UNSHARED))
-	shareout(findchan_by_dname(chname), "-cr %s %s\n", u->handle, chname);
+        shareout(findchan_by_dname(chname), "-cr %s %s\n", u->handle, chname);
       return;
     }
     lst = ch;
@@ -168,30 +169,30 @@
 /* Set sticky attribute for a mask.
  */
 static int u_setsticky_mask(struct chanset_t *chan, maskrec *u, char *uhost,
-			    int sticky, char *botcmd)
+                            int sticky, char *botcmd)
 {
   int j;
 
   j = atoi(uhost);
   if (!j)
     j = -1;
-  while(u) {
+  while (u) {
     if (j >= 0)
       j--;
 
     if (!j || ((j < 0) && !rfc_casecmp(u->mask, uhost))) {
       if (sticky > 0)
-	u->flags |= MASKREC_STICKY;
+        u->flags |= MASKREC_STICKY;
       else if (!sticky)
-	u->flags &= ~MASKREC_STICKY;
-      else	/* We don't actually want to change, just skip over */
-	return 0;
+        u->flags &= ~MASKREC_STICKY;
+      else                      /* We don't actually want to change, just skip over */
+        return 0;
       if (!j)
-	strcpy(uhost, u->mask);
+        strcpy(uhost, u->mask);
 
       if (!noshare)
         shareout(chan, "%s %s %d %s\n", botcmd, uhost, sticky,
-                                        (chan) ? chan->dname : "");
+                 (chan) ? chan->dname : "");
       return 1;
     }
 
@@ -242,14 +243,16 @@
     if (*u) {
       strcpy(who, (*u)->mask);
       i = 1;
-    } else
+    }
+    else
       return -j - 1;
-  } else {
+  }
+  else {
     /* Find matching host, if there is one */
     for (; *u && !i; u = &((*u)->next))
       if (!rfc_casecmp((*u)->mask, who)) {
-	i = 1;
-	break;
+        i = 1;
+        break;
       }
     if (!*u)
       return 0;
@@ -259,12 +262,12 @@
       char *mask = str_escape(who, ':', '\\');
 
       if (mask) {
-	/* Distribute chan bans differently */
-	if (c)
-	  shareout(c, "-bc %s %s\n", c->dname, mask);
-	else
-	  shareout(NULL, "-b %s\n", mask);
-	nfree(mask);
+        /* Distribute chan bans differently */
+        if (c)
+          shareout(c, "-bc %s %s\n", c->dname, mask);
+        else
+          shareout(NULL, "-b %s\n", mask);
+        nfree(mask);
       }
     }
     nfree((*u)->mask);
@@ -279,25 +282,27 @@
   return i;
 }
 
-static int u_delexempt (struct chanset_t *c, char *who, int doit)
+static int u_delexempt(struct chanset_t *c, char *who, int doit)
 {
   int j, i = 0;
   maskrec *t, **u = c ? &(c->exempts) : &global_exempts;
 
-  if (!strchr(who,'!') && (j = atoi(who))) {
+  if (!strchr(who, '!') && (j = atoi(who))) {
     j--;
-    for (;(*u) && j;u=&((*u)->next),j--);
+    for (; (*u) && j; u = &((*u)->next), j--);
     if (*u) {
       strcpy(who, (*u)->mask);
       i = 1;
-    } else
-      return -j-1;
-  } else {
+    }
+    else
+      return -j - 1;
+  }
+  else {
     /* Find matching host, if there is one */
-    for (;*u && !i;u=&((*u)->next))
-      if (!rfc_casecmp((*u)->mask,who)) {
-	i = 1;
-	break;
+    for (; *u && !i; u = &((*u)->next))
+      if (!rfc_casecmp((*u)->mask, who)) {
+        i = 1;
+        break;
       }
     if (!*u)
       return 0;
@@ -307,12 +312,12 @@
       char *mask = str_escape(who, ':', '\\');
 
       if (mask) {
-	/* Distribute chan exempts differently */
-	if (c)
-	  shareout(c, "-ec %s %s\n", c->dname, mask);
-	else
-	  shareout(NULL, "-e %s\n", mask);
-	nfree(mask);
+        /* Distribute chan exempts differently */
+        if (c)
+          shareout(c, "-ec %s %s\n", c->dname, mask);
+        else
+          shareout(NULL, "-e %s\n", mask);
+        nfree(mask);
       }
     }
     nfree((*u)->mask);
@@ -333,20 +338,22 @@
   maskrec *t;
   maskrec **u = c ? &(c->invites) : &global_invites;
 
-  if (!strchr(who,'!') && (j = atoi(who))) {
+  if (!strchr(who, '!') && (j = atoi(who))) {
     j--;
-    for (;(*u) && j;u=&((*u)->next),j--);
+    for (; (*u) && j; u = &((*u)->next), j--);
     if (*u) {
       strcpy(who, (*u)->mask);
       i = 1;
-    } else
-      return -j-1;
-  } else {
+    }
+    else
+      return -j - 1;
+  }
+  else {
     /* Find matching host, if there is one */
-    for (;*u && !i; u = &((*u)->next))
-      if (!rfc_casecmp((*u)->mask,who)) {
-	i = 1;
-	break;
+    for (; *u && !i; u = &((*u)->next))
+      if (!rfc_casecmp((*u)->mask, who)) {
+        i = 1;
+        break;
       }
     if (!*u)
       return 0;
@@ -356,12 +363,12 @@
       char *mask = str_escape(who, ':', '\\');
 
       if (mask) {
-	/* Distribute chan invites differently */
-	if (c)
-	  shareout(c, "-invc %s %s\n", c->dname, mask);
-	else
-	  shareout(NULL, "-inv %s\n", mask);
-	nfree(mask);
+        /* Distribute chan invites differently */
+        if (c)
+          shareout(c, "-invc %s %s\n", c->dname, mask);
+        else
+          shareout(NULL, "-inv %s\n", mask);
+        nfree(mask);
       }
     }
     nfree((*u)->mask);
@@ -379,7 +386,7 @@
 /* Note: If first char of note is '*' it's a sticky ban.
  */
 static int u_addban(struct chanset_t *chan, char *ban, char *from, char *note,
-		    time_t expire_time, int flags)
+                    time_t expire_time, int flags)
 {
   char host[1024], s[1024];
   maskrec *p = NULL, *l, **u = chan ? &chan->bans : &global_bans;
@@ -401,7 +408,7 @@
   }
   if ((me = module_find("server", 0, 0)) && me->funcs)
     simple_sprintf(s, "%s!%s", me->funcs[SERVER_BOTNAME],
-		   me->funcs[SERVER_BOTUSERHOST]);
+                   me->funcs[SERVER_BOTUSERHOST]);
   else
     simple_sprintf(s, "%s!%s@%s", origbotname, botuser, hostname);
   if (wild_match(host, s)) {
@@ -416,7 +423,7 @@
       p = l;
       break;
     }
-    
+
   /* It shouldn't expire and be sticky also */
   if (note[0] == '*') {
     flags |= MASKREC_STICKY;
@@ -428,14 +435,14 @@
   }
 
   if (p == NULL) {
-  p = user_malloc(sizeof(maskrec));
-  p->next = *u;
-  *u = p;
+    p = user_malloc(sizeof(maskrec));
+    p->next = *u;
+    *u = p;
   }
   else {
-    nfree( p->mask );
-    nfree( p->user );
-    nfree( p->desc );
+    nfree(p->mask);
+    nfree(p->user);
+    nfree(p->desc);
   }
   p->expire = expire_time;
   p->added = now;
@@ -452,13 +459,13 @@
 
     if (mask) {
       if (!chan)
-	shareout(NULL, "+b %s %lu %s%s %s %s\n", mask, expire_time - now,
-		 (flags & MASKREC_STICKY) ? "s" : "",
-		 (flags & MASKREC_PERM) ? "p" : "-", from, note);
+        shareout(NULL, "+b %s %lu %s%s %s %s\n", mask, expire_time - now,
+                 (flags & MASKREC_STICKY) ? "s" : "",
+                 (flags & MASKREC_PERM) ? "p" : "-", from, note);
       else
-	shareout(chan, "+bc %s %lu %s %s%s %s %s\n", mask, expire_time - now,
-		 chan->dname, (flags & MASKREC_STICKY) ? "s" : "",
-		 (flags & MASKREC_PERM) ? "p" : "-", from, note);
+        shareout(chan, "+bc %s %lu %s %s%s %s %s\n", mask, expire_time - now,
+                 chan->dname, (flags & MASKREC_STICKY) ? "s" : "",
+                 (flags & MASKREC_PERM) ? "p" : "-", from, note);
       nfree(mask);
     }
   }
@@ -468,7 +475,7 @@
 /* Note: If first char of note is '*' it's a sticky invite.
  */
 static int u_addinvite(struct chanset_t *chan, char *invite, char *from,
-		       char *note, time_t expire_time, int flags)
+                       char *note, time_t expire_time, int flags)
 {
   char host[1024], s[1024];
   maskrec *p = NULL, *l, **u = chan ? &chan->invites : &global_invites;
@@ -482,14 +489,15 @@
     strcat(host, "@*");
   else if (strchr(host, '!') == NULL) {
     char *i = strchr(host, '@');
+
     strcpy(s, i);
     *i = 0;
     strcat(host, "!*");
     strcat(host, s);
   }
-  if ((me = module_find("server",0,0)) && me->funcs)
+  if ((me = module_find("server", 0, 0)) && me->funcs)
     simple_sprintf(s, "%s!%s", me->funcs[SERVER_BOTNAME],
-		   me->funcs[SERVER_BOTUSERHOST]);
+                   me->funcs[SERVER_BOTUSERHOST]);
   else
     simple_sprintf(s, "%s!%s@%s", origbotname, botuser, hostname);
 
@@ -497,7 +505,7 @@
     if (!rfc_casecmp(l->mask, host)) {
       p = l;
       break;
-    }  
+    }
 
   /* It shouldn't expire and be sticky also */
   if (note[0] == '*') {
@@ -509,38 +517,38 @@
     expire_time = 0L;
   }
 
-  if (p == NULL) {  
-  p = user_malloc(sizeof(maskrec));
-  p->next = *u;
-  *u = p;
+  if (p == NULL) {
+    p = user_malloc(sizeof(maskrec));
+    p->next = *u;
+    *u = p;
   }
   else {
-    nfree( p->mask );
-    nfree( p->user );
-    nfree( p->desc );
+    nfree(p->mask);
+    nfree(p->user);
+    nfree(p->desc);
   }
   p->expire = expire_time;
   p->added = now;
   p->lastactive = 0;
   p->flags = flags;
-  p->mask = user_malloc(strlen(host)+1);
-  strcpy(p->mask,host);
-  p->user = user_malloc(strlen(from)+1);
-  strcpy(p->user,from);
-  p->desc = user_malloc(strlen(note)+1);
-  strcpy(p->desc,note);
+  p->mask = user_malloc(strlen(host) + 1);
+  strcpy(p->mask, host);
+  p->user = user_malloc(strlen(from) + 1);
+  strcpy(p->user, from);
+  p->desc = user_malloc(strlen(note) + 1);
+  strcpy(p->desc, note);
   if (!noshare) {
     char *mask = str_escape(host, ':', '\\');
 
     if (mask) {
       if (!chan)
-	shareout(NULL, "+inv %s %lu %s%s %s %s\n", mask, expire_time - now,
-		 (flags & MASKREC_STICKY) ? "s" : "",
-		 (flags & MASKREC_PERM) ? "p": "-", from, note);
+        shareout(NULL, "+inv %s %lu %s%s %s %s\n", mask, expire_time - now,
+                 (flags & MASKREC_STICKY) ? "s" : "",
+                 (flags & MASKREC_PERM) ? "p" : "-", from, note);
       else
-	shareout(chan, "+invc %s %lu %s %s%s %s %s\n", mask, expire_time - now,
-		 chan->dname, (flags & MASKREC_STICKY) ? "s" : "",
-		 (flags & MASKREC_PERM) ? "p": "-", from, note);
+        shareout(chan, "+invc %s %lu %s %s%s %s %s\n", mask, expire_time - now,
+                 chan->dname, (flags & MASKREC_STICKY) ? "s" : "",
+                 (flags & MASKREC_PERM) ? "p" : "-", from, note);
       nfree(mask);
     }
   }
@@ -550,7 +558,7 @@
 /* Note: If first char of note is '*' it's a sticky exempt.
  */
 static int u_addexempt(struct chanset_t *chan, char *exempt, char *from,
-		       char *note, time_t expire_time, int flags)
+                       char *note, time_t expire_time, int flags)
 {
   char host[1024], s[1024];
   maskrec *p = NULL, *l, **u = chan ? &chan->exempts : &global_exempts;
@@ -564,14 +572,15 @@
     strcat(host, "@*");
   else if (strchr(host, '!') == NULL) {
     char *i = strchr(host, '@');
+
     strcpy(s, i);
     *i = 0;
     strcat(host, "!*");
     strcat(host, s);
   }
-  if ((me = module_find("server",0,0)) && me->funcs)
+  if ((me = module_find("server", 0, 0)) && me->funcs)
     simple_sprintf(s, "%s!%s", me->funcs[SERVER_BOTNAME],
-		   me->funcs[SERVER_BOTUSERHOST]);
+                   me->funcs[SERVER_BOTUSERHOST]);
   else
     simple_sprintf(s, "%s!%s@%s", origbotname, botuser, hostname);
 
@@ -579,7 +588,7 @@
     if (!rfc_casecmp(l->mask, host)) {
       p = l;
       break;
-    }  
+    }
 
   /* It shouldn't expire and be sticky also */
   if (note[0] == '*') {
@@ -591,38 +600,38 @@
     expire_time = 0L;
   }
 
-  if (p == NULL) {  
-  p = user_malloc(sizeof(maskrec));
-  p->next = *u;
-  *u = p;
+  if (p == NULL) {
+    p = user_malloc(sizeof(maskrec));
+    p->next = *u;
+    *u = p;
   }
   else {
-    nfree( p->mask );
-    nfree( p->user );
-    nfree( p->desc );
+    nfree(p->mask);
+    nfree(p->user);
+    nfree(p->desc);
   }
   p->expire = expire_time;
   p->added = now;
   p->lastactive = 0;
   p->flags = flags;
-  p->mask = user_malloc(strlen(host)+1);
-  strcpy(p->mask,host);
-  p->user = user_malloc(strlen(from)+1);
-  strcpy(p->user,from);
-  p->desc = user_malloc(strlen(note)+1);
-  strcpy(p->desc,note);
+  p->mask = user_malloc(strlen(host) + 1);
+  strcpy(p->mask, host);
+  p->user = user_malloc(strlen(from) + 1);
+  strcpy(p->user, from);
+  p->desc = user_malloc(strlen(note) + 1);
+  strcpy(p->desc, note);
   if (!noshare) {
     char *mask = str_escape(host, ':', '\\');
 
     if (mask) {
       if (!chan)
-	shareout(NULL, "+e %s %lu %s%s %s %s\n", mask, expire_time - now,
-		 (flags & MASKREC_STICKY) ? "s" : "",
-		 (flags & MASKREC_PERM) ? "p": "-", from, note);
+        shareout(NULL, "+e %s %lu %s%s %s %s\n", mask, expire_time - now,
+                 (flags & MASKREC_STICKY) ? "s" : "",
+                 (flags & MASKREC_PERM) ? "p" : "-", from, note);
       else
-	shareout(chan, "+ec %s %lu %s %s%s %s %s\n", mask, expire_time - now,
-		 chan->dname, (flags & MASKREC_STICKY) ? "s" : "",
-		 (flags & MASKREC_PERM) ? "p": "-", from, note);
+        shareout(chan, "+ec %s %lu %s %s%s %s %s\n", mask, expire_time - now,
+                 chan->dname, (flags & MASKREC_STICKY) ? "s" : "",
+                 (flags & MASKREC_PERM) ? "p" : "-", from, note);
       nfree(mask);
     }
   }
@@ -632,7 +641,7 @@
 /* Take host entry from ban list and display it ban-style.
  */
 static void display_ban(int idx, int number, maskrec *ban,
-			struct chanset_t *chan, int show_inact)
+                        struct chanset_t *chan, int show_inact)
 {
   char dates[81], s[41];
 
@@ -646,7 +655,8 @@
       daysago(now, ban->lastactive, s);
       strcat(dates, s);
     }
-  } else
+  }
+  else
     dates[0] = 0;
   if (ban->flags & MASKREC_PERM)
     strcpy(s, "(perm)");
@@ -659,18 +669,18 @@
   if (ban->flags & MASKREC_STICKY)
     strcat(s, " (sticky)");
   if (!chan || ischanban(chan, ban->mask)) {
-    if (number >= 0) {
+    if (number >= 0)
       dprintf(idx, "  [%3d] %s %s\n", number, ban->mask, s);
-    } else {
+    else
       dprintf(idx, "BAN: %s %s\n", ban->mask, s);
-    }
-  } else if (show_inact) {
-    if (number >= 0) {
+  }
+  else if (show_inact) {
+    if (number >= 0)
       dprintf(idx, "! [%3d] %s %s\n", number, ban->mask, s);
-    } else {
+    else
       dprintf(idx, "BAN (%s): %s %s\n", MODES_INACTIVE, ban->mask, s);
-    }
-  } else
+  }
+  else
     return;
   dprintf(idx, "        %s: %s\n", ban->user, ban->desc);
   if (dates[0])
@@ -680,7 +690,7 @@
 /* Take host entry from exempt list and display it ban-style.
  */
 static void display_exempt(int idx, int number, maskrec *exempt,
-			   struct chanset_t *chan, int show_inact)
+                           struct chanset_t *chan, int show_inact)
 {
   char dates[81], s[41];
 
@@ -694,7 +704,8 @@
       daysago(now, exempt->lastactive, s);
       strcat(dates, s);
     }
-  } else
+  }
+  else
     dates[0] = 0;
   if (exempt->flags & MASKREC_PERM)
     strcpy(s, "(perm)");
@@ -707,18 +718,18 @@
   if (exempt->flags & MASKREC_STICKY)
     strcat(s, " (sticky)");
   if (!chan || ischanexempt(chan, exempt->mask)) {
-    if (number >= 0) {
+    if (number >= 0)
       dprintf(idx, "  [%3d] %s %s\n", number, exempt->mask, s);
-    } else {
+    else
       dprintf(idx, "EXEMPT: %s %s\n", exempt->mask, s);
-    }
-  } else if (show_inact) {
-    if (number >= 0) {
+  }
+  else if (show_inact) {
+    if (number >= 0)
       dprintf(idx, "! [%3d] %s %s\n", number, exempt->mask, s);
-    } else {
+    else
       dprintf(idx, "EXEMPT (%s): %s %s\n", MODES_INACTIVE, exempt->mask, s);
-    }
-  } else
+  }
+  else
     return;
   dprintf(idx, "        %s: %s\n", exempt->user, exempt->desc);
   if (dates[0])
@@ -727,8 +738,8 @@
 
 /* Take host entry from invite list and display it ban-style.
  */
-static void display_invite (int idx, int number, maskrec *invite,
-			    struct chanset_t *chan, int show_inact)
+static void display_invite(int idx, int number, maskrec *invite,
+                           struct chanset_t *chan, int show_inact)
 {
   char dates[81], s[41];
 
@@ -742,7 +753,8 @@
       daysago(now, invite->lastactive, s);
       strcat(dates, s);
     }
-  } else
+  }
+  else
     dates[0] = 0;
   if (invite->flags & MASKREC_PERM)
     strcpy(s, "(perm)");
@@ -755,18 +767,18 @@
   if (invite->flags & MASKREC_STICKY)
     strcat(s, " (sticky)");
   if (!chan || ischaninvite(chan, invite->mask)) {
-    if (number >= 0) {
+    if (number >= 0)
       dprintf(idx, "  [%3d] %s %s\n", number, invite->mask, s);
-    } else {
+    else
       dprintf(idx, "INVITE: %s %s\n", invite->mask, s);
-    }
-  } else if (show_inact) {
-    if (number >= 0) {
+  }
+  else if (show_inact) {
+    if (number >= 0)
       dprintf(idx, "! [%3d] %s %s\n", number, invite->mask, s);
-    } else {
+    else
       dprintf(idx, "INVITE (%s): %s %s\n", MODES_INACTIVE, invite->mask, s);
-    }
-  } else
+  }
+  else
     return;
   dprintf(idx, "        %s: %s\n", invite->user, invite->desc);
   if (dates[0])
@@ -786,10 +798,11 @@
     if (chname[0] && (strchr(CHANMETA, chname[0]))) {
       chan = findchan_by_dname(chname);
       if (!chan) {
-	dprintf(idx, "%s.\n", CHAN_NOSUCH);
-	return;
+        dprintf(idx, "%s.\n", CHAN_NOSUCH);
+        return;
       }
-    } else
+    }
+    else
       match = chname;
   }
 
@@ -800,63 +813,61 @@
 
   if (chan && show_inact)
     dprintf(idx, "%s:   (! = %s %s)\n", BANS_GLOBAL,
-	    MODES_NOTACTIVE, chan->dname);
+            MODES_NOTACTIVE, chan->dname);
   else
     dprintf(idx, "%s:\n", BANS_GLOBAL);
   for (u = global_bans; u; u = u->next) {
     if (match[0]) {
       if ((wild_match(match, u->mask)) ||
-	  (wild_match(match, u->desc)) ||
-	  (wild_match(match, u->user)))
-	display_ban(idx, k, u, chan, 1);
+          (wild_match(match, u->desc)) || (wild_match(match, u->user)))
+        display_ban(idx, k, u, chan, 1);
       k++;
-    } else
+    }
+    else
       display_ban(idx, k++, u, chan, show_inact);
   }
   if (chan) {
     if (show_inact)
       dprintf(idx, "%s %s:   (! = %s, * = %s)\n",
-	      BANS_BYCHANNEL, chan->dname,
-	      MODES_NOTACTIVE2, MODES_NOTBYBOT);
+              BANS_BYCHANNEL, chan->dname, MODES_NOTACTIVE2, MODES_NOTBYBOT);
     else
       dprintf(idx, "%s %s:  (* = %s)\n",
-	      BANS_BYCHANNEL, chan->dname,
-	      MODES_NOTBYBOT);
+              BANS_BYCHANNEL, chan->dname, MODES_NOTBYBOT);
     for (u = chan->bans; u; u = u->next) {
       if (match[0]) {
-	if ((wild_match(match, u->mask)) ||
-	    (wild_match(match, u->desc)) ||
-	    (wild_match(match, u->user)))
-	  display_ban(idx, k, u, chan, 1);
-	k++;
-      } else
-	display_ban(idx, k++, u, chan, show_inact);
+        if ((wild_match(match, u->mask)) ||
+            (wild_match(match, u->desc)) || (wild_match(match, u->user)))
+          display_ban(idx, k, u, chan, 1);
+        k++;
+      }
+      else
+        display_ban(idx, k++, u, chan, show_inact);
     }
     if (chan->status & CHAN_ACTIVE) {
       masklist *b;
       char s[UHOSTLEN], *s1, *s2, fill[256];
       int min, sec;
 
-      for (b = chan->channel.ban; b && b->mask[0]; b = b->next) {    
-	if ((!u_equals_mask(global_bans, b->mask)) &&
-	    (!u_equals_mask(chan->bans, b->mask))) {
-	  strcpy(s, b->who);
-	  s2 = s;
-	  s1 = splitnick(&s2);
-	  if (s1[0])
-	    sprintf(fill, "%s (%s!%s)", b->mask, s1, s2);
-	  else
-	    sprintf(fill, "%s (server %s)", b->mask, s2);
-	  if (b->timer != 0) {
-	    min = (now - b->timer) / 60;
-	    sec = (now - b->timer) - (min * 60);
-	    sprintf(s, " (active %02d:%02d)", min, sec);
-	    strcat(fill, s);
-	  }
-	  if ((!match[0]) || (wild_match(match, b->mask)))
-	    dprintf(idx, "* [%3d] %s\n", k, fill);
-	  k++;
-	}
+      for (b = chan->channel.ban; b && b->mask[0]; b = b->next) {
+        if ((!u_equals_mask(global_bans, b->mask)) &&
+            (!u_equals_mask(chan->bans, b->mask))) {
+          strcpy(s, b->who);
+          s2 = s;
+          s1 = splitnick(&s2);
+          if (s1[0])
+            sprintf(fill, "%s (%s!%s)", b->mask, s1, s2);
+          else
+            sprintf(fill, "%s (server %s)", b->mask, s2);
+          if (b->timer != 0) {
+            min = (now - b->timer) / 60;
+            sec = (now - b->timer) - (min * 60);
+            sprintf(s, " (active %02d:%02d)", min, sec);
+            strcat(fill, s);
+          }
+          if ((!match[0]) || (wild_match(match, b->mask)))
+            dprintf(idx, "* [%3d] %s\n", k, fill);
+          k++;
+        }
       }
     }
   }
@@ -879,10 +890,11 @@
     if (chname[0] && strchr(CHANMETA, chname[0])) {
       chan = findchan_by_dname(chname);
       if (!chan) {
-	dprintf(idx, "%s.\n", CHAN_NOSUCH);
-	return;
+        dprintf(idx, "%s.\n", CHAN_NOSUCH);
+        return;
       }
-    } else
+    }
+    else
       match = chname;
   }
 
@@ -893,64 +905,61 @@
 
   if (chan && show_inact)
     dprintf(idx, "%s:   (! = %s %s)\n", EXEMPTS_GLOBAL,
-	    MODES_NOTACTIVE, chan->dname);
+            MODES_NOTACTIVE, chan->dname);
   else
     dprintf(idx, "%s:\n", EXEMPTS_GLOBAL);
   for (u = global_exempts; u; u = u->next) {
     if (match[0]) {
       if ((wild_match(match, u->mask)) ||
-	  (wild_match(match, u->desc)) ||
-	  (wild_match(match, u->user)))
-	display_exempt(idx, k, u, chan, 1);
+          (wild_match(match, u->desc)) || (wild_match(match, u->user)))
+        display_exempt(idx, k, u, chan, 1);
       k++;
-    } else
+    }
+    else
       display_exempt(idx, k++, u, chan, show_inact);
   }
   if (chan) {
     if (show_inact)
-      dprintf(idx, "%s %s:   (! = %s, * = %s)\n",
-	      EXEMPTS_BYCHANNEL, chan->dname,
-	      MODES_NOTACTIVE2,
-	      MODES_NOTBYBOT);
+      dprintf(idx, "%s %s:   (! = %s, * = %s)\n", EXEMPTS_BYCHANNEL,
+              chan->dname, MODES_NOTACTIVE2, MODES_NOTBYBOT);
     else
       dprintf(idx, "%s %s:  (* = %s)\n",
-	      EXEMPTS_BYCHANNEL, chan->dname,
-	      MODES_NOTBYBOT);
+              EXEMPTS_BYCHANNEL, chan->dname, MODES_NOTBYBOT);
     for (u = chan->exempts; u; u = u->next) {
       if (match[0]) {
-	if ((wild_match(match, u->mask)) ||
-	    (wild_match(match, u->desc)) ||
-	    (wild_match(match, u->user)))
-	  display_exempt(idx, k, u, chan, 1);
-	k++;
-      } else
-	display_exempt(idx, k++, u, chan, show_inact);
+        if ((wild_match(match, u->mask)) ||
+            (wild_match(match, u->desc)) || (wild_match(match, u->user)))
+          display_exempt(idx, k, u, chan, 1);
+        k++;
+      }
+      else
+        display_exempt(idx, k++, u, chan, show_inact);
     }
     if (chan->status & CHAN_ACTIVE) {
       masklist *e;
-      char s[UHOSTLEN], *s1, *s2,fill[256];
+      char s[UHOSTLEN], *s1, *s2, fill[256];
       int min, sec;
 
       for (e = chan->channel.exempt; e && e->mask[0]; e = e->next) {
-	if ((!u_equals_mask(global_exempts,e->mask)) &&
-	    (!u_equals_mask(chan->exempts, e->mask))) {
-	  strcpy(s, e->who);
-	  s2 = s;
-	  s1 = splitnick(&s2);
-	  if (s1[0])
-	    sprintf(fill, "%s (%s!%s)", e->mask, s1, s2);
-	  else
-	    sprintf(fill, "%s (server %s)", e->mask, s2);
-	  if (e->timer != 0) {
-	    min = (now - e->timer) / 60;
-	    sec = (now - e->timer) - (min * 60);
-	    sprintf(s, " (active %02d:%02d)", min, sec);
-	    strcat(fill, s);
-	  }
-	  if ((!match[0]) || (wild_match(match, e->mask)))
-	    dprintf(idx, "* [%3d] %s\n", k, fill);
-	  k++;
-	}
+        if ((!u_equals_mask(global_exempts, e->mask)) &&
+            (!u_equals_mask(chan->exempts, e->mask))) {
+          strcpy(s, e->who);
+          s2 = s;
+          s1 = splitnick(&s2);
+          if (s1[0])
+            sprintf(fill, "%s (%s!%s)", e->mask, s1, s2);
+          else
+            sprintf(fill, "%s (server %s)", e->mask, s2);
+          if (e->timer != 0) {
+            min = (now - e->timer) / 60;
+            sec = (now - e->timer) - (min * 60);
+            sprintf(s, " (active %02d:%02d)", min, sec);
+            strcat(fill, s);
+          }
+          if ((!match[0]) || (wild_match(match, e->mask)))
+            dprintf(idx, "* [%3d] %s\n", k, fill);
+          k++;
+        }
       }
     }
   }
@@ -973,10 +982,11 @@
     if (chname[0] && strchr(CHANMETA, chname[0])) {
       chan = findchan_by_dname(chname);
       if (!chan) {
-	dprintf(idx, "%s.\n", CHAN_NOSUCH);
-	return;
+        dprintf(idx, "%s.\n", CHAN_NOSUCH);
+        return;
       }
-    } else
+    }
+    else
       match = chname;
   }
 
@@ -987,64 +997,61 @@
 
   if (chan && show_inact)
     dprintf(idx, "%s:   (! = %s %s)\n", INVITES_GLOBAL,
-	    MODES_NOTACTIVE, chan->dname);
+            MODES_NOTACTIVE, chan->dname);
   else
     dprintf(idx, "%s:\n", INVITES_GLOBAL);
   for (u = global_invites; u; u = u->next) {
     if (match[0]) {
       if ((wild_match(match, u->mask)) ||
-	  (wild_match(match, u->desc)) ||
-	  (wild_match(match, u->user)))
-	display_invite(idx, k, u, chan, 1);
+          (wild_match(match, u->desc)) || (wild_match(match, u->user)))
+        display_invite(idx, k, u, chan, 1);
       k++;
-    } else
+    }
+    else
       display_invite(idx, k++, u, chan, show_inact);
   }
   if (chan) {
     if (show_inact)
-      dprintf(idx, "%s %s:   (! = %s, * = %s)\n",
-	      INVITES_BYCHANNEL, chan->dname,
-	      MODES_NOTACTIVE2,
-	      MODES_NOTBYBOT);
+      dprintf(idx, "%s %s:   (! = %s, * = %s)\n", INVITES_BYCHANNEL,
+              chan->dname, MODES_NOTACTIVE2, MODES_NOTBYBOT);
     else
       dprintf(idx, "%s %s:  (* = %s)\n",
-	      INVITES_BYCHANNEL, chan->dname,
-	      MODES_NOTBYBOT);
+              INVITES_BYCHANNEL, chan->dname, MODES_NOTBYBOT);
     for (u = chan->invites; u; u = u->next) {
       if (match[0]) {
-	if ((wild_match(match, u->mask)) ||
-	    (wild_match(match, u->desc)) ||
-	    (wild_match(match, u->user)))
-	  display_invite(idx, k, u, chan, 1);
-	k++;
-      } else
-	display_invite(idx, k++, u, chan, show_inact);
+        if ((wild_match(match, u->mask)) ||
+            (wild_match(match, u->desc)) || (wild_match(match, u->user)))
+          display_invite(idx, k, u, chan, 1);
+        k++;
+      }
+      else
+        display_invite(idx, k++, u, chan, show_inact);
     }
     if (chan->status & CHAN_ACTIVE) {
       masklist *i;
-      char s[UHOSTLEN], *s1, *s2,fill[256];
+      char s[UHOSTLEN], *s1, *s2, fill[256];
       int min, sec;
 
       for (i = chan->channel.invite; i && i->mask[0]; i = i->next) {
-	if ((!u_equals_mask(global_invites,i->mask)) &&
-	    (!u_equals_mask(chan->invites, i->mask))) {
-	  strcpy(s, i->who);
-	  s2 = s;
-	  s1 = splitnick(&s2);
-	  if (s1[0])
-	    sprintf(fill, "%s (%s!%s)", i->mask, s1, s2);
-	  else
-	    sprintf(fill, "%s (server %s)", i->mask, s2);
-	  if (i->timer != 0) {
-	    min = (now - i->timer) / 60;
-	    sec = (now - i->timer) - (min * 60);
-	    sprintf(s, " (active %02d:%02d)", min, sec);
-	    strcat(fill, s);
-	  }
-	  if ((!match[0]) || (wild_match(match, i->mask)))
-	    dprintf(idx, "* [%3d] %s\n", k, fill);
-	  k++;
-	}
+        if ((!u_equals_mask(global_invites, i->mask)) &&
+            (!u_equals_mask(chan->invites, i->mask))) {
+          strcpy(s, i->who);
+          s2 = s;
+          s1 = splitnick(&s2);
+          if (s1[0])
+            sprintf(fill, "%s (%s!%s)", i->mask, s1, s2);
+          else
+            sprintf(fill, "%s (server %s)", i->mask, s2);
+          if (i->timer != 0) {
+            min = (now - i->timer) / 60;
+            sec = (now - i->timer) - (min * 60);
+            sprintf(s, " (active %02d:%02d)", min, sec);
+            strcat(fill, s);
+          }
+          if ((!match[0]) || (wild_match(match, i->mask)))
+            dprintf(idx, "* [%3d] %s\n", k, fill);
+          k++;
+        }
       }
     }
   }
@@ -1060,21 +1067,21 @@
 {
   struct chanset_t *chan;
   maskrec *b;
-  char	*mask;
+  char *mask;
 
   if (global_bans)
-    if (fprintf(f, BAN_NAME " - -\n") == EOF)	/* Daemus */
+    if (fprintf(f, BAN_NAME " - -\n") == EOF)   /* Daemus */
       return 0;
   for (b = global_bans; b; b = b->next) {
     mask = str_escape(b->mask, ':', '\\');
     if (!mask ||
-	fprintf(f, "- %s:%s%lu%s:+%lu:%lu:%s:%s\n", mask,
-		(b->flags & MASKREC_PERM) ? "+" : "", b->expire,
-		(b->flags & MASKREC_STICKY) ? "*" : "", b->added,
-		b->lastactive, b->user ? b->user : botnetnick,
-		b->desc ? b->desc : "requested") == EOF) {
+        fprintf(f, "- %s:%s%lu%s:+%lu:%lu:%s:%s\n", mask,
+                (b->flags & MASKREC_PERM) ? "+" : "", b->expire,
+                (b->flags & MASKREC_STICKY) ? "*" : "", b->added,
+                b->lastactive, b->user ? b->user : botnetnick,
+                b->desc ? b->desc : "requested") == EOF) {
       if (mask)
-	nfree(mask);
+        nfree(mask);
       return 0;
     }
     nfree(mask);
@@ -1084,26 +1091,26 @@
       struct flag_record fr = { FR_CHAN | FR_GLOBAL | FR_BOT, 0, 0, 0, 0, 0 };
 
       if (idx >= 0)
-	get_user_flagrec(dcc[idx].user, &fr, chan->dname);
+        get_user_flagrec(dcc[idx].user, &fr, chan->dname);
       else
-	fr.chan = BOT_SHARE;
+        fr.chan = BOT_SHARE;
       if ((fr.chan & BOT_SHARE) || (fr.bot & BOT_GLOBAL)) {
-	if (fprintf(f, "::%s bans\n", chan->dname) == EOF)
-	  return 0;
-	for (b = chan->bans; b; b = b->next) {
-	  mask = str_escape(b->mask, ':', '\\');
-	  if (!mask ||
-	      fprintf(f, "- %s:%s%lu%s:+%lu:%lu:%s:%s\n", mask,
-		      (b->flags & MASKREC_PERM) ? "+" : "", b->expire,
-		      (b->flags & MASKREC_STICKY) ? "*" : "", b->added,
-		      b->lastactive, b->user ? b->user : botnetnick,
-		      b->desc ? b->desc : "requested") == EOF) {
-	    if (mask)
-	      nfree(mask);
-	    return 0;
-	  }
-	  nfree(mask);
-	}
+        if (fprintf(f, "::%s bans\n", chan->dname) == EOF)
+          return 0;
+        for (b = chan->bans; b; b = b->next) {
+          mask = str_escape(b->mask, ':', '\\');
+          if (!mask ||
+              fprintf(f, "- %s:%s%lu%s:+%lu:%lu:%s:%s\n", mask,
+                      (b->flags & MASKREC_PERM) ? "+" : "", b->expire,
+                      (b->flags & MASKREC_STICKY) ? "*" : "", b->added,
+                      b->lastactive, b->user ? b->user : botnetnick,
+                      b->desc ? b->desc : "requested") == EOF) {
+            if (mask)
+              nfree(mask);
+            return 0;
+          }
+          nfree(mask);
+        }
       }
     }
   return 1;
@@ -1115,50 +1122,50 @@
 {
   struct chanset_t *chan;
   maskrec *e;
-  char	*mask;
+  char *mask;
 
   if (global_exempts)
-    if (fprintf(f, EXEMPT_NAME " - -\n") == EOF) /* Daemus */
+    if (fprintf(f, EXEMPT_NAME " - -\n") == EOF)        /* Daemus */
       return 0;
   for (e = global_exempts; e; e = e->next) {
     mask = str_escape(e->mask, ':', '\\');
     if (!mask ||
-	fprintf(f, "%s %s:%s%lu%s:+%lu:%lu:%s:%s\n", "%", e->mask,
-		(e->flags & MASKREC_PERM) ? "+" : "", e->expire,
-		(e->flags & MASKREC_STICKY) ? "*" : "", e->added,
-		e->lastactive, e->user ? e->user : botnetnick,
-		e->desc ? e->desc : "requested") == EOF) {
+        fprintf(f, "%s %s:%s%lu%s:+%lu:%lu:%s:%s\n", "%", e->mask,
+                (e->flags & MASKREC_PERM) ? "+" : "", e->expire,
+                (e->flags & MASKREC_STICKY) ? "*" : "", e->added,
+                e->lastactive, e->user ? e->user : botnetnick,
+                e->desc ? e->desc : "requested") == EOF) {
       if (mask)
-	nfree(mask);
+        nfree(mask);
       return 0;
     }
     nfree(mask);
   }
-  for (chan = chanset;chan;chan=chan->next)
+  for (chan = chanset; chan; chan = chan->next)
     if ((idx < 0) || (chan->status & CHAN_SHARED)) {
       struct flag_record fr = { FR_CHAN | FR_GLOBAL | FR_BOT, 0, 0, 0, 0, 0 };
 
       if (idx >= 0)
-	get_user_flagrec(dcc[idx].user,&fr,chan->dname);
+        get_user_flagrec(dcc[idx].user, &fr, chan->dname);
       else
-	fr.chan = BOT_SHARE;
+        fr.chan = BOT_SHARE;
       if ((fr.chan & BOT_SHARE) || (fr.bot & BOT_GLOBAL)) {
-	if (fprintf(f, "&&%s exempts\n", chan->dname) == EOF)
-	  return 0;
-	for (e = chan->exempts; e; e = e->next) {
-	  mask = str_escape(e->mask, ':', '\\');
-	  if (!mask ||
-	      fprintf(f,"%s %s:%s%lu%s:+%lu:%lu:%s:%s\n","%",e->mask,
-		      (e->flags & MASKREC_PERM) ? "+" : "", e->expire,
-		      (e->flags & MASKREC_STICKY) ? "*" : "", e->added,
-		      e->lastactive, e->user ? e->user : botnetnick,
-		      e->desc ? e->desc : "requested") == EOF) {
-	    if (mask)
-	      nfree(mask);
-	    return 0;
-	  }
-	  nfree(mask);
-	}
+        if (fprintf(f, "&&%s exempts\n", chan->dname) == EOF)
+          return 0;
+        for (e = chan->exempts; e; e = e->next) {
+          mask = str_escape(e->mask, ':', '\\');
+          if (!mask ||
+              fprintf(f, "%s %s:%s%lu%s:+%lu:%lu:%s:%s\n", "%", e->mask,
+                      (e->flags & MASKREC_PERM) ? "+" : "", e->expire,
+                      (e->flags & MASKREC_STICKY) ? "*" : "", e->added,
+                      e->lastactive, e->user ? e->user : botnetnick,
+                      e->desc ? e->desc : "requested") == EOF) {
+            if (mask)
+              nfree(mask);
+            return 0;
+          }
+          nfree(mask);
+        }
       }
     }
   return 1;
@@ -1170,21 +1177,21 @@
 {
   struct chanset_t *chan;
   maskrec *ir;
-  char	*mask;
+  char *mask;
 
   if (global_invites)
-    if (fprintf(f, INVITE_NAME " - -\n") == EOF) /* Daemus */
+    if (fprintf(f, INVITE_NAME " - -\n") == EOF)        /* Daemus */
       return 0;
-  for (ir = global_invites; ir; ir = ir->next)  {
+  for (ir = global_invites; ir; ir = ir->next) {
     mask = str_escape(ir->mask, ':', '\\');
     if (!mask ||
-	fprintf(f,"@ %s:%s%lu%s:+%lu:%lu:%s:%s\n",ir->mask,
-		(ir->flags & MASKREC_PERM) ? "+" : "", ir->expire,
-		(ir->flags & MASKREC_STICKY) ? "*" : "", ir->added,
-		ir->lastactive, ir->user ? ir->user : botnetnick,
-		ir->desc ? ir->desc : "requested") == EOF) {
+        fprintf(f, "@ %s:%s%lu%s:+%lu:%lu:%s:%s\n", ir->mask,
+                (ir->flags & MASKREC_PERM) ? "+" : "", ir->expire,
+                (ir->flags & MASKREC_STICKY) ? "*" : "", ir->added,
+                ir->lastactive, ir->user ? ir->user : botnetnick,
+                ir->desc ? ir->desc : "requested") == EOF) {
       if (mask)
-	nfree(mask);
+        nfree(mask);
       return 0;
     }
     nfree(mask);
@@ -1194,26 +1201,26 @@
       struct flag_record fr = { FR_CHAN | FR_GLOBAL | FR_BOT, 0, 0, 0, 0, 0 };
 
       if (idx >= 0)
-	get_user_flagrec(dcc[idx].user,&fr,chan->dname);
+        get_user_flagrec(dcc[idx].user, &fr, chan->dname);
       else
-	fr.chan = BOT_SHARE;
+        fr.chan = BOT_SHARE;
       if ((fr.chan & BOT_SHARE) || (fr.bot & BOT_GLOBAL)) {
-	if (fprintf(f, "$$%s invites\n", chan->dname) == EOF)
-	  return 0;
-	for (ir = chan->invites; ir; ir = ir->next) {
-	  mask = str_escape(ir->mask, ':', '\\');
-	  if (!mask ||
-	      fprintf(f,"@ %s:%s%lu%s:+%lu:%lu:%s:%s\n",ir->mask,
-		      (ir->flags & MASKREC_PERM) ? "+" : "", ir->expire,
-		      (ir->flags & MASKREC_STICKY) ? "*" : "", ir->added,
-		      ir->lastactive, ir->user ? ir->user : botnetnick,
-		      ir->desc ? ir->desc : "requested") == EOF) {
-	    if (mask)
-	      nfree(mask);
-	    return 0;
-	  }
-	  nfree(mask);
-	}
+        if (fprintf(f, "$$%s invites\n", chan->dname) == EOF)
+          return 0;
+        for (ir = chan->invites; ir; ir = ir->next) {
+          mask = str_escape(ir->mask, ':', '\\');
+          if (!mask ||
+              fprintf(f, "@ %s:%s%lu%s:+%lu:%lu:%s:%s\n", ir->mask,
+                      (ir->flags & MASKREC_PERM) ? "+" : "", ir->expire,
+                      (ir->flags & MASKREC_STICKY) ? "*" : "", ir->added,
+                      ir->lastactive, ir->user ? ir->user : botnetnick,
+                      ir->desc ? ir->desc : "requested") == EOF) {
+            if (mask)
+              nfree(mask);
+            return 0;
+          }
+          nfree(mask);
+        }
       }
     }
   return 1;
@@ -1221,9 +1228,9 @@
 
 static void channels_writeuserfile(void)
 {
-  char	 s[1024];
-  FILE	*f;
-  int	 ret = 0;
+  char s[1024];
+  FILE *f;
+  int ret = 0;
 
   simple_sprintf(s, "%s~new", userfile);
   f = fopen(s, "a");
@@ -1250,9 +1257,9 @@
  */
 static int expired_mask(struct chanset_t *chan, char *who)
 {
-  memberlist		*m, *m2;
-  char			 buf[UHOSTLEN], *snick, *sfrom;
-  struct userrec	*u;
+  memberlist *m, *m2;
+  char buf[UHOSTLEN], *snick, *sfrom;
+  struct userrec *u;
 
   /* Always expire masks, regardless of who set it? */
   if (force_expire)
@@ -1269,8 +1276,8 @@
   if (!m)
     for (m2 = chan->channel.member; m2 && m2->nick[0]; m2 = m2->next)
       if (!egg_strcasecmp(sfrom, m2->userhost)) {
-	m = m2;
-	break;
+        m = m2;
+        break;
       }
 
   if (!m || !chan_hasop(m) || !rfc_casecmp(m->nick, botname))
@@ -1301,18 +1308,17 @@
   struct chanset_t *chan;
   masklist *b;
 
-  for (u = global_bans; u; u = u2) { 
+  for (u = global_bans; u; u = u2) {
     u2 = u->next;
     if (!(u->flags & MASKREC_PERM) && (now >= u->expire)) {
-      putlog(LOG_MISC, "*", "%s %s (%s)", BANS_NOLONGER,
-	     u->mask, MISC_EXPIRED);
+      putlog(LOG_MISC, "*", "%s %s (%s)", BANS_NOLONGER, u->mask, MISC_EXPIRED);
       for (chan = chanset; chan; chan = chan->next)
-	for (b = chan->channel.ban; b->mask[0]; b = b->next)
-	  if (!rfc_casecmp(b->mask, u->mask) &&
-	      expired_mask(chan, b->who) && b->timer != now) {
-	    add_mode(chan, '-', 'b', u->mask);
-	    b->timer = now;
-	  }
+        for (b = chan->channel.ban; b->mask[0]; b = b->next)
+          if (!rfc_casecmp(b->mask, u->mask) &&
+              expired_mask(chan, b->who) && b->timer != now) {
+            add_mode(chan, '-', 'b', u->mask);
+            b->timer = now;
+          }
       u_delban(NULL, u->mask, 1);
     }
   }
@@ -1321,15 +1327,15 @@
     for (u = chan->bans; u; u = u2) {
       u2 = u->next;
       if (!(u->flags & MASKREC_PERM) && (now >= u->expire)) {
-	putlog(LOG_MISC, "*", "%s %s %s %s (%s)", BANS_NOLONGER,
-	       u->mask, MISC_ONLOCALE, chan->dname, MISC_EXPIRED);
-	for (b = chan->channel.ban; b->mask[0]; b = b->next)
-	  if (!rfc_casecmp(b->mask, u->mask) &&
-	      expired_mask(chan, b->who) && b->timer != now) {
-	    add_mode(chan, '-', 'b', u->mask);
-	    b->timer = now;
-	  }
-	u_delban(chan, u->mask, 1);
+        putlog(LOG_MISC, "*", "%s %s %s %s (%s)", BANS_NOLONGER,
+               u->mask, MISC_ONLOCALE, chan->dname, MISC_EXPIRED);
+        for (b = chan->channel.ban; b->mask[0]; b = b->next)
+          if (!rfc_casecmp(b->mask, u->mask) &&
+              expired_mask(chan, b->who) && b->timer != now) {
+            add_mode(chan, '-', 'b', u->mask);
+            b->timer = now;
+          }
+        u_delban(chan, u->mask, 1);
       }
     }
   }
@@ -1350,30 +1356,29 @@
     u2 = u->next;
     if (!(u->flags & MASKREC_PERM) && (now >= u->expire)) {
       putlog(LOG_MISC, "*", "%s %s (%s)", EXEMPTS_NOLONGER,
-	     u->mask, MISC_EXPIRED);
+             u->mask, MISC_EXPIRED);
       for (chan = chanset; chan; chan = chan->next) {
         match = 0;
         b = chan->channel.ban;
         while (b->mask[0] && !match) {
-          if (wild_match(b->mask, u->mask) ||
-            wild_match(u->mask, b->mask))
+          if (wild_match(b->mask, u->mask) || wild_match(u->mask, b->mask))
             match = 1;
           else
             b = b->next;
         }
         if (match)
           putlog(LOG_MISC, chan->dname,
-            "Exempt not expired on channel %s. Ban still set!",
-            chan->dname);
-	else
-	  for (e = chan->channel.exempt; e->mask[0]; e = e->next)
-	    if (!rfc_casecmp(e->mask, u->mask) &&
-		expired_mask(chan, e->who) && e->timer != now) {
-	      add_mode(chan, '-', 'e', u->mask);
-	      e->timer = now;
-	    }
+                 "Exempt not expired on channel %s. Ban still set!",
+                 chan->dname);
+        else
+          for (e = chan->channel.exempt; e->mask[0]; e = e->next)
+            if (!rfc_casecmp(e->mask, u->mask) &&
+                expired_mask(chan, e->who) && e->timer != now) {
+              add_mode(chan, '-', 'e', u->mask);
+              e->timer = now;
+            }
       }
-      u_delexempt(NULL, u->mask,1);
+      u_delexempt(NULL, u->mask, 1);
     }
   }
   /* Check for specific channel-domain exempts expiring */
@@ -1381,28 +1386,27 @@
     for (u = chan->exempts; u; u = u2) {
       u2 = u->next;
       if (!(u->flags & MASKREC_PERM) && (now >= u->expire)) {
-        match=0;
+        match = 0;
         b = chan->channel.ban;
         while (b->mask[0] && !match) {
-          if (wild_match(b->mask, u->mask) ||
-            wild_match(u->mask, b->mask))
-            match=1;
+          if (wild_match(b->mask, u->mask) || wild_match(u->mask, b->mask))
+            match = 1;
           else
             b = b->next;
         }
         if (match)
           putlog(LOG_MISC, chan->dname,
-            "Exempt not expired on channel %s. Ban still set!",
-            chan->dname);
+                 "Exempt not expired on channel %s. Ban still set!",
+                 chan->dname);
         else {
           putlog(LOG_MISC, "*", "%s %s %s %s (%s)", EXEMPTS_NOLONGER,
-		 u->mask, MISC_ONLOCALE, chan->dname, MISC_EXPIRED);
-	  for (e = chan->channel.exempt; e->mask[0]; e = e->next)
-	    if (!rfc_casecmp(e->mask, u->mask) &&
-		expired_mask(chan, e->who) && e->timer != now) {
-	      add_mode(chan, '-', 'e', u->mask);
-	      e->timer = now;
-	    }
+                 u->mask, MISC_ONLOCALE, chan->dname, MISC_EXPIRED);
+          for (e = chan->channel.exempt; e->mask[0]; e = e->next)
+            if (!rfc_casecmp(e->mask, u->mask) &&
+                expired_mask(chan, e->who) && e->timer != now) {
+              add_mode(chan, '-', 'e', u->mask);
+              e->timer = now;
+            }
           u_delexempt(chan, u->mask, 1);
         }
       }
@@ -1424,16 +1428,16 @@
     u2 = u->next;
     if (!(u->flags & MASKREC_PERM) && (now >= u->expire)) {
       putlog(LOG_MISC, "*", "%s %s (%s)", INVITES_NOLONGER,
-	     u->mask, MISC_EXPIRED);
+             u->mask, MISC_EXPIRED);
       for (chan = chanset; chan; chan = chan->next)
-	if (!(chan->channel.mode & CHANINV))
-	  for (b = chan->channel.invite; b->mask[0]; b = b->next)
-	    if (!rfc_casecmp(b->mask, u->mask) &&
-		expired_mask(chan, b->who) && b->timer != now) {
-	      add_mode(chan, '-', 'I', u->mask);
-	      b->timer = now;
-	    }
-      u_delinvite(NULL, u->mask,1);
+        if (!(chan->channel.mode & CHANINV))
+          for (b = chan->channel.invite; b->mask[0]; b = b->next)
+            if (!rfc_casecmp(b->mask, u->mask) &&
+                expired_mask(chan, b->who) && b->timer != now) {
+              add_mode(chan, '-', 'I', u->mask);
+              b->timer = now;
+            }
+      u_delinvite(NULL, u->mask, 1);
     }
   }
   /* Check for specific channel-domain invites expiring */
@@ -1441,16 +1445,16 @@
     for (u = chan->invites; u; u = u2) {
       u2 = u->next;
       if (!(u->flags & MASKREC_PERM) && (now >= u->expire)) {
-	putlog(LOG_MISC, "*", "%s %s %s %s (%s)", INVITES_NOLONGER,
-	       u->mask, MISC_ONLOCALE, chan->dname, MISC_EXPIRED);
-	if (!(chan->channel.mode & CHANINV))
-	  for (b = chan->channel.invite; b->mask[0]; b = b->next)
-	    if (!rfc_casecmp(b->mask, u->mask) &&
-		expired_mask(chan, b->who) && b->timer != now) {
-	      add_mode(chan, '-', 'I', u->mask);
-	      b->timer = now;
-	    }
-	u_delinvite(chan, u->mask, 1);
+        putlog(LOG_MISC, "*", "%s %s %s %s (%s)", INVITES_NOLONGER,
+               u->mask, MISC_ONLOCALE, chan->dname, MISC_EXPIRED);
+        if (!(chan->channel.mode & CHANINV))
+          for (b = chan->channel.invite; b->mask[0]; b = b->next)
+            if (!rfc_casecmp(b->mask, u->mask) &&
+                expired_mask(chan, b->who) && b->timer != now) {
+              add_mode(chan, '-', 'I', u->mask);
+              b->timer = now;
+            }
+        u_delinvite(chan, u->mask, 1);
       }
     }
   }
Index: eggdrop1.6/src/mod/compress.mod/compress.c
diff -u eggdrop1.6/src/mod/compress.mod/compress.c:1.16 eggdrop1.6/src/mod/compress.mod/compress.c:1.17
--- eggdrop1.6/src/mod/compress.mod/compress.c:1.16	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/compress.mod/compress.c	Tue Jan 28 23:48:41 2003
@@ -6,7 +6,7 @@
  * Written by Fabian Knittel <fknittel at gmx.de>. Based on zlib examples
  * by Jean-loup Gailly and Miguel Albrecht.
  *
- * $Id: compress.c,v 1.16 2003/01/28 06:37:25 wcc Exp $
+ * $Id: compress.c,v 1.17 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -44,7 +44,7 @@
 #endif /* HAVE_MMAP */
 #include "compress.h"
 
-#define BUFLEN	512
+#define BUFLEN 512
 
 
 static Function *global = NULL, *share_funcs = NULL;
Index: eggdrop1.6/src/mod/compress.mod/compress.h
diff -u eggdrop1.6/src/mod/compress.mod/compress.h:1.7 eggdrop1.6/src/mod/compress.mod/compress.h:1.8
--- eggdrop1.6/src/mod/compress.mod/compress.h:1.7	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/compress.mod/compress.h	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * compress.h -- part of src/mod/compress.mod
  *   header file for the zlib compression module
  *
- * $Id: compress.h,v 1.7 2003/01/28 06:37:25 wcc Exp $
+ * $Id: compress.h,v 1.8 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -25,7 +25,7 @@
 #ifndef _EGG_MOD_COMPRESS_COMPRESS_H
 #define _EGG_MOD_COMPRESS_COMPRESS_H
 
-#define UFF_COMPRESS	0x000008        /* Compress the user file       */
+#define UFF_COMPRESS    0x000008        /* Compress the user file       */
 
 typedef enum {
   COMPF_ERROR,                  /* Compression failed.                  */
@@ -42,7 +42,7 @@
 #ifndef MAKING_COMPRESS
 /* 4 - 7 */
 # define compress_to_file   ((int (*)(char *, char *, int))(compress_funcs[4]))
-# define compress_file	    ((int (*)(char *, int))(compress_funcs[5]))
+# define compress_file      ((int (*)(char *, int))(compress_funcs[5]))
 # define uncompress_to_file ((int (*)(char *, char *))(uncompress_funcs[6]))
 # define uncompress_file    ((int (*)(char *))(uncompress_funcs[7]))
 /* 8 - 11 */
Index: eggdrop1.6/src/mod/compress.mod/tclcompress.c
diff -u eggdrop1.6/src/mod/compress.mod/tclcompress.c:1.7 eggdrop1.6/src/mod/compress.mod/tclcompress.c:1.8
--- eggdrop1.6/src/mod/compress.mod/tclcompress.c:1.7	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/compress.mod/tclcompress.c	Tue Jan 28 23:48:41 2003
@@ -4,7 +4,7 @@
  *
  * Written by Fabian Knittel <fknittel at gmx.de>
  *
- * $Id: tclcompress.c,v 1.7 2003/01/28 06:37:25 wcc Exp $
+ * $Id: tclcompress.c,v 1.8 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -25,7 +25,7 @@
  */
 
 
-#define NEXT_ARG	{ curr_arg++; argc--; }
+#define NEXT_ARG { curr_arg++; argc--; }
 
 static int tcl_compress_file STDVAR
 {
Index: eggdrop1.6/src/mod/console.mod/console.h
diff -u eggdrop1.6/src/mod/console.mod/console.h:1.5 eggdrop1.6/src/mod/console.mod/console.h:1.6
--- eggdrop1.6/src/mod/console.mod/console.h:1.5	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/console.mod/console.h	Tue Jan 28 23:48:41 2003
@@ -1,7 +1,7 @@
 /*
  * console.h -- part of console.mod
  *
- * $Id: console.h,v 1.5 2003/01/28 06:37:25 wcc Exp $
+ * $Id: console.h,v 1.6 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -24,15 +24,15 @@
 #ifndef _EGG_MOD_CONSOLE_CONSOLE_H
 #define _EGG_MOD_CONSOLE_CONSOLE_H
 
-#define CONSOLE_SAVED_SETTINGS	get_language(0xb040)
-#define CONSOLE_SAVED_SETTINGS2	get_language(0xb041)
-#define CONSOLE_CHANNEL		get_language(0xb042)
-#define CONSOLE_FLAGS		get_language(0xb043)
-#define CONSOLE_STRIPFLAGS	get_language(0xb044)
-#define CONSOLE_ECHO		get_language(0xb045)
-#define CONSOLE_PAGE_SETTING	get_language(0xb046)
-#define CONSOLE_CHANNEL2	get_language(0xb047)
-#define CONSOLE_YES		get_language(0xb048)
-#define CONSOLE_NO		get_language(0xb049)
+#define CONSOLE_SAVED_SETTINGS  get_language(0xb040)
+#define CONSOLE_SAVED_SETTINGS2 get_language(0xb041)
+#define CONSOLE_CHANNEL         get_language(0xb042)
+#define CONSOLE_FLAGS           get_language(0xb043)
+#define CONSOLE_STRIPFLAGS      get_language(0xb044)
+#define CONSOLE_ECHO            get_language(0xb045)
+#define CONSOLE_PAGE_SETTING    get_language(0xb046)
+#define CONSOLE_CHANNEL2        get_language(0xb047)
+#define CONSOLE_YES             get_language(0xb048)
+#define CONSOLE_NO              get_language(0xb049)
 
 #endif /* _EGG_MOD_CONSOLE_CONSOLE_H */
Index: eggdrop1.6/src/mod/console.mod/help/console.help
diff -u eggdrop1.6/src/mod/console.mod/help/console.help:1.3 eggdrop1.6/src/mod/console.mod/help/console.help:1.4
--- eggdrop1.6/src/mod/console.mod/help/console.help:1.3	Wed Jan  2 02:06:14 2002
+++ eggdrop1.6/src/mod/console.mod/help/console.help	Tue Jan 28 23:48:41 2003
@@ -8,12 +8,12 @@
    The following Tcl variables are available for setting up the
    console module: (%b'.help set <variable>'%b for more info)
      %bconsole-autosave%b   %bforce-channel%b
-     %binfo-party%b         
+     %binfo-party%b
 %{help=store}
 ###  %bstore%b
    Stores you console settings so that they are set automatically
    next time you join the party line.
-   
+
 See Also: set console-autosave
 %{help=all}
 ###  commands for the %bconsole module%b
Index: eggdrop1.6/src/mod/dns.mod/coredns.c
diff -u eggdrop1.6/src/mod/dns.mod/coredns.c:1.23 eggdrop1.6/src/mod/dns.mod/coredns.c:1.24
--- eggdrop1.6/src/mod/dns.mod/coredns.c:1.23	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/dns.mod/coredns.c	Tue Jan 28 23:48:41 2003
@@ -5,7 +5,7 @@
  *
  * Modified/written by Fabian Knittel <fknittel at gmx.de>
  *
- * $Id: coredns.c,v 1.23 2003/01/28 06:37:25 wcc Exp $
+ * $Id: coredns.c,v 1.24 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Portions Copyright (C) 1999, 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -45,12 +45,11 @@
 
 /* Defines */
 
-#define BASH_SIZE	 8192   /* Size of hash tables */
-#define HOSTNAMELEN 	  255   /* From RFC */
+#define BASH_SIZE        8192   /* Size of hash tables */
+#define HOSTNAMELEN       255   /* From RFC */
 #define RES_RETRYDELAY      3
 #define RES_MAXSENDS        4
-#define RES_FAILEDDELAY   600   /* TTL for failed records (in
-                                 * seconds). */
+#define RES_FAILEDDELAY   600   /* TTL for failed records (in seconds). */
 #define RES_MAX_TTL     86400   /* Maximum TTL (in seconds). */
 
 #define RES_ERR "DNS Resolver error: "
Index: eggdrop1.6/src/mod/dns.mod/dns.h
diff -u eggdrop1.6/src/mod/dns.mod/dns.h:1.11 eggdrop1.6/src/mod/dns.mod/dns.h:1.12
--- eggdrop1.6/src/mod/dns.mod/dns.h:1.11	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/dns.mod/dns.h	Tue Jan 28 23:48:41 2003
@@ -4,7 +4,7 @@
  *
  * Written by Fabian Knittel <fknittel at gmx.de>
  *
- * $Id: dns.h,v 1.11 2003/01/28 06:37:26 wcc Exp $
+ * $Id: dns.h,v 1.12 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1999, 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -65,11 +65,11 @@
 #define IS_A(x)   (x->state == STATE_AREQ)
 
 #ifdef DEBUG_DNS
-# define ddebug0		debug0
-# define ddebug1		debug1
-# define ddebug2		debug2
-# define ddebug3		debug3
-# define ddebug4		debug4
+# define ddebug0                debug0
+# define ddebug1                debug1
+# define ddebug2                debug2
+# define ddebug3                debug3
+# define ddebug4                debug4
 #else /* !DEBUG_DNS */
 # define ddebug0(x)
 # define ddebug1(x, x1)
Index: eggdrop1.6/src/mod/filesys.mod/filedb3.c
diff -u eggdrop1.6/src/mod/filesys.mod/filedb3.c:1.23 eggdrop1.6/src/mod/filesys.mod/filedb3.c:1.24
--- eggdrop1.6/src/mod/filesys.mod/filedb3.c:1.23	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/filesys.mod/filedb3.c	Tue Jan 28 23:48:41 2003
@@ -4,7 +4,7 @@
  *
  * Rewritten by Fabian Knittel <fknittel at gmx.de>
  *
- * $Id: filedb3.c,v 1.23 2003/01/28 06:37:26 wcc Exp $
+ * $Id: filedb3.c,v 1.24 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -417,12 +417,12 @@
 /* Short-cut macro to read an entry from disc to memory. Only
  * useful for filedb_getfile().
  */
-#define filedb_read(fdb, entry, len)	\
-{					\
-  if ((len) > 0) {			\
-    (entry) = nmalloc((len));		\
-    fread((entry), 1, (len), (fdb));	\
-  }					\
+#define filedb_read(fdb, entry, len)    \
+{                                       \
+  if ((len) > 0) {                      \
+    (entry) = nmalloc((len));           \
+    fread((entry), 1, (len), (fdb));    \
+  }                                     \
 }
 
 /* Reads an entry from the fildb at the specified position. The
Index: eggdrop1.6/src/mod/filesys.mod/filedb3.h
diff -u eggdrop1.6/src/mod/filesys.mod/filedb3.h:1.14 eggdrop1.6/src/mod/filesys.mod/filedb3.h:1.15
--- eggdrop1.6/src/mod/filesys.mod/filedb3.h:1.14	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/filesys.mod/filedb3.h	Tue Jan 28 23:48:41 2003
@@ -4,7 +4,7 @@
  *
  * Written by Fabian Knittel <fknittel at gmx.de>
  *
- * $Id: filedb3.h,v 1.14 2003/01/28 06:37:26 wcc Exp $
+ * $Id: filedb3.h,v 1.15 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1999, 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -99,37 +99,37 @@
  *   Macros
  */
 
-#define my_free(ptr)							\
-  if (ptr) {								\
-    nfree(ptr);								\
-    ptr = NULL;								\
+#define my_free(ptr)                                                    \
+  if (ptr) {                                                            \
+    nfree(ptr);                                                         \
+    ptr = NULL;                                                         \
   }
 
 /* Copy entry to target -- Uses dynamic memory allocation, which
  * means you'll eventually have to free the memory again. 'target'
  * will be overwritten.
  */
-#define malloc_strcpy(target, entry)					\
-do {									\
-  if (entry) {								\
-    (target) = nrealloc((target), strlen(entry) + 1);			\
-    strcpy((target), (entry));						\
-  } else								\
-    my_free(target);							\
+#define malloc_strcpy(target, entry)                                    \
+do {                                                                    \
+  if (entry) {                                                          \
+    (target) = nrealloc((target), strlen(entry) + 1);                   \
+    strcpy((target), (entry));                                          \
+  } else                                                                \
+    my_free(target);                                                    \
 } while (0)
 
 /* Macro to calculate the total length of dynamic data. */
-#define filedb_tot_dynspace(fdh) ((fdh).filename_len + (fdh).desc_len +	\
-	(fdh).chan_len + (fdh).uploader_len + (fdh).flags_req_len + \
-	(fdh).sharelink_len)
-
-#define filedb_zero_dynspace(fdh) {					\
-	(fdh).filename_len	= 0;					\
-	(fdh).desc_len		= 0;					\
-	(fdh).chan_len		= 0;					\
-	(fdh).uploader_len	= 0;					\
-	(fdh).flags_req_len	= 0;					\
-	(fdh).sharelink_len	= 0;					\
+#define filedb_tot_dynspace(fdh) ((fdh).filename_len + (fdh).desc_len + \
+        (fdh).chan_len + (fdh).uploader_len + (fdh).flags_req_len + \
+        (fdh).sharelink_len)
+
+#define filedb_zero_dynspace(fdh) {                                     \
+        (fdh).filename_len      = 0;                                    \
+        (fdh).desc_len          = 0;                                    \
+        (fdh).chan_len          = 0;                                    \
+        (fdh).uploader_len      = 0;                                    \
+        (fdh).flags_req_len     = 0;                                    \
+        (fdh).sharelink_len     = 0;                                    \
 }
 
 /* Memory debugging makros */
@@ -145,21 +145,21 @@
  *  Constants
  */
 
-#define FILEDB_VERSION1	0x0001
-#define FILEDB_VERSION2	0x0002  /* DB version used for 1.3, 1.4         */
-#define FILEDB_VERSION3	0x0003
+#define FILEDB_VERSION1 0x0001
+#define FILEDB_VERSION2 0x0002  /* DB version used for 1.3, 1.4         */
+#define FILEDB_VERSION3 0x0003
 #define FILEDB_NEWEST_VER FILEDB_VERSION3       /* Newest DB version    */
 
-#define POS_NEW		0       /* Position which indicates that the
+#define POS_NEW         0       /* Position which indicates that the
                                  * entry wants to be repositioned.      */
 
-#define FILE_UNUSED	0x0001  /* Deleted entry.                       */
-#define FILE_DIR	0x0002  /* It's actually a directory.           */
-#define FILE_SHARE	0x0004  /* Can be shared on the botnet.         */
-#define FILE_HIDDEN	0x0008  /* Hidden file.                         */
-#define FILE_ISLINK	0x0010  /* The file is a link to another bot.   */
+#define FILE_UNUSED     0x0001  /* Deleted entry.                       */
+#define FILE_DIR        0x0002  /* It's actually a directory.           */
+#define FILE_SHARE      0x0004  /* Can be shared on the botnet.         */
+#define FILE_HIDDEN     0x0008  /* Hidden file.                         */
+#define FILE_ISLINK     0x0010  /* The file is a link to another bot.   */
 
-#define FILEDB_ESTDYN	50      /* Estimated dynamic length of an entry */
+#define FILEDB_ESTDYN   50      /* Estimated dynamic length of an entry */
 
 enum {
   GET_HEADER,                   /* Only save minimal data               */
Index: eggdrop1.6/src/mod/filesys.mod/filesys.c
diff -u eggdrop1.6/src/mod/filesys.mod/filesys.c:1.54 eggdrop1.6/src/mod/filesys.mod/filesys.c:1.55
--- eggdrop1.6/src/mod/filesys.mod/filesys.c:1.54	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/filesys.mod/filesys.c	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * filesys.c -- part of filesys.mod
  *   main file of the filesys eggdrop module
  *
- * $Id: filesys.c,v 1.54 2003/01/28 06:37:26 wcc Exp $
+ * $Id: filesys.c,v 1.55 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -782,8 +782,8 @@
     /* Check for dcc-sends in process with the same filename */
     for (j = 0; j < dcc_total; j++)
       if (j != i) {
-        if ((dcc[j].type->flags & (DCT_FILETRAN | DCT_FILESEND))
-            == (DCT_FILETRAN | DCT_FILESEND)) {
+        if ((dcc[j].type->flags & (DCT_FILETRAN | DCT_FILESEND)) ==
+            (DCT_FILETRAN | DCT_FILESEND)) {
           if (!strcmp(dcc[i].u.xfer->origname, dcc[j].u.xfer->origname)) {
             dprintf(DP_HELP, "NOTICE %s :File `%s' is already being sent.\n",
                     dcc[i].nick, dcc[i].u.xfer->origname);
Index: eggdrop1.6/src/mod/filesys.mod/help/filesys.help
diff -u eggdrop1.6/src/mod/filesys.mod/help/filesys.help:1.5 eggdrop1.6/src/mod/filesys.mod/help/filesys.help:1.6
--- eggdrop1.6/src/mod/filesys.mod/help/filesys.help:1.5	Wed Jan  2 02:06:15 2002
+++ eggdrop1.6/src/mod/filesys.mod/help/filesys.help	Tue Jan 28 23:48:41 2003
@@ -7,18 +7,18 @@
 ###  %bcancel%b <file(s)>
    tells the bot to stop sending a file that is pending (either
    queued, waiting, or in the process of being transferred).
-   
+
 see also: pending
-%{help=filesys/cd}%{+x}   
+%{help=filesys/cd}%{+x}
 ###  %bcd%b <directory>
    changes your current directory if possible.  this works exactly
    like the unix command.
-   
+
 see also: pwd
 %{help=filesys/cp}%{+j}
 ###  %bcp%b <source> <dest>
    copies a file or group of files from one place to another.
-   
+
 see also: mv
 %{help=filesys/desc}%{+x}
 ###  %bdesc%b <file> <description>
@@ -54,7 +54,7 @@
    simultaneously, so if you go over this limit, the remainder of
    your file requests will be queued.  as the first files finish
    transferring, the queued files will be sent.
-   
+
 see also: pending, cancel
 %{help=filesys/help}%{+x}
 %B file system commands:   (wildcard expressions are allowed)
@@ -86,7 +86,7 @@
 ###  %bhide%b <file(s)>
    marks a file as hidden, so that normal users can't see it.
    only a master or file janitor using %b'lsa'%b can see hidden files.
-   
+
 see also: unhide, lsa
 %{help=filesys/ln}%{+j}
 ###  %bln%b <bot:filepath> <localfile>
@@ -96,7 +96,7 @@
    file until that bot connects again.  the local filename can be
    anything you want.
    example:  ln Snowbot:/gifs/uglyman.gif ugly.gif
-   
+
 see also: share, unshare, get
 %{help=filesys/ls}%{+x}
 ###  %bls%b [filemask]
@@ -106,14 +106,14 @@
    and how many times each file has been downloaded.  if a description
    of the file exists, it is displayed below the filename.  you can
    restrict the file listing by specifying a mask, just like in unix.
-   
+
 see also: cd, pwd, get
 %{help=filesys/lsa}%{+j}
 ###  %blsa%b [filemask]
    works just like ls, but hidden files are displayed too.
    hidden files are displayed with a "(hid)" next to them, and
    shared files are displayed with a "(shr)" next to them.
-   
+
 see also: hide, share
 %{help=filesys/mkdir}%{+j}
 ###  %bmkdir%b <dir> [flags [channel]]
@@ -122,13 +122,13 @@
    even see the directory.  you can even specify a channel that the
    flags are matched against. you can use the %b'mkdir'%b command again
    to alter or remove those flags.
-   
+
 see also: rmdir
 %{help=filesys/mv}%{+j}
 ###  %bmv%b <source> <dest>
    moves a file or group of files from one place to another.  (it
    can also be used to rename files.)
-   
+
 see also: cp
 %{help=filesys/pending}%{+x}
 ###  %bpending%b
@@ -137,12 +137,12 @@
    it shows you the nickname on IRC that the file is being sent
    to, and, if the transfer is in progress, tells you how far
    along the transfer is.
-   
+
 see also: cancel
 %{help=filesys/pwd}%{+x}
 ###  %bpwd%b
    tells you what your current directory is.
-   
+
 see also: cd
 %{help=filesys/quit}%{+x}
 ###  %bquit%b
@@ -153,14 +153,14 @@
 %{help=filesys/rmdir}%{+j}
 ###  %brmdir%b <dir>
    removes an existing directory, if there are no files in it.
-   
+
 see also: mkdir
 %{help=filesys/share}%{+j}
 ###  %bshare%b <file(s)>
    marks a file as shared.  this means that other bots can get
    the file remotely for users on their file systems.  by default,
    files are marked as unshared.
-   
+
 see also: unshare, lsa, ln
 %{help=filesys/optimize}%{+j}
 ###  %boptimize%b
@@ -175,12 +175,12 @@
 %{help=filesys/unhide}%{+j}
 ###  %bunhide%b <file(s)>
    makes a file be not hidden any more.
-   
+
 see also: hide, lsa
 %{help=filesys/unshare}%{+j}
 ###  %bunshare%b <file(s)>
    removes the shared tag from a file.
-   
+
 see also: share, lsa, ln
 %{help=filesys module}%{+x}
 ### commands for the %bfilesys module%b
Index: eggdrop1.6/src/mod/filesys.mod/language/filesys.french.lang
diff -u eggdrop1.6/src/mod/filesys.mod/language/filesys.french.lang:1.2 eggdrop1.6/src/mod/filesys.mod/language/filesys.french.lang:1.3
--- eggdrop1.6/src/mod/filesys.mod/language/filesys.french.lang:1.2	Tue Dec 21 11:35:16 1999
+++ eggdrop1.6/src/mod/filesys.mod/language/filesys.french.lang	Tue Jan 28 23:48:42 2003
@@ -1,11 +1,11 @@
 # filesys.french.lang
 #   language messages for filesys module
 #
-# Traduction par Fraggle, merci de me contacter 
+# Traduction par Fraggle, merci de me contacter
 # à benoit_jerome at penguinpowered.com
 # si vous voulez y contribuer.
 #
-# $Id: filesys.french.lang,v 1.2 1999/12/21 17:35:16 fabian Exp $
+# $Id: filesys.french.lang,v 1.3 2003/01/29 05:48:42 wcc Exp $
 
 0x300,Conversion de l'image du système de fichier dans %s ...
 0x301,filedb-update: ne peut ouvrir le répertoire!
Index: eggdrop1.6/src/mod/irc.mod/chan.c
diff -u eggdrop1.6/src/mod/irc.mod/chan.c:1.105 eggdrop1.6/src/mod/irc.mod/chan.c:1.106
--- eggdrop1.6/src/mod/irc.mod/chan.c:1.105	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/irc.mod/chan.c	Tue Jan 28 23:48:42 2003
@@ -6,7 +6,7 @@
  *   user kickban, kick, op, deop
  *   idle kicking
  *
- * $Id: chan.c,v 1.105 2003/01/28 06:37:26 wcc Exp $
+ * $Id: chan.c,v 1.106 2003/01/29 05:48:42 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1755,8 +1755,8 @@
                 if (s[0] == '@')
                   s++;
                 if (s && s[0])
-                  dprintf(DP_HELP, "PRIVMSG %s :[%s] %s\n",
-                          chan->name, nick, s);
+                  dprintf(DP_HELP, "PRIVMSG %s :[%s] %s\n", chan->name, nick,
+                          s);
               }
             }
           }
Index: eggdrop1.6/src/mod/irc.mod/help/irc.help
diff -u eggdrop1.6/src/mod/irc.mod/help/irc.help:1.5 eggdrop1.6/src/mod/irc.mod/help/irc.help:1.6
--- eggdrop1.6/src/mod/irc.mod/help/irc.help:1.5	Thu Jun 13 22:46:49 2002
+++ eggdrop1.6/src/mod/irc.mod/help/irc.help	Tue Jan 28 23:48:42 2003
@@ -14,14 +14,14 @@
 
    If you want to add a user using a static hostmask, prefix their nick
    with a '!'. i.e. .adduser !Lamer
-   
+
 see also: +host, -host, +user, -user
 %{help=deluser}%{+m|m}
 ###  %bdeluser%b <nickname>
    deletes a user record for a user on the channel, using their
    current hostname.  Channel masters can remove users so long as
    the user isn't a bot master.
-   
+
 see also: adduser, +user, -user
 %{help=reset}%{+m}
 ###  %breset%b [channel]
@@ -33,16 +33,16 @@
    the channel name to make it reset ALL channels.
 %{help=resetbans}%{+o|o}
 ###  %bresetbans%b [channel]
-   resets the bot's ban list for the channel. any bans on the channel 
+   resets the bot's ban list for the channel. any bans on the channel
    that aren't in the ban list (either the global list or the local
    channel ban list) will be removed, and if there are any bans in the
    global ban list or channel ban list that are not currently on the
    channel, they will be added.
-   
+
 see also: bans, reset, console
 %{help=resetexempts}%{+o|o}
 ###  %bresetexempts%b [channel]
-   resets the bot's exemption list for the channel. this command 
+   resets the bot's exemption list for the channel. this command
    behaves exactly like resetbans, except it is for exempts.
 
 See also: resetbans, resetinvites
@@ -57,7 +57,7 @@
    Performs an action on the current console channel (or otherwise
    specified channel), as if the bot did it.  Just like the /me
    command in IRC.
-   
+
 See also: console
 %{help=channel}%{+o|o}
 ###  %bchannel%b [channel-name]
@@ -65,7 +65,7 @@
    the current channel attributes.  By default, it shows you the
    channel you are currently viewing on the console, but you can
    specify another channel if you wish.
- 
+
    The first line will look like:
       Channel #hiya, 8 members, 45 users, mode +tn:
    This means that the bot is sitting on channel #hiya, where 8
@@ -85,7 +85,7 @@
       m - bot master or owner            f - channel friend
       b - another bot                    d - cannot get ops (+d)
    The last field is the user at host he is using irc from.
-   
+
 See also: status, whois
 %{help=voice}%{+o|o}
 ###  %bvoice%b <nickname> [channel]
@@ -104,14 +104,14 @@
    will remove chanop from the person you specify, so long as the
    bot is opped on that channel, and the person you specify isn't
    on the bot's list of authorized chanops.
-   
+
 see also: op, console
 %{help=dehalfop}%{+o|o}
 ###  %bdehalfop%b <nickname> [channel]
    will remove halfop from the person you specify, so long as the
    bot is opped on that channel, and the person you specify isn't
    on the bot's list of authorized halfops.
-   
+
 see also: halfop, console
 %{help=invite}%{+o|o}
 ###  %binvite%b <nickname> [channel]
@@ -124,9 +124,9 @@
 %{help=kick}%{+lo|lo}
 ###  %bkick%b [channel] <nickname> [reason]
    will kick a user off your current console channel (or specified
-   other channel) with the comment given.  if you omit the reason, 
+   other channel) with the comment given.  if you omit the reason,
    the default kick comment is "requested".
-   
+
 see also: kickban, console
 %{help=kickban}%{+lo|lo}
 ###  %bkickban%b [channel] [-|@]<nickname> [comment]
@@ -147,11 +147,11 @@
         .kickban @nick *!*@host.name.domain
 
         with a host of nick!~ident at host.name.domain (strict-host set to 1)
-        
+
         command        banmask
         .kickban nick  *!*ident@*.name.domain
         .kickban -nick *!*ident at host.name.domain
-  
+
 see also: +ban, bans, stick
 %{help=msg}%{+o}
 ###  %bmsg%b <nickname> <text>
@@ -162,14 +162,14 @@
    will grant chanop to the person you specify, so long as the bot
    is opped on that channel, and the person you specify isn't being
    actively deopped by the bot.
-   
+
 see also: deop, console
 %{help=op}%{+o|o}
 ###  %bhalfop%b <nickname> [channel]
    will grant halfop to the person you specify, so long as the bot
    is opped on that channel, and the person you specify isn't being
    actively dehalfopped by the bot.
-   
+
 see also: dehalfop, console
 %{help=say}%{+o|o}
 ###  %bsay%b [channel] <text>
@@ -179,7 +179,7 @@
 ###  %btopic%b <text>
    changes the channel's topic, assuming the bot is a chanop or the
    channel is not +t (uses your current console channel).
-   
+
 see also: console
 %{help=irc module}%{+o|o}
 ###  help on the %birc module%b
@@ -195,7 +195,7 @@
        %bkick%b   %bkickban%b
 %{+o}
      for global ops:
-       %bmsg%b 
+       %bmsg%b
 %{+m|m}
      for channel masters:
        %badduser%b   %bdeluser%b
@@ -220,7 +220,7 @@
     %bresetexempts%b       %bresetinvites%b
 %{+o}
   for global ops:
-    %bmsg%b 
+    %bmsg%b
 %{+m|m}
   for channel masters:
     %badduser%b   %bdeluser%b
Index: eggdrop1.6/src/mod/irc.mod/help/set/irc.help
diff -u eggdrop1.6/src/mod/irc.mod/help/set/irc.help:1.2 eggdrop1.6/src/mod/irc.mod/help/set/irc.help:1.3
--- eggdrop1.6/src/mod/irc.mod/help/set/irc.help:1.2	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/irc.mod/help/set/irc.help	Tue Jan 28 23:48:42 2003
@@ -10,7 +10,7 @@
    considering a split user as gone for good.
 %{help=set wait-info}%{+n}
 ### %bset wait-info%b <#>
-   allows you to set the number of seconds to wait before 
+   allows you to set the number of seconds to wait before
    redisplaying a users info line when they join the channel
    (only relevant if %buse-info%b is 1).
 %{help=set modes-per-line}%{+n}
@@ -39,7 +39,7 @@
    do you want the bot to reverse all server modes?
 %{help=set max-bans}%{+n}
 ### %bset max-bans%b <#>
-   if there are more than max-bans active bans on a channel, then   
+   if there are more than max-bans active bans on a channel, then
    the bot won't try to put more bans. thus it won't flood the irc
    server.
 %{help=set max-exempts}%{+n}
@@ -59,7 +59,7 @@
 %{help=set kick-bogus}%{+n}
 ### %bset kick-bogus%b 0/1
    do you want the bot to kick bogus usernames?
-%{help=set kick-bogus}%{+n}  
+%{help=set kick-bogus}%{+n}
 ### %bset kick-bogus%b 0/1
    do you want the bot to kick for ctcp avalanches to a channel?
    remember that if it does, as it won't ban them, it can be at the
Index: eggdrop1.6/src/mod/irc.mod/irc.h
diff -u eggdrop1.6/src/mod/irc.mod/irc.h:1.23 eggdrop1.6/src/mod/irc.mod/irc.h:1.24
--- eggdrop1.6/src/mod/irc.mod/irc.h:1.23	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/irc.mod/irc.h	Tue Jan 28 23:48:42 2003
@@ -1,7 +1,7 @@
 /*
  * irc.h -- part of irc.mod
  *
- * $Id: irc.h,v 1.23 2003/01/28 06:37:26 wcc Exp $
+ * $Id: irc.h,v 1.24 2003/01/29 05:48:42 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -60,12 +60,12 @@
 /* reset(bans|exempts|invites) are now just macros that call resetmasks
  * in order to reduce the code duplication. <cybah>
  */
-#define resetbans(chan)	    resetmasks((chan), (chan)->channel.ban,	\
-				       (chan)->bans, global_bans, 'b')
-#define resetexempts(chan)  resetmasks((chan), (chan)->channel.exempt,	\
-				       (chan)->exempts, global_exempts, 'e')
-#define resetinvites(chan)  resetmasks((chan), (chan)->channel.invite,	\
-				       (chan)->invites, global_invites, 'I')
+#define resetbans(chan)     resetmasks((chan), (chan)->channel.ban,          \
+                                       (chan)->bans, global_bans, 'b')
+#define resetexempts(chan)  resetmasks((chan), (chan)->channel.exempt,       \
+                                       (chan)->exempts, global_exempts, 'e')
+#define resetinvites(chan)  resetmasks((chan), (chan)->channel.invite,       \
+                                       (chan)->invites, global_invites, 'I')
 
 static void reset_chan_info(struct chanset_t *);
 static void recheck_channel(struct chanset_t *, int);
@@ -86,9 +86,9 @@
 
 #define newban(chan, mask, who)         newmask((chan)->channel.ban, mask, who)
 #define newexempt(chan, mask, who)      newmask((chan)->channel.exempt, mask, \
-						who)
+                                                who)
 #define newinvite(chan, mask, who)      newmask((chan)->channel.invite, mask, \
-						who)
+                                                who)
 
 #else
 /* 4 - 7 */
Index: eggdrop1.6/src/mod/irc.mod/msgcmds.c
diff -u eggdrop1.6/src/mod/irc.mod/msgcmds.c:1.38 eggdrop1.6/src/mod/irc.mod/msgcmds.c:1.39
--- eggdrop1.6/src/mod/irc.mod/msgcmds.c:1.38	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/irc.mod/msgcmds.c	Tue Jan 28 23:48:42 2003
@@ -2,7 +2,7 @@
  * msgcmds.c -- part of irc.mod
  *   all commands entered via /MSG
  *
- * $Id: msgcmds.c,v 1.38 2003/01/28 06:37:26 wcc Exp $
+ * $Id: msgcmds.c,v 1.39 2003/01/29 05:48:42 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -68,8 +68,7 @@
     maskhost(s, host);
     if (make_userfile) {
       userlist = adduser(userlist, handle, host, "-",
-                         sanity_check(default_flags | USER_MASTER |
-                                      USER_OWNER));
+                 sanity_check(default_flags | USER_MASTER | USER_OWNER));
       set_user(&USERENTRY_HOSTS, get_user_by_handle(userlist, handle),
                "-telnet!*@*");
     }
Index: eggdrop1.6/src/mod/module.h
diff -u eggdrop1.6/src/mod/module.h:1.68 eggdrop1.6/src/mod/module.h:1.69
--- eggdrop1.6/src/mod/module.h:1.68	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/module.h	Tue Jan 28 23:48:41 2003
@@ -1,7 +1,7 @@
 /*
  * module.h
  *
- * $Id: module.h,v 1.68 2003/01/28 06:37:25 wcc Exp $
+ * $Id: module.h,v 1.69 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -77,14 +77,14 @@
 #endif
 
 #if defined (__CYGWIN__) && !defined(STATIC)
-#  define EXPORT_SCOPE	__declspec(dllexport)
+#  define EXPORT_SCOPE  __declspec(dllexport)
 #else
 #  define EXPORT_SCOPE
 #endif
 
 /* Version checks for modules. */
-#define EGG_IS_MIN_VER(ver) 		((ver) <= EGG_VERSION)
-#define EGG_IS_MAX_VER(ver)		((ver) >= EGG_VERSION)
+#define EGG_IS_MIN_VER(ver)             ((ver) <= EGG_VERSION)
+#define EGG_IS_MAX_VER(ver)             ((ver) >= EGG_VERSION)
 
 /* Redefine for module-relevance */
 
@@ -386,15 +386,15 @@
 #ifdef DEBUG_CONTEXT
 #  define ContextNote(note) (global[232](__FILE__, __LINE__, MODULE_NAME, note))
 #else
-#  define ContextNote(note)	do {	} while (0)
+#  define ContextNote(note)     do {    } while (0)
 #endif
 #ifdef DEBUG_ASSERT
-#  define Assert(expr)		do {					\
-	if (!(expr))							\
-		(global[233](__FILE__, __LINE__, MODULE_NAME));		\
+#  define Assert(expr)          do {                                    \
+        if (!(expr))                                                    \
+                (global[233](__FILE__, __LINE__, MODULE_NAME));         \
 } while (0)
 #else
-#  define Assert(expr)	do {	} while (0)
+#  define Assert(expr)  do {    } while (0)
 #endif
 #define allocsock ((int(*)(int sock,int options))global[234])
 #define call_hostbyip ((void(*)(IP, char *, int))global[235])
@@ -471,10 +471,10 @@
  */
 #ifndef MAKING_ENCRYPTION
 
-#  define encrypt_string(a, b)						\
-	(((char *(*)(char *,char*))encryption_funcs[4])(a,b))
-#  define decrypt_string(a, b)						\
-	(((char *(*)(char *,char*))encryption_funcs[5])(a,b))
+#  define encrypt_string(a, b)                                          \
+        (((char *(*)(char *,char*))encryption_funcs[4])(a,b))
+#  define decrypt_string(a, b)                                          \
+        (((char *(*)(char *,char*))encryption_funcs[5])(a,b))
 #endif
 
 #endif /* _EGG_MOD_MODULE_H */
Index: eggdrop1.6/src/mod/modvals.h
diff -u eggdrop1.6/src/mod/modvals.h:1.24 eggdrop1.6/src/mod/modvals.h:1.25
--- eggdrop1.6/src/mod/modvals.h:1.24	Tue Jan 28 00:37:25 2003
+++ eggdrop1.6/src/mod/modvals.h	Tue Jan 28 23:48:41 2003
@@ -1,7 +1,7 @@
 /*
  * modvals.h
  *
- * $Id: modvals.h,v 1.24 2003/01/28 06:37:25 wcc Exp $
+ * $Id: modvals.h,v 1.25 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -25,65 +25,65 @@
 #ifndef _EGG_MOD_MODVALS_H
 #define _EGG_MOD_MODVALS_H
 
-/* #define HOOK_GET_FLAGREC	  0 	*/
-/* #define HOOK_BUILD_FLAGREC	  1 	*/
-/* #define HOOK_SET_FLAGREC	  2 	*/
-#define HOOK_READ_USERFILE	  3
-#define HOOK_REHASH		  4
-#define HOOK_MINUTELY		  5
-#define HOOK_DAILY		  6
-#define HOOK_HOURLY		  7
-#define HOOK_USERFILE		  8
-#define HOOK_SECONDLY		  9
-#define HOOK_PRE_REHASH		 10
-#define HOOK_IDLE		 11
-#define HOOK_5MINUTELY		 12
-#define HOOK_LOADED		 13
-#define HOOK_BACKUP     	 14
-#define HOOK_DIE		 15
-#define REAL_HOOKS		 16
-#define HOOK_SHAREOUT		105
-#define HOOK_SHAREIN		106
-#define HOOK_ENCRYPT_PASS	107
-#define HOOK_QSERV		108
-#define HOOK_ADD_MODE		109
-#define HOOK_MATCH_NOTEREJ	110
-#define HOOK_RFC_CASECMP	111
-#define HOOK_DNS_HOSTBYIP	112
-#define HOOK_DNS_IPBYHOST	113
+/* #define HOOK_GET_FLAGREC       0     */
+/* #define HOOK_BUILD_FLAGREC     1     */
+/* #define HOOK_SET_FLAGREC       2     */
+#define HOOK_READ_USERFILE        3
+#define HOOK_REHASH               4
+#define HOOK_MINUTELY             5
+#define HOOK_DAILY                6
+#define HOOK_HOURLY               7
+#define HOOK_USERFILE             8
+#define HOOK_SECONDLY             9
+#define HOOK_PRE_REHASH          10
+#define HOOK_IDLE                11
+#define HOOK_5MINUTELY           12
+#define HOOK_LOADED              13
+#define HOOK_BACKUP              14
+#define HOOK_DIE                 15
+#define REAL_HOOKS               16
+#define HOOK_SHAREOUT           105
+#define HOOK_SHAREIN            106
+#define HOOK_ENCRYPT_PASS       107
+#define HOOK_QSERV              108
+#define HOOK_ADD_MODE           109
+#define HOOK_MATCH_NOTEREJ      110
+#define HOOK_RFC_CASECMP        111
+#define HOOK_DNS_HOSTBYIP       112
+#define HOOK_DNS_IPBYHOST       113
 #define HOOK_ENCRYPT_STRING     114
 #define HOOK_DECRYPT_STRING     115
 
 /* These are FIXED once they are in a release they STAY
  */
-#define MODCALL_START		  0
-#define MODCALL_CLOSE		  1
-#define MODCALL_EXPMEM		  2
-#define MODCALL_REPORT		  3
+#define MODCALL_START             0
+#define MODCALL_CLOSE             1
+#define MODCALL_EXPMEM            2
+#define MODCALL_REPORT            3
 /* Filesys */
-#define FILESYS_REMOTE_REQ	  4
-#define FILESYS_ADDFILE		  5
-#define FILESYS_INCRGOTS	  6
-#define FILESYS_ISVALID		  7
+#define FILESYS_REMOTE_REQ        4
+#define FILESYS_ADDFILE           5
+#define FILESYS_INCRGOTS          6
+#define FILESYS_ISVALID           7
 /* Share */
-#define SHARE_FINISH		  4
-#define SHARE_DUMP_RESYNC	  5
+#define SHARE_FINISH              4
+#define SHARE_DUMP_RESYNC         5
 /* Channels */
-#define CHANNEL_CLEAR		 15
+#define CHANNEL_CLEAR            15
 /* Server */
-#define SERVER_BOTNAME		  4
-#define SERVER_BOTUSERHOST	  5
-#define SERVER_NICKLEN		 38
+#define SERVER_BOTNAME            4
+#define SERVER_BOTUSERHOST        5
+#define SERVER_NICKLEN           38
 /* IRC */
-#define IRC_RECHECK_CHANNEL	  15
+#define IRC_RECHECK_CHANNEL       15
 #define IRC_RECHECK_CHANNEL_MODES 17
-#define IRC_DO_CHANNEL_PART	  19
-#define IRC_CHECK_THIS_BAN	  20
+#define IRC_DO_CHANNEL_PART       19
+#define IRC_CHECK_THIS_BAN        20
 #define IRC_CHECK_THIS_USER       21
 /* Notes */
-#define NOTES_CMD_NOTE		  4
+#define NOTES_CMD_NOTE            4
 /* Console */
-#define CONSOLE_DOSTORE		  4
+#define CONSOLE_DOSTORE           4
 
 #ifdef HPUX_HACKS
 #  include <dl.h>
@@ -97,14 +97,14 @@
 #ifndef STATIC
 #  ifdef HPUX_HACKS
   shl_t hand;
-#  else                         /* !HPUX_HACKS */
+#  else /* !HPUX_HACKS */
   void *hand;                   /* Module handle                        */
-#  endif                        /* !HPUX_HACKS */
-#endif                          /* STATIC */
+#  endif /* !HPUX_HACKS */
+#endif /* STATIC */
   Function *funcs;
-#  ifdef DEBUG_MEM
+#ifdef DEBUG_MEM
   int mem_work;
-#  endif                        /* DEBUG_MEM */
+#endif /* DEBUG_MEM */
 } module_entry;
 
 #endif /* _EGG_MOD_MODVALS_H */
Index: eggdrop1.6/src/mod/notes.mod/help/notes.help
diff -u eggdrop1.6/src/mod/notes.mod/help/notes.help:1.2 eggdrop1.6/src/mod/notes.mod/help/notes.help:1.3
--- eggdrop1.6/src/mod/notes.mod/help/notes.help:1.2	Wed Jan  2 02:06:16 2002
+++ eggdrop1.6/src/mod/notes.mod/help/notes.help	Tue Jan 28 23:48:42 2003
@@ -4,7 +4,7 @@
 ###  %bnotes erase%b <# or ALL>
    lets you manipulate notes that have been stored up for you while
    you were gone.  %b'notes index'%b gives a listing of all the notes
-   stored up: who they are from, and when they were left.  
+   stored up: who they are from, and when they were left.
    %b'notes read'%b lets you read some or all notes, according to a
    list of numbers and/or intervals separated by semicolon.
    and %b'notes erase'%b erases notes after you are done with them.
@@ -14,7 +14,7 @@
 %{help=notes module}
 ###  help on the %bnotes modules%b
    This module provides the means for storing & retrieving notes
-   at a later stage. 
+   at a later stage.
    Commands:
       %bnotes%b%{+m}  %bfwd%b%{-}
    (use %b'.help notes'%b for more info)
@@ -64,5 +64,5 @@
    you join the channel, and have notes stored for you on the bot,
    it will tell you.  to send a note to someone on a different bot,
    use "nick at bot" for the nickname.
-   
+
 see also: whom, notes, noteigns
Index: eggdrop1.6/src/mod/notes.mod/help/set/notes.help
diff -u eggdrop1.6/src/mod/notes.mod/help/set/notes.help:1.1 eggdrop1.6/src/mod/notes.mod/help/set/notes.help:1.2
--- eggdrop1.6/src/mod/notes.mod/help/set/notes.help:1.1	Thu Oct 21 14:23:08 1999
+++ eggdrop1.6/src/mod/notes.mod/help/set/notes.help	Tue Jan 28 23:48:42 2003
@@ -9,7 +9,7 @@
    for the user.
 %{help=set allow-fwd}%{+n}
 ###  %bset allow-fwd%b 0/1
-   This setting determines if note forwarding is permitted. If a 
+   This setting determines if note forwarding is permitted. If a
    note is about to be stored (since the user is note currently
    online) and they have a forwarding setting and this value is
    1 the note will be forwarded to the appropriate user.
Index: eggdrop1.6/src/mod/notes.mod/language/notes.french.lang
diff -u eggdrop1.6/src/mod/notes.mod/language/notes.french.lang:1.1 eggdrop1.6/src/mod/notes.mod/language/notes.french.lang:1.2
--- eggdrop1.6/src/mod/notes.mod/language/notes.french.lang:1.1	Sun Dec  2 15:43:28 2001
+++ eggdrop1.6/src/mod/notes.mod/language/notes.french.lang	Tue Jan 28 23:48:42 2003
@@ -1,7 +1,7 @@
 # notes.french.lang
 #   language messages for the notes module
 #
-# $Id: notes.french.lang,v 1.1 2001/12/02 21:43:28 guppy Exp $
+# $Id: notes.french.lang,v 1.2 2003/01/29 05:48:42 wcc Exp $
 
 0xc000,  Fait suivre les notes à : %.70s\n
 0xc001,%d note%s transférées de %s à %s.
@@ -15,7 +15,7 @@
 0xc009,Vous n'avez pas de messages
 0xc00a, -- EXPIRE AUJOURD'HUI
 0xc00b, -- EXPIRE DANS %d JOUR%s
-0xc00c,Vous avez les notes suivantes en attente 
+0xc00c,Vous avez les notes suivantes en attente
 0xc00d,Vous n'avez pas autant de messages
 0xc00e,Utilisez '.notes read' pour les lire.
 0xc00f,Je ne peux pas modifier le fichier de notes
Index: eggdrop1.6/src/mod/notes.mod/notes.h
diff -u eggdrop1.6/src/mod/notes.mod/notes.h:1.10 eggdrop1.6/src/mod/notes.mod/notes.h:1.11
--- eggdrop1.6/src/mod/notes.mod/notes.h:1.10	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/notes.mod/notes.h	Tue Jan 28 23:48:42 2003
@@ -1,7 +1,7 @@
 /*
  * notes.h -- part of notes.mod
  *
- * $Id: notes.h,v 1.10 2003/01/28 06:37:26 wcc Exp $
+ * $Id: notes.h,v 1.11 2003/01/29 05:48:42 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -29,50 +29,50 @@
 
 /* language #define's */
 
-#define NOTES_USAGE			MISC_USAGE
-#define NOTES_USERF_UNKNOWN		USERF_UNKNOWN
-#define NOTES_FORWARD_TO		get_language(0xc000)
-#define NOTES_SWITCHED_NOTES		get_language(0xc001)
-#define NOTES_EXPIRED			get_language(0xc002)
-#define NOTES_FORWARD_NOTONLINE		get_language(0xc003)
-#define NOTES_UNSUPPORTED		get_language(0xc004)
-#define NOTES_NOTES2MANY		get_language(0xc005)
-#define NOTES_NOTEFILE_FAILED		get_language(0xc006)
-#define NOTES_NOTEFILE_UNREACHABLE	get_language(0xc007)
-#define NOTES_STORED_MESSAGE		get_language(0xc008)
-#define NOTES_NO_MESSAGES		get_language(0xc009)
-#define NOTES_EXPIRE_TODAY		get_language(0xc00a)
-#define NOTES_EXPIRE_XDAYS		get_language(0xc00b)
-#define NOTES_WAITING			get_language(0xc00c)
-#define NOTES_NOT_THAT_MANY		get_language(0xc00d)
-#define NOTES_DCC_USAGE_READ		get_language(0xc00e)
-#define NOTES_FAILED_CHMOD		get_language(0xc00f)
-#define NOTES_ERASED_ALL		get_language(0xc010)
-#define NOTES_ERASED			get_language(0xc011)
-#define NOTES_LEFT			get_language(0xc012)
-#define NOTES_MAYBE			get_language(0xc013)
-#define NOTES_NOTTO_BOT			get_language(0xc014)
-#define NOTES_OUTSIDE			get_language(0xc015)
-#define NOTES_DELIVERED			get_language(0xc016)
-#define NOTES_FORLIST			get_language(0xc017)
-#define NOTES_WAITING_ON		get_language(0xc018)
-#define NOTES_WAITING2			get_language(0xc019)
-#define NOTES_DCC_USAGE_READ2		get_language(0xc01a)
-#define NOTES_STORED			get_language(0xc01b)
-#define NOTES_IGN_OTHERS		get_language(0xc01c)
-#define NOTES_UNKNOWN_USER		get_language(0xc01d)
-#define NOTES_IGN_NEW			get_language(0xc01e)
-#define NOTES_IGN_ALREADY		get_language(0xc01f)
-#define NOTES_IGN_REM			get_language(0xc020)
-#define NOTES_IGN_NOTFOUND		get_language(0xc021)
-#define NOTES_IGN_NONE			get_language(0xc022)
-#define NOTES_IGN_FOR			get_language(0xc023)
-#define NOTES_NO_SUCH_USER		get_language(0xc024)
-#define NOTES_FWD_OWNER			get_language(0xc025)
-#define NOTES_FWD_FOR			get_language(0xc026)
-#define NOTES_FWD_BOTNAME		get_language(0xc027)
-#define NOTES_FWD_CHANGED		get_language(0xc028)
-#define NOTES_MUSTBE			get_language(0xc029)
+#define NOTES_USAGE                     MISC_USAGE
+#define NOTES_USERF_UNKNOWN             USERF_UNKNOWN
+#define NOTES_FORWARD_TO                get_language(0xc000)
+#define NOTES_SWITCHED_NOTES            get_language(0xc001)
+#define NOTES_EXPIRED                   get_language(0xc002)
+#define NOTES_FORWARD_NOTONLINE         get_language(0xc003)
+#define NOTES_UNSUPPORTED               get_language(0xc004)
+#define NOTES_NOTES2MANY                get_language(0xc005)
+#define NOTES_NOTEFILE_FAILED           get_language(0xc006)
+#define NOTES_NOTEFILE_UNREACHABLE      get_language(0xc007)
+#define NOTES_STORED_MESSAGE            get_language(0xc008)
+#define NOTES_NO_MESSAGES               get_language(0xc009)
+#define NOTES_EXPIRE_TODAY              get_language(0xc00a)
+#define NOTES_EXPIRE_XDAYS              get_language(0xc00b)
+#define NOTES_WAITING                   get_language(0xc00c)
+#define NOTES_NOT_THAT_MANY             get_language(0xc00d)
+#define NOTES_DCC_USAGE_READ            get_language(0xc00e)
+#define NOTES_FAILED_CHMOD              get_language(0xc00f)
+#define NOTES_ERASED_ALL                get_language(0xc010)
+#define NOTES_ERASED                    get_language(0xc011)
+#define NOTES_LEFT                      get_language(0xc012)
+#define NOTES_MAYBE                     get_language(0xc013)
+#define NOTES_NOTTO_BOT                 get_language(0xc014)
+#define NOTES_OUTSIDE                   get_language(0xc015)
+#define NOTES_DELIVERED                 get_language(0xc016)
+#define NOTES_FORLIST                   get_language(0xc017)
+#define NOTES_WAITING_ON                get_language(0xc018)
+#define NOTES_WAITING2                  get_language(0xc019)
+#define NOTES_DCC_USAGE_READ2           get_language(0xc01a)
+#define NOTES_STORED                    get_language(0xc01b)
+#define NOTES_IGN_OTHERS                get_language(0xc01c)
+#define NOTES_UNKNOWN_USER              get_language(0xc01d)
+#define NOTES_IGN_NEW                   get_language(0xc01e)
+#define NOTES_IGN_ALREADY               get_language(0xc01f)
+#define NOTES_IGN_REM                   get_language(0xc020)
+#define NOTES_IGN_NOTFOUND              get_language(0xc021)
+#define NOTES_IGN_NONE                  get_language(0xc022)
+#define NOTES_IGN_FOR                   get_language(0xc023)
+#define NOTES_NO_SUCH_USER              get_language(0xc024)
+#define NOTES_FWD_OWNER                 get_language(0xc025)
+#define NOTES_FWD_FOR                   get_language(0xc026)
+#define NOTES_FWD_BOTNAME               get_language(0xc027)
+#define NOTES_FWD_CHANGED               get_language(0xc028)
+#define NOTES_MUSTBE                    get_language(0xc029)
 
 #ifdef MAKING_NOTES
 static int get_note_ignores(struct userrec *, char ***);
Index: eggdrop1.6/src/mod/seen.mod/help/msg/seen.help
diff -u eggdrop1.6/src/mod/seen.mod/help/msg/seen.help:1.2 eggdrop1.6/src/mod/seen.mod/help/msg/seen.help:1.3
--- eggdrop1.6/src/mod/seen.mod/help/msg/seen.help:1.2	Sat Sep 23 12:47:50 2000
+++ eggdrop1.6/src/mod/seen.mod/help/msg/seen.help	Tue Jan 28 23:48:42 2003
@@ -1,5 +1,5 @@
 %{help=seen}
 ###  %bseen%b <handle>
    This returns how long it is since the user was last seen by
-   the bot. There may also be a public command available on 
+   the bot. There may also be a public command available on
    channels that does the same thing.
Index: eggdrop1.6/src/mod/seen.mod/help/seen.help
diff -u eggdrop1.6/src/mod/seen.mod/help/seen.help:1.1 eggdrop1.6/src/mod/seen.mod/help/seen.help:1.2
--- eggdrop1.6/src/mod/seen.mod/help/seen.help:1.1	Thu Oct 21 14:23:09 1999
+++ eggdrop1.6/src/mod/seen.mod/help/seen.help	Tue Jan 28 23:48:42 2003
@@ -1,6 +1,6 @@
 %{help=seen}
 ###  %bseen%b <handle>
-   Returns the last time <handle> was seen by the bot. 
+   Returns the last time <handle> was seen by the bot.
 %{help=seen module}
 ###  help for the %bseen module%b
    This module provides the classic %b'seen'%b command, which
Index: eggdrop1.6/src/mod/server.mod/help/server.help
diff -u eggdrop1.6/src/mod/server.mod/help/server.help:1.4 eggdrop1.6/src/mod/server.mod/help/server.help:1.5
--- eggdrop1.6/src/mod/server.mod/help/server.help:1.4	Wed Jan  2 02:06:16 2002
+++ eggdrop1.6/src/mod/server.mod/help/server.help	Tue Jan 28 23:48:42 2003
@@ -2,7 +2,7 @@
 ###  %bdump%b <text>
    dumps the text to the server.  keep in mind that this bot doesn't
    run through ircII, so ircII commands will most likely not work this
-   way.  they need to be raw irc codes. read rfc1459 from ftp.internic.net 
+   way.  they need to be raw irc codes. read rfc1459 from ftp.internic.net
    for more help.
 %{help=jump}%{+m}
 ###  %bjump%b [server [port [pass]]]
@@ -27,12 +27,12 @@
 ###  help on the %bserver module%b
    This module provides all that's need to get a bot on a server and
    sitting there, it provides server connection, raw irc, private
-   message/notice/ctcp handling. 
+   message/notice/ctcp handling.
    Command(s) avalible: (use %b'.help <command>'%b for more info)
       %bservers%b  %{+m}%bjump%b  %bdump%b
 %{+n}
    There is also a list of Tcl settings available,
-   use %b'.help server settings'%b   
+   use %b'.help server settings'%b
 %{help=all}%{+o|o}
 ###  commands for the %bserver module%b
   %bservers%b  %{+m}%bjump%b  %bdump%b
Index: eggdrop1.6/src/mod/server.mod/help/set/server.help
diff -u eggdrop1.6/src/mod/server.mod/help/set/server.help:1.7 eggdrop1.6/src/mod/server.mod/help/set/server.help:1.8
--- eggdrop1.6/src/mod/server.mod/help/set/server.help:1.7	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/server.mod/help/set/server.help	Tue Jan 28 23:48:42 2003
@@ -4,7 +4,7 @@
    (in 'nick') is in use.  if the alternate nickname is also in
    use, or is blank, the bot will try sticking digits at the end
    of the preferred nick until it gets one that works.
-   
+
 see also: set nick, set botnet-nick
 %{help=set realname}%{+n}
 ###  %bset realname%b <text>
@@ -13,7 +13,7 @@
    one's user at host.  it can be anything you want, but IRC sets
    a maximum length so it might get cut off if you set it too
    long.
-   
+
 see also: set username
 %{help=set init-server}%{+n}
 ###  %bset init-server%b <raw-irc-text>
@@ -67,7 +67,7 @@
    it is forced to change nicks.  if this is on, and you change the bot's
    nick on irc through a Tcl script or the %b'.dump'%b command, then the bot
    will change back to its intended nick within 60 seconds.
-   
+
 see also: set nick, set altnick
 %{help=set check-stoned}%{+n}
 ###  %bset check-stoned%b 0/1
@@ -77,11 +77,11 @@
 %{help=set serverror-quit}%{+n}
 ###  %bset serverror-quit%b 0/1
    Enabling this will cause the bot to assume that an ERROR message
-   from the server indicates it's about to drop the connection, 
+   from the server indicates it's about to drop the connection,
    and so the bot closes the server connection immediately.
 %{help=set quiet-reject}%{+n}
 ###  %bset quiet-reject%b 0/1
-   Some of the message & ctcp commands return negative messages to 
+   Some of the message & ctcp commands return negative messages to
    unknown users, while this is polite & useful, it's also a
    possible detection method, enabling this will cause the bot
    to only send positive responses to know users.
@@ -103,36 +103,36 @@
    This sets the number of seconds to wait between successive server
    connects, this can be used to prevent the throttling problems
    with ircu & connecting too quickly.
-%{help=set default-port}%{+n}   
+%{help=set default-port}%{+n}
 ###  %bset default-port%b <#>
    sets the default port the bot tries to connect to when there
    is not port specified in the server list.
 %{help=set nick}%{+n}
 ###  %bset nick%b <nickname>
    specifies the bot's default nickname to use on IRC and on
-   the botnet, unless botnet-nick is set differently.  
-   
+   the botnet, unless botnet-nick is set differently.
+
 see also: set altnick, set botnet-nick
 %{help=set flood-ctcp}%{+n}
 ###  %bset flood-ctcp%b <#ctcps>[:<#seconds>]
    specifies the flood threshold for CTCP queries (to the bot).
-   if the same host dumps more than this many CTCPs to the bot 
+   if the same host dumps more than this many CTCPs to the bot
    within 60 seconds, they will be placed on automatic ignore.
    you can also specify the number of seconds to scan by adding
    that after a colon (:).  if you set the number of ctcps to 0,
    you disable ctcp flood protection (including avalanche flood
    protection).
-   
+
 see also: set flood-msg
 %{help=set flood-msg}%{+n}
 ###  %bset flood-msg%b <#msgs>[:<#seconds>]
-   specifies the flood threshold for /MSG's. if the same host 
+   specifies the flood threshold for /MSG's. if the same host
    dumps more than this many /MSG's to the bot within 60 seconds,
    it is considered a flood and that host is put on automatic
    ignore.  you can change the scanning time from 60 seconds by
    specifying the number of seconds after a colon (:).  setting
    the # of msgs to 0 turns off msg flood protection.
-  
+
    examples:
      set flood-msg 10
        (10 msgs in 60 seconds is a flood)
@@ -140,7 +140,7 @@
        (5 msgs in 15 seconds is a flood)
      set flood-msg 0
        (turns off msg flood protection)
-       
+
 see also: set flood-ctcp
 %{help=set servers}%{+n}
 ###  %bset servers%b <server-list>
@@ -154,7 +154,7 @@
       }
    note that if you omit the port, it will assume the value of the
    %bdefault-port%b setting.
-   
+
 see also: default-port
 %{help=set botname}%{+n}
 ###  %bset botname%b
Index: eggdrop1.6/src/mod/server.mod/server.c
diff -u eggdrop1.6/src/mod/server.mod/server.c:1.89 eggdrop1.6/src/mod/server.mod/server.c:1.90
--- eggdrop1.6/src/mod/server.mod/server.c:1.89	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/server.mod/server.c	Tue Jan 28 23:48:42 2003
@@ -2,7 +2,7 @@
  * server.c -- part of server.mod
  *   basic irc server support
  *
- * $Id: server.c,v 1.89 2003/01/28 06:37:26 wcc Exp $
+ * $Id: server.c,v 1.90 2003/01/29 05:48:42 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1492,13 +1492,13 @@
 }
 
 /* Trace the servers */
-#define tcl_traceserver(name, ptr) \
-  Tcl_TraceVar(interp, name, TCL_TRACE_READS | TCL_TRACE_WRITES |	\
-	       TCL_TRACE_UNSETS, tcl_eggserver, (ClientData) ptr)
-
-#define tcl_untraceserver(name, ptr) \
-  Tcl_UntraceVar(interp, name, TCL_TRACE_READS | TCL_TRACE_WRITES |	\
-		 TCL_TRACE_UNSETS, tcl_eggserver, (ClientData) ptr)
+#define tcl_traceserver(name, ptr)                                      \
+  Tcl_TraceVar(interp, name, TCL_TRACE_READS | TCL_TRACE_WRITES |       \
+               TCL_TRACE_UNSETS, tcl_eggserver, (ClientData) ptr)
+
+#define tcl_untraceserver(name, ptr)                                    \
+  Tcl_UntraceVar(interp, name, TCL_TRACE_READS | TCL_TRACE_WRITES |     \
+                 TCL_TRACE_UNSETS, tcl_eggserver, (ClientData) ptr)
 
 
 /*
Index: eggdrop1.6/src/mod/server.mod/server.h
diff -u eggdrop1.6/src/mod/server.mod/server.h:1.16 eggdrop1.6/src/mod/server.mod/server.h:1.17
--- eggdrop1.6/src/mod/server.mod/server.h:1.16	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/server.mod/server.h	Tue Jan 28 23:48:42 2003
@@ -1,7 +1,7 @@
 /*
  * server.h -- part of server.mod
  *
- * $Id: server.h,v 1.16 2003/01/28 06:37:26 wcc Exp $
+ * $Id: server.h,v 1.17 2003/01/29 05:48:42 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -79,9 +79,9 @@
 /* Macros for commonly used commands.
  */
 
-#define free_null(ptr)	do {				\
-	nfree(ptr);					\
-	ptr = NULL;					\
+#define free_null(ptr)  do {                            \
+        nfree(ptr);                                     \
+        ptr = NULL;                                     \
 } while (0)
 
 #endif /* MAKING_SERVER */
Index: eggdrop1.6/src/mod/share.mod/help/share.help
diff -u eggdrop1.6/src/mod/share.mod/help/share.help:1.4 eggdrop1.6/src/mod/share.mod/help/share.help:1.5
--- eggdrop1.6/src/mod/share.mod/help/share.help:1.4	Wed Jan  2 02:06:16 2002
+++ eggdrop1.6/src/mod/share.mod/help/share.help	Tue Jan 28 23:48:42 2003
@@ -3,7 +3,7 @@
    clears the resync buffer for a share-bot.  this is useful if you
    want to start over with a userfile transfer: you can unlink the
    sharebots, flush the resync buffer, and relink.
-   
+
 see also: link, chattr, unlink
 %{help=set allow-resync}%{+n}
 ###  %bset allow-resync%b 0/1
@@ -12,29 +12,29 @@
    that occur for %bresync-time%b seconds and send only these when
    the sharebot reconnects, this has been know to be a bit unreliable
    in the past, hence the option.
-   
+
 see also: set resync-time
 %{help=set resync-time}%{+n}
 ###  %bset resync-time%b <#>
    This sets the number of seconds to store resync information for
    a sharebot before it's assumed to be dead & buried, and therefore
    the userfile needs to be re-sent.
-   
+
 see also: set allow-resync
 %{help=set private-global}%{+n}
 ###  %bset private-global%b 0/1
    If you are sharing userfiles with someone else, and you don't
-   want %bany%b global flags on the other bots propagated to your bot, 
+   want %bany%b global flags on the other bots propagated to your bot,
    set this.  It overrides the setting of private-globals.
-   
+
 see also: set private-globals
 %{help=set private-globals}%{+n}
 ###  %bset private-globals%b [flags]
    If you are sharing userfiles with someone else, and you don't
-   want various global flags on the other bots propagated to your bot, 
+   want various global flags on the other bots propagated to your bot,
    set this to the global flags you would like to remain unaffected.
-   The setting of private-global will override this.   
-   
+   The setting of private-global will override this.
+
 see also: set private-global
 %{help=share module}%{+n}
 ###  help on the %bshare module%b
@@ -52,12 +52,12 @@
    First you need to decide 2 things:
      (1) which bot will be 'active' and which 'passive',
          the passive bot's userfile WILL GET OVERWRITTEN
-	 so choose carefully.
-	 We shall call the ACTIVE bot A, the PASSIVE bot B
+         so choose carefully.
+         We shall call the ACTIVE bot A, the PASSIVE bot B
      (2) which channels you want to share between the 2 bots.
          Only the channels you choose to share will have their
-	 info shared, ALL global info will be shared.
-	 
+         info shared, ALL global info will be shared.
+
    Steps:
      (1) Do for each of the channels you want to share a
          .chanset #channel +shared
@@ -66,7 +66,7 @@
      (3) for each channel you want shared between the two,
            on A type: '.botattr B |+s #channel'
            on B type: '.botattr A |+s #channel'
-     (4) link them together, they should start sharing immediately	   
+     (4) link them together, they should start sharing immediately
 %{help=all}%{+n}
 ###  commands for the %bshare module%b
   %bflush%b
Index: eggdrop1.6/src/mod/share.mod/share.c
diff -u eggdrop1.6/src/mod/share.mod/share.c:1.69 eggdrop1.6/src/mod/share.mod/share.c:1.70
--- eggdrop1.6/src/mod/share.mod/share.c:1.69	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/share.mod/share.c	Tue Jan 28 23:48:42 2003
@@ -1,7 +1,7 @@
 /*
  * share.c -- part of share.mod
  *
- * $Id: share.c,v 1.69 2003/01/28 06:37:26 wcc Exp $
+ * $Id: share.c,v 1.70 2003/01/29 05:48:42 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -206,9 +206,9 @@
       struct chanuserrec *cr;
 
       if ((chan != NULL) && ((channel_shared(chan) &&
-                              ((cr = get_chanrec(dcc[idx].user, par)) &&
-                               (cr->flags & BOT_AGGRESSIVE))) ||
-                             (bot_flags(dcc[idx].user) & BOT_GLOBAL)))
+          ((cr = get_chanrec(dcc[idx].user, par)) &&
+          (cr->flags & BOT_AGGRESSIVE))) ||
+          (bot_flags(dcc[idx].user) & BOT_GLOBAL)))
         if (u_setsticky_ban(chan, host, yn) > 0) {
           putlog(LOG_CMDS, "*", "%s: %s %s %s", dcc[idx].nick,
                  (yn) ? "stick" : "unstick", host, par);
@@ -247,9 +247,9 @@
       struct chanuserrec *cr;
 
       if ((chan != NULL) && ((channel_shared(chan) &&
-                              ((cr = get_chanrec(dcc[idx].user, par)) &&
-                               (cr->flags & BOT_AGGRESSIVE))) ||
-                             (bot_flags(dcc[idx].user) & BOT_GLOBAL)))
+          ((cr = get_chanrec(dcc[idx].user, par)) &&
+          (cr->flags & BOT_AGGRESSIVE))) ||
+          (bot_flags(dcc[idx].user) & BOT_GLOBAL)))
         if (u_setsticky_exempt(chan, host, yn) > 0) {
           putlog(LOG_CMDS, "*", "%s: %s %s %s", dcc[idx].nick,
                  (yn) ? "stick" : "unstick", host, par);
@@ -288,9 +288,9 @@
       struct chanuserrec *cr;
 
       if ((chan != NULL) && ((channel_shared(chan) &&
-                              ((cr = get_chanrec(dcc[idx].user, par)) &&
-                               (cr->flags & BOT_AGGRESSIVE))) ||
-                             (bot_flags(dcc[idx].user) & BOT_GLOBAL)))
+          ((cr = get_chanrec(dcc[idx].user, par)) &&
+          (cr->flags & BOT_AGGRESSIVE))) ||
+          (bot_flags(dcc[idx].user) & BOT_GLOBAL)))
         if (u_setsticky_invite(chan, host, yn) > 0) {
           putlog(LOG_CMDS, "*", "%s: %s %s %s", dcc[idx].nick,
                  (yn) ? "stick" : "unstick", host, par);
@@ -350,7 +350,8 @@
             fr2.match = FR_CHAN;
             break_down_flags(atr, &fr, 0);
             get_user_flagrec(u, &fr2, par);
-            fr.chan = (fr2.chan & BOT_AGGRESSIVE) | (fr.chan & ~BOT_AGGRESSIVE);
+            fr.chan = (fr2.chan & BOT_AGGRESSIVE) |
+                      (fr.chan & ~BOT_AGGRESSIVE);
             set_user_flagrec(u, &fr, par);
             check_dcc_chanattrs(u, par, fr.chan, fr2.chan);
             noshare = 0;
@@ -377,8 +378,7 @@
           break_down_flags(atr, &fr, 0);
           bfl = u->flags & USER_BOT;
           ofl = fr.global;
-          fr.global = (fr.global &~pgbm)
-            |(u->flags & pgbm);
+          fr.global = (fr.global &~pgbm) | (u->flags & pgbm);
           fr.global = sanity_check(fr.global |bfl);
 
           set_user_flagrec(u, &fr, 0);
@@ -1460,11 +1460,10 @@
   for (i = 0; i < dcc_total; i++)
     if (dcc[i].type->flags & DCT_BOT) {
       if (dcc[i].status & STAT_OFFERED) {
-        if (now - dcc[i].timeval > 120) {
-          if (dcc[i].user && (bot_flags(dcc[i].user) & BOT_AGGRESSIVE))
-            dprintf(i, "s u?\n");
+        if ((now - dcc[i].timeval > 120) && (dcc[i].user &&
+            (bot_flags(dcc[i].user) & BOT_AGGRESSIVE)))
+          dprintf(i, "s u?\n");
           /* ^ send it again in case they missed it */
-        }
         /* If it's a share bot that hasnt been sharing, ask again */
       }
       else if (!(dcc[i].status & STAT_SHARE)) {
@@ -1660,10 +1659,7 @@
   for (u = userlist; u; u = u->next)
     /* Only copying non-bot entries? */
     if (((t == 0) && !(u->flags & (USER_BOT | USER_UNSHARED))) ||
-        /* ... or only copying bot entries? */
-        ((t == 1) && (u->flags & (USER_BOT | USER_UNSHARED))) ||
-        /* ... or copying everything? */
-        (t == 2)) {
+        ((t == 1) && (u->flags & (USER_BOT | USER_UNSHARED))) || (t == 2)) {
       p = get_user(&USERENTRY_PASS, u);
       u1 = adduser(NULL, u->handle, 0, p, u->flags);
       u1->flags_udef = u->flags_udef;
@@ -1821,7 +1817,8 @@
       set_user(&USERENTRY_BOTFL, u, get_user(&USERENTRY_BOTFL, u2));
       set_user(&USERENTRY_PASS, u, get_user(&USERENTRY_PASS, u2));
     }
-    else if ((dcc[j].u.bot->uff_flags & UFF_OVERRIDE) && (u->flags & USER_BOT)) {
+    else if ((dcc[j].u.bot->uff_flags & UFF_OVERRIDE) &&
+             (u->flags & USER_BOT)) {
       /* This bot was unknown to us, reset it's flags and password. */
       set_user(&USERENTRY_BOTFL, u, NULL);
       set_user(&USERENTRY_PASS, u, NULL);
@@ -2031,8 +2028,8 @@
       j = 0;
       for (i = 0; i < dcc_total; i++)
         if ((!egg_strcasecmp(dcc[i].host, dcc[idx].nick)) &&
-            ((dcc[i].type->flags & (DCT_FILETRAN | DCT_FILESEND))
-             == DCT_FILETRAN))
+            ((dcc[i].type->flags & (DCT_FILETRAN | DCT_FILESEND)) ==
+            DCT_FILETRAN))
           j = i;
       if (j != 0) {
         killsock(dcc[j].sock);
@@ -2148,13 +2145,12 @@
           int ok = 0;
 
           for (j = 0; j < dcc_total; j++)
-            if (((dcc[j].type->flags & (DCT_FILETRAN | DCT_FILESEND))
-                 == (DCT_FILETRAN | DCT_FILESEND)) &&
+            if (((dcc[j].type->flags & (DCT_FILETRAN | DCT_FILESEND)) ==
+                (DCT_FILETRAN | DCT_FILESEND)) &&
                 !egg_strcasecmp(dcc[j].host, dcc[i].nick)) {
               dprintf(idx, "Downloading userlist from %s (%d%% done)\n",
-                      dcc[i].nick,
-                      (int) (100.0 * ((float) dcc[j].status) /
-                             ((float) dcc[j].u.xfer->length)));
+                      dcc[i].nick, (int) (100.0 * ((float) dcc[j].status) /
+                      ((float) dcc[j].u.xfer->length)));
               ok = 1;
               break;
             }
Index: eggdrop1.6/src/mod/share.mod/share.h
diff -u eggdrop1.6/src/mod/share.mod/share.h:1.6 eggdrop1.6/src/mod/share.mod/share.h:1.7
--- eggdrop1.6/src/mod/share.mod/share.h:1.6	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/share.mod/share.h	Tue Jan 28 23:48:42 2003
@@ -1,7 +1,7 @@
 /*
  * share.h -- part of share.mod
  *
- * $Id: share.h,v 1.6 2003/01/28 06:37:26 wcc Exp $
+ * $Id: share.h,v 1.7 2003/01/29 05:48:42 wcc Exp $
  */
 /*
  * Copyright (C) 1999, 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -28,15 +28,15 @@
 #define UFF_INVITE    0x000002  /* Send invites in user file        */
 #define UFF_EXEMPT    0x000004  /* Send exempts in user file        */
 /* Currently reserved flags for other modules:
- *      UFF_COMPRESS    0x000008	   Compress the user file
- *      UFF_ENCRYPT	0x000010	   Encrypt the user file
+ *      UFF_COMPRESS    0x000008           Compress the user file
+ *      UFF_ENCRYPT     0x000010           Encrypt the user file
  */
 
 /* Currently used priorities:
- *        0		UFF_OVERRIDE
- *        0		UFF_INVITE
- *        0		UFF_EXEMPT
- *       90		UFF_ENCRYPT
+ *        0             UFF_OVERRIDE
+ *        0             UFF_INVITE
+ *        0             UFF_EXEMPT
+ *       90             UFF_ENCRYPT
  *      100             UFF_COMPRESS
  */
 
Index: eggdrop1.6/src/mod/share.mod/uf_features.c
diff -u eggdrop1.6/src/mod/share.mod/uf_features.c:1.11 eggdrop1.6/src/mod/share.mod/uf_features.c:1.12
--- eggdrop1.6/src/mod/share.mod/uf_features.c:1.11	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/share.mod/uf_features.c	Tue Jan 28 23:48:42 2003
@@ -1,7 +1,7 @@
 /*
  * uf_features.c -- part of share.mod
  *
- * $Id: uf_features.c,v 1.11 2003/01/28 06:37:26 wcc Exp $
+ * $Id: uf_features.c,v 1.12 2003/01/29 05:48:42 wcc Exp $
  */
 /*
  * Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -25,37 +25,37 @@
  * Userfile feature protocol description:
  *
  *
- *		 LEAF				       HUB
+ *               LEAF                                  HUB
  *
  *   uf_features_dump():
- *	Finds out which features
- *	it supports / wants to use
- *	and then dumps those. The
- *	list is appended to the
- *	user file send ack.
- *
- *	"s uy <features>"   --+
- *			      |
- *			      +-->   uf_features_parse():
- *					Parses the given list of features,
- *					given in a string, seperated with
- *					spaces. Decides which features to
- *					accept/use. Those features are then
- *					locally set:
+ *      Finds out which features
+ *      it supports / wants to use
+ *      and then dumps those. The
+ *      list is appended to the
+ *      user file send ack.
+ *
+ *      "s uy <features>"   --+
+ *                            |
+ *                            +-->   uf_features_parse():
+ *                                      Parses the given list of features,
+ *                                      given in a string, seperated with
+ *                                      spaces. Decides which features to
+ *                                      accept/use. Those features are then
+ *                                      locally set:
  *
- *					dcc[idx].u.bot->uff_flags |= <feature_flag>
+ *                                      dcc[idx].u.bot->uff_flags |= <feature_flag>
  *
- *					and sent back to the LEAF:
+ *                                      and sent back to the LEAF:
  *
- *				+---	"s feats <accepted_features>"
- *				|
+ *                              +---    "s feats <accepted_features>"
+ *                              |
  *   uf_features_check():    <--+
- *	Checks wether the responded
- *	features are still accepted
- *	by us. If they are, we set
- *	the flags locally:
+ *      Checks wether the responded
+ *      features are still accepted
+ *      by us. If they are, we set
+ *      the flags locally:
  *
- *	dcc[idx].u.bot->uff_flags |= <feature_flag>
+ *      dcc[idx].u.bot->uff_flags |= <feature_flag>
  */
 
 
Index: eggdrop1.6/src/mod/transfer.mod/language/transfer.english.lang
diff -u eggdrop1.6/src/mod/transfer.mod/language/transfer.english.lang:1.5 eggdrop1.6/src/mod/transfer.mod/language/transfer.english.lang:1.6
--- eggdrop1.6/src/mod/transfer.mod/language/transfer.english.lang:1.5	Wed Jan 22 20:13:29 2003
+++ eggdrop1.6/src/mod/transfer.mod/language/transfer.english.lang	Tue Jan 28 23:48:42 2003
@@ -36,7 +36,7 @@
 # 0xf1e, < this one is now empty
 0xf1f,Disconnected %s (aborted userfile transfer)
 0xf20,Lost dcc send %s from %s!%s (%lu/%lu)
-0xf21,(!) reget packet from %s for %s is invalid!	
+0xf21,(!) reget packet from %s for %s is invalid!
 0xf22,!! Resuming file transfer behind file end for %s to %s
 0xf23,!!! Trying to skip ahead on userfile transfer
 0xf24,Resuming file transfer at %dk for %s to %s
Index: eggdrop1.6/src/mod/transfer.mod/language/transfer.french.lang
diff -u eggdrop1.6/src/mod/transfer.mod/language/transfer.french.lang:1.1 eggdrop1.6/src/mod/transfer.mod/language/transfer.french.lang:1.2
--- eggdrop1.6/src/mod/transfer.mod/language/transfer.french.lang:1.1	Thu Mar 21 22:01:05 2002
+++ eggdrop1.6/src/mod/transfer.mod/language/transfer.french.lang	Tue Jan 28 23:48:42 2003
@@ -1,7 +1,7 @@
 # transfer.french.lang
 #   language messages for transfer module
 #
-# $Id: transfer.french.lang,v 1.1 2002/03/22 04:01:05 guppy Exp $
+# $Id: transfer.french.lang,v 1.2 2003/01/29 05:48:42 wcc Exp $
 
 0xf00,Refus de réception dcc %s : copie de %s IMPOSSIBLE !
 0xf01,NOTICE %s :Le système de fichier est H.S.; annulation des fichiers en attente.\n
@@ -36,7 +36,7 @@
 # 0xf1e, < this one is now empty
 0xf1f,Déconnexion de %s (Abandon du transfert de la liste d'utilisateurs)
 0xf20,Perte de l'envoi DCC %s de %s!%s (%lu/%lu)
-0xf21,(!) Paquet de reprise invalide de %s pour %s !	
+0xf21,(!) Paquet de reprise invalide de %s pour %s !
 0xf22,!! Reprise du transfert apres la fin du fichier pour %s à %s
 0xf23,!!! Tentative d'abandon du transfert de la liste d'utilisateurs
 0xf24,Reprise du transfert de fichier à %dk de %s à %s
Index: eggdrop1.6/src/mod/transfer.mod/transfer.c
diff -u eggdrop1.6/src/mod/transfer.mod/transfer.c:1.59 eggdrop1.6/src/mod/transfer.mod/transfer.c:1.60
--- eggdrop1.6/src/mod/transfer.mod/transfer.c:1.59	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/transfer.mod/transfer.c	Tue Jan 28 23:48:42 2003
@@ -1,7 +1,7 @@
 /*
  * transfer.c -- part of transfer.mod
  *
- * $Id: transfer.c,v 1.59 2003/01/28 06:37:26 wcc Exp $
+ * $Id: transfer.c,v 1.60 2003/01/29 05:48:42 wcc Exp $
  *
  * Copyright (C) 1997 Robey Pointer
  * Copyright (C) 1999, 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -234,7 +234,7 @@
  * Note: To optimize buffer sizes, we default to PMAX_SIZE, but
  *       allocate a smaller buffer for smaller pending_data sizes.
  */
-#define	PMAX_SIZE	4096
+#define PMAX_SIZE 4096
 static unsigned long pump_file_to_sock(FILE *file, long sock,
                                        register unsigned long pending_data)
 {
@@ -1048,8 +1048,7 @@
   if (nick[0] != '*') {
     dprintf(DP_HELP, "PRIVMSG %s :\001DCC %sSEND %s %lu %d %lu\001\n", nick,
             resend ? "RE" : "", nfn, iptolong(natip[0] ?
-                                              (IP) inet_addr(natip) :
-                                              getmyip()), port, dccfilesize);
+            (IP) inet_addr(natip) : getmyip()), port, dccfilesize);
     putlog(LOG_FILES, "*", TRANSFER_BEGIN_DCC, resend ? TRANSFER_RE : "", nfn,
            nick);
   }
Index: eggdrop1.6/src/mod/transfer.mod/transfer.h
diff -u eggdrop1.6/src/mod/transfer.mod/transfer.h:1.18 eggdrop1.6/src/mod/transfer.mod/transfer.h:1.19
--- eggdrop1.6/src/mod/transfer.mod/transfer.h:1.18	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/transfer.mod/transfer.h	Tue Jan 28 23:48:42 2003
@@ -1,7 +1,7 @@
 /*
  * transfer.h -- part of transfer.mod
  *
- * $Id: transfer.h,v 1.18 2003/01/28 06:37:26 wcc Exp $
+ * $Id: transfer.h,v 1.19 2003/01/29 05:48:42 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -70,7 +70,7 @@
 #define TRANSFER_THANKS             get_language(0xf1b)
 #define TRANSFER_NOTICE_THANKS      get_language(0xf1c)
 #define TRANSFER_USERFILE_LOST      get_language(0xf1d)
-/* #define TRANSFER_BYE	            get_language(0xf1e) */
+/* #define TRANSFER_BYE             get_language(0xf1e) */
 #define TRANSFER_USERFILE_DISCON    get_language(0xf1f)
 #define TRANSFER_LOST_DCCSEND       get_language(0xf20)
 #define TRANSFER_REGET_PACKET       get_language(0xf21)
Index: eggdrop1.6/src/mod/uptime.mod/uptime.c
diff -u eggdrop1.6/src/mod/uptime.mod/uptime.c:1.26 eggdrop1.6/src/mod/uptime.mod/uptime.c:1.27
--- eggdrop1.6/src/mod/uptime.mod/uptime.c:1.26	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/uptime.mod/uptime.c	Tue Jan 28 23:48:42 2003
@@ -1,5 +1,5 @@
 /*
- * $Id: uptime.c,v 1.26 2003/01/28 06:37:26 wcc Exp $
+ * $Id: uptime.c,v 1.27 2003/01/29 05:48:42 wcc Exp $
  *
  * This module reports uptime information about your bot to http://uptime.eggheads.org. The
  * purpose for this is to see how your bot rates against many others (including EnergyMechs
@@ -135,7 +135,7 @@
     return ((uptimesock = -1));
   }
   fcntl(uptimesock, F_SETFL, O_NONBLOCK | fcntl(uptimesock, F_GETFL));
-  return (0);
+  return 0;
 }
 
 
Index: eggdrop1.6/src/mod/wire.mod/wire.h
diff -u eggdrop1.6/src/mod/wire.mod/wire.h:1.8 eggdrop1.6/src/mod/wire.mod/wire.h:1.9
--- eggdrop1.6/src/mod/wire.mod/wire.h:1.8	Tue Jan 28 00:37:26 2003
+++ eggdrop1.6/src/mod/wire.mod/wire.h	Tue Jan 28 23:48:42 2003
@@ -1,7 +1,7 @@
 /*
  * wire.h -- part of wire.mod
  *
- * $Id: wire.h,v 1.8 2003/01/28 06:37:26 wcc Exp $
+ * $Id: wire.h,v 1.9 2003/01/29 05:48:42 wcc Exp $
  */
 /*
  * Copyright (C) 1999, 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -24,17 +24,17 @@
 #ifndef _EGG_MOD_WIRE_WIRE_H
 #define _EGG_MOD_WIRE_WIRE_H
 
-#define WIRE_IDLE		MISC_IDLE
-#define WIRE_AWAY		MISC_AWAY
-#define WIRE_NOTONWIRE		get_language(0xa000)
-#define WIRE_CURRENTLYON	get_language(0xa001)
-#define WIRE_NOLONGERWIRED	get_language(0xa002)
-#define WIRE_CHANGINGKEY	get_language(0xa003)
-#define WIRE_INFO1		get_language(0xa004)
-#define WIRE_INFO2		get_language(0xa005)
-#define WIRE_INFO3		get_language(0xa006)
-#define WIRE_JOINED		get_language(0xa007)
-#define WIRE_LEFT		get_language(0xa008)
-#define WIRE_UNLOAD		get_language(0xa009)
+#define WIRE_IDLE               MISC_IDLE
+#define WIRE_AWAY               MISC_AWAY
+#define WIRE_NOTONWIRE          get_language(0xa000)
+#define WIRE_CURRENTLYON        get_language(0xa001)
+#define WIRE_NOLONGERWIRED      get_language(0xa002)
+#define WIRE_CHANGINGKEY        get_language(0xa003)
+#define WIRE_INFO1              get_language(0xa004)
+#define WIRE_INFO2              get_language(0xa005)
+#define WIRE_INFO3              get_language(0xa006)
+#define WIRE_JOINED             get_language(0xa007)
+#define WIRE_LEFT               get_language(0xa008)
+#define WIRE_UNLOAD             get_language(0xa009)
 
 #endif /* _EGG_MOD_WIRE_WIRE_H */
Index: eggdrop1.6/src/mod/woobie.mod/woobie.c
diff -u eggdrop1.6/src/mod/woobie.mod/woobie.c:1.19 eggdrop1.6/src/mod/woobie.mod/woobie.c:1.20
--- eggdrop1.6/src/mod/woobie.mod/woobie.c:1.19	Tue Jan 28 00:37:27 2003
+++ eggdrop1.6/src/mod/woobie.mod/woobie.c	Tue Jan 28 23:48:42 2003
@@ -2,10 +2,10 @@
  * woobie.c -- part of woobie.mod
  *   nonsensical command to exemplify module programming
  *
- * Originally written by ButchBub	  15 July     1997
- * Comments by Fabian Knittel		  29 December 1999
+ * Originally written by ButchBub         15 July     1997
+ * Comments by Fabian Knittel             29 December 1999
  *
- * $Id: woobie.c,v 1.19 2003/01/28 06:37:27 wcc Exp $
+ * $Id: woobie.c,v 1.20 2003/01/29 05:48:42 wcc Exp $
  */
 /*
  * Copyright (C) 1999, 2000, 2001, 2002, 2003 Eggheads Development Team
Index: eggdrop1.6/src/modules.h
diff -u eggdrop1.6/src/modules.h:1.12 eggdrop1.6/src/modules.h:1.13
--- eggdrop1.6/src/modules.h:1.12	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/modules.h	Tue Jan 28 23:48:40 2003
@@ -4,7 +4,7 @@
  *
  * by Darrin Smith (beldin at light.iinet.net.au)
  *
- * $Id: modules.h,v 1.12 2003/01/28 06:37:24 wcc Exp $
+ * $Id: modules.h,v 1.13 2003/01/29 05:48:40 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -57,13 +57,13 @@
   int (*func) ();
 } *hook_list[REAL_HOOKS];
 
-#define call_hook(x) do {					\
-	register struct hook_entry *p, *pn;			\
-								\
-	for (p = hook_list[x]; p; p = pn) {			\
-		pn = p->next;					\
-		p->func();					\
-	}							\
+#define call_hook(x) do {                                       \
+        register struct hook_entry *p, *pn;                     \
+                                                                \
+        for (p = hook_list[x]; p; p = pn) {                     \
+                pn = p->next;                                   \
+                p->func();                                      \
+        }                                                       \
 } while (0)
 int call_hook_cccc(int, char *, char *, char *, char *);
 
Index: eggdrop1.6/src/net.c
diff -u eggdrop1.6/src/net.c:1.52 eggdrop1.6/src/net.c:1.53
--- eggdrop1.6/src/net.c:1.52	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/net.c	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * net.c -- handles:
  *   all raw network i/o
  * 
- * $Id: net.c,v 1.52 2003/01/28 06:37:24 wcc Exp $
+ * $Id: net.c,v 1.53 2003/01/29 05:48:41 wcc Exp $
  */
 /* 
  * This is hereby released into the public domain.
@@ -606,7 +606,7 @@
 /* Attempts to read from all the sockets in socklist
  * fills s with up to 511 bytes if available, and returns the array index
  * 
- * 		on EOF:  returns -1, with socket in len
+ *              on EOF:  returns -1, with socket in len
  *     on socket error:  returns -2
  * if nothing is ready:  returns -3
  */
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.883 eggdrop1.6/src/patch.h:1.884
--- eggdrop1.6/src/patch.h:1.883	Tue Jan 28 17:14:50 2003
+++ eggdrop1.6/src/patch.h	Tue Jan 28 23:48:41 2003
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.883 2003/01/28 23:14:50 wcc Exp $
+ * $Id: patch.h,v 1.884 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1043795023");            /* current unixtime */
+patch("1043819258");            /* current unixtime */
 /*
  *
  *
  */
-patch("moreconfigdocs2");
+patch("indent2");
 /*
  *
  *
Index: eggdrop1.6/src/rfc1459.c
diff -u eggdrop1.6/src/rfc1459.c:1.7 eggdrop1.6/src/rfc1459.c:1.8
--- eggdrop1.6/src/rfc1459.c:1.7	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/rfc1459.c	Tue Jan 28 23:48:41 2003
@@ -1,7 +1,7 @@
 /*
  * rfc1459.c
  * 
- * $Id: rfc1459.c,v 1.7 2003/01/28 06:37:24 wcc Exp $
+ * $Id: rfc1459.c,v 1.8 2003/01/29 05:48:41 wcc Exp $
  */
 /* 
  * Copyright (C) 1990 Jarkko Oikarinen
@@ -39,7 +39,7 @@
     str1++;
     str2++;
   }
-  return (res);
+  return res;
 }
 
 int _rfc_ncasecmp(const char *str1, const char *str2, int n)
@@ -55,7 +55,7 @@
     if (!n || (*s1 == '\0' && *s2 == '\0'))
       return 0;
   }
-  return (res);
+  return res;
 }
 
 unsigned char rfc_tolowertab[];
Index: eggdrop1.6/src/stat.h
diff -u eggdrop1.6/src/stat.h:1.5 eggdrop1.6/src/stat.h:1.6
--- eggdrop1.6/src/stat.h:1.5	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/stat.h	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * stat.h
  *  file attributes
  *
- * $Id: stat.h,v 1.5 2003/01/28 06:37:24 wcc Exp $
+ * $Id: stat.h,v 1.6 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 2000, 2001, 2002, 2003 Eggheads Development Team
@@ -27,18 +27,18 @@
 
 #ifndef S_ISDIR
 #  ifndef S_IFMT
-#    define S_IFMT	0170000 /* Bitmask for the file type bitfields */
+#    define S_IFMT   0170000 /* Bitmask for the file type bitfields */
 #  endif
 #  ifndef S_IFDIR
-#    define S_IFDIR	0040000 /* Directory                           */
+#    define S_IFDIR  0040000 /* Directory                           */
 #  endif
-#  define S_ISDIR(m)	(((m)&(S_IFMT)) == (S_IFDIR))
+#  define S_ISDIR(m) (((m)&(S_IFMT)) == (S_IFDIR))
 #endif
 #ifndef S_IFREG
-#  define S_IFREG	0100000 /* Regular file                        */
+#  define S_IFREG    0100000 /* Regular file                        */
 #endif
 #ifndef S_IFLNK
-#  define S_IFLNK   	0120000 /* Symbolic link                       */
+#  define S_IFLNK    0120000 /* Symbolic link                       */
 #endif
 
 #endif /* _EGG_STAT_H */
Index: eggdrop1.6/src/tandem.h
diff -u eggdrop1.6/src/tandem.h:1.11 eggdrop1.6/src/tandem.h:1.12
--- eggdrop1.6/src/tandem.h:1.11	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/tandem.h	Tue Jan 28 23:48:41 2003
@@ -1,7 +1,7 @@
 /*
  * tandem.h
  *
- * $Id: tandem.h,v 1.11 2003/01/28 06:37:24 wcc Exp $
+ * $Id: tandem.h,v 1.12 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -99,9 +99,9 @@
 #endif /* MAKING_MODS */
 
 
-#define b_status(a)	(dcc[a].status)
-#define b_version(a)	(dcc[a].u.bot->version)
-#define b_linker(a)	(dcc[a].u.bot->linker)
-#define b_numver(a)	(dcc[a].u.bot->numver)
+#define b_status(a)  (dcc[a].status)
+#define b_version(a) (dcc[a].u.bot->version)
+#define b_linker(a)  (dcc[a].u.bot->linker)
+#define b_numver(a)  (dcc[a].u.bot->numver)
 
 #endif /* _EGG_TANDEM_H */
Index: eggdrop1.6/src/tcl.c
diff -u eggdrop1.6/src/tcl.c:1.58 eggdrop1.6/src/tcl.c:1.59
--- eggdrop1.6/src/tcl.c:1.58	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/tcl.c	Tue Jan 28 23:48:41 2003
@@ -4,7 +4,7 @@
  *   Tcl initialization
  *   getting and setting Tcl/eggdrop variables
  *
- * $Id: tcl.c,v 1.58 2003/01/28 06:37:24 wcc Exp $
+ * $Id: tcl.c,v 1.59 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -307,11 +307,11 @@
 
       obj = Tcl_GetVar2Ex(interp, name1, name2, 0);
       if (!obj)
-        return (NULL);
+        return NULL;
       len = 0;
       bytes = Tcl_GetByteArrayFromObj(obj, &len);
       if (!bytes)
-        return (NULL);
+        return NULL;
       s = malloc(len + 1);
       memcpy(s, bytes, len);
       s[len] = 0;
@@ -383,7 +383,7 @@
     nfree(strings[i]);
   nfree(strings);
   utftot += diff;
-  return (retval);
+  return retval;
 }
 
 void cmd_delete_callback(ClientData cdata)
Index: eggdrop1.6/src/tcldcc.c
diff -u eggdrop1.6/src/tcldcc.c:1.39 eggdrop1.6/src/tcldcc.c:1.40
--- eggdrop1.6/src/tcldcc.c:1.39	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/tcldcc.c	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * tcldcc.c -- handles:
  *   Tcl stubs for the dcc commands
  *
- * $Id: tcldcc.c,v 1.39 2003/01/28 06:37:24 wcc Exp $
+ * $Id: tcldcc.c,v 1.40 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -113,11 +113,7 @@
 {
   BADARGS(3, 3, " idx command");
 
-  if (!enable_simul) {
-    Tcl_AppendResult(irp, "simul disabled", NULL);
-    return TCL_ERROR;
-  }
-  else {
+  if (enable_simul) {
     int idx = findidx(atoi(argv[1]));
 
     if (idx >= 0 && (dcc[idx].type->flags & DCT_SIMUL)) {
@@ -125,19 +121,21 @@
 
       if (l > 510) {
         l = 510;
-        argv[2][510] = 0; /* Restrict length of cmd */
+        argv[2][510] = 0;        /* Restrict length of cmd */
       }
       if (dcc[idx].type && dcc[idx].type->activity) {
         dcc[idx].type->activity(idx, argv[2], l);
         return TCL_OK;
       }
     }
-    else {
+    else
       Tcl_AppendResult(irp, "invalid idx", NULL);
-      return TCL_ERROR;
-    }
   }
+  else
+    Tcl_AppendResult(irp, "simul disabled", NULL);
+  return TCL_ERROR;
 }
+
 
 static int tcl_dccbroadcast STDVAR
 {
Index: eggdrop1.6/src/tclegg.h
diff -u eggdrop1.6/src/tclegg.h:1.18 eggdrop1.6/src/tclegg.h:1.19
--- eggdrop1.6/src/tclegg.h:1.18	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/tclegg.h	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * tclegg.h
  *   stuff used by tcl.c and tclhash.c
  *
- * $Id: tclegg.h,v 1.18 2003/01/28 06:37:24 wcc Exp $
+ * $Id: tclegg.h,v 1.19 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -70,17 +70,17 @@
 /* Used for stub functions:
  */
 
-#define STDVAR		(cd, irp, argc, argv)				\
-	ClientData cd;							\
-	Tcl_Interp *irp;						\
-	int argc;							\
-	char *argv[];
-#define BADARGS(nl, nh, example)	do {				\
-	if ((argc < (nl)) || (argc > (nh))) {				\
-		Tcl_AppendResult(irp, "wrong # args: should be \"",	\
-				 argv[0], (example), "\"", NULL);	\
-		return TCL_ERROR;					\
-	}								\
+#define STDVAR (cd, irp, argc, argv)                                    \
+        ClientData cd;                                                  \
+        Tcl_Interp *irp;                                                \
+        int argc;                                                       \
+        char *argv[];
+#define BADARGS (nl, nh, example) do {                                  \
+        if ((argc < (nl)) || (argc > (nh))) {                           \
+                Tcl_AppendResult(irp, "wrong # args: should be \"",     \
+                                 argv[0], (example), "\"", NULL);       \
+                return TCL_ERROR;                                       \
+        }                                                               \
 } while (0)
 
 
Index: eggdrop1.6/src/tclhash.c
diff -u eggdrop1.6/src/tclhash.c:1.40 eggdrop1.6/src/tclhash.c:1.41
--- eggdrop1.6/src/tclhash.c:1.40	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/tclhash.c	Tue Jan 28 23:48:41 2003
@@ -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.40 2003/01/28 06:37:24 wcc Exp $
+ * $Id: tclhash.c,v 1.41 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -60,10 +60,10 @@
 static inline void *n_malloc_null(int size, const char *file, int line)
 {
 #ifdef DEBUG_MEM
-# define	nmalloc_null(size)	n_malloc_null(size, __FILE__, __LINE__)
+# define nmalloc_null(size) n_malloc_null(size, __FILE__, __LINE__)
   void *ptr = n_malloc(size, file, line);
 #else
-# define	nmalloc_null(size)	n_malloc_null(size, NULL, 0)
+# define nmalloc_null(size) n_malloc_null(size, NULL, 0)
   void *ptr = nmalloc(size);
 #endif
 
Index: eggdrop1.6/src/tclhash.h
diff -u eggdrop1.6/src/tclhash.h:1.11 eggdrop1.6/src/tclhash.h:1.12
--- eggdrop1.6/src/tclhash.h:1.11	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/tclhash.h	Tue Jan 28 23:48:41 2003
@@ -1,7 +1,7 @@
 /*
  * tclhash.h
  *
- * $Id: tclhash.h,v 1.11 2003/01/28 06:37:24 wcc Exp $
+ * $Id: tclhash.h,v 1.12 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -26,7 +26,7 @@
 #define _EGG_TCLHASH_H
 
 
-#define TC_DELETED	0x0001  /* This command/trigger was deleted.    */
+#define TC_DELETED   0x0001  /* This command/trigger was deleted.    */
 
 typedef struct tcl_cmd_b {
   struct tcl_cmd_b *next;
@@ -39,7 +39,7 @@
 } tcl_cmd_t;
 
 
-#define TBM_DELETED	0x0001  /* This mask was deleted.               */
+#define TBM_DELETED  0x0001  /* This mask was deleted.               */
 
 typedef struct tcl_bind_mask_b {
   struct tcl_bind_mask_b *next;
@@ -51,10 +51,10 @@
 } tcl_bind_mask_t;
 
 
-#define HT_STACKABLE	0x0001  /* Triggers in this bind list may be
-                                 * stacked.                             */
-#define HT_DELETED	0x0002  /* This bind list was already deleted.
-                                 * Do not use it anymore.               */
+#define HT_STACKABLE 0x0001  /* Triggers in this bind list may be
+                              * stacked.                             */
+#define HT_DELETED   0x0002  /* This bind list was already deleted.
+                              * Do not use it anymore.               */
 
 typedef struct tcl_bind_list_b {
   struct tcl_bind_list_b *next;
@@ -124,12 +124,12 @@
 #endif
 
 
-#define CHECKVALIDITY(a)	do {					\
-	if (!check_validity(argv[0], (a))) {				\
-		Tcl_AppendResult(irp, "bad builtin command call!",	\
-				 NULL);					\
-		return TCL_ERROR;					\
-	}								\
+#define CHECKVALIDITY(a)        do {                                    \
+        if (!check_validity(argv[0], (a))) {                            \
+                Tcl_AppendResult(irp, "bad builtin command call!",      \
+                                 NULL);                                 \
+                return TCL_ERROR;                                       \
+        }                                                               \
 } while (0)
 
 #endif /* _EGG_TCLHASH_H */
Index: eggdrop1.6/src/users.h
diff -u eggdrop1.6/src/users.h:1.12 eggdrop1.6/src/users.h:1.13
--- eggdrop1.6/src/users.h:1.12	Tue Jan 28 00:37:24 2003
+++ eggdrop1.6/src/users.h	Tue Jan 28 23:48:41 2003
@@ -2,7 +2,7 @@
  * users.h
  *   structures and definitions used by users.c and userrec.c
  *
- * $Id: users.h,v 1.12 2003/01/28 06:37:24 wcc Exp $
+ * $Id: users.h,v 1.13 2003/01/29 05:48:41 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -32,9 +32,9 @@
   char *extra;
 };
 
-#define list_insert(a,b) {						\
-    	(b)->next = *(a);						\
-	*(a) = (b);							\
+#define list_insert(a,b) {                                              \
+        (b)->next = *(a);                                               \
+        *(a) = (b);                                                     \
 }
 int list_append(struct list_type **, struct list_type *);
 int list_delete(struct list_type **, struct list_type *);
@@ -112,8 +112,8 @@
 void *_user_realloc(void *ptr, int size, const char *file, int line);
 
 #ifndef MAKING_MODS
-#  define user_malloc(x)	_user_malloc(x, __FILE__, __LINE__)
-#  define user_realloc(x, y)	_user_realloc(x, y, __FILE__, __LINE__)
+#  define user_malloc(x)     _user_malloc(x, __FILE__, __LINE__)
+#  define user_realloc(x, y) _user_realloc(x, y, __FILE__, __LINE__)
 #endif
 
 int add_entry_type(struct user_entry_type *);
@@ -123,9 +123,9 @@
 void *get_user(struct user_entry_type *, struct userrec *);
 int set_user(struct user_entry_type *, struct userrec *, void *);
 
-#define bot_flags(u)	((long)get_user(&USERENTRY_BOTFL, (u)))
-#define is_bot(u)	((u) && ((u)->flags & USER_BOT))
-#define is_owner(u)	((u) && ((u)->flags & USER_OWNER))
+#define bot_flags(u) ((long)get_user(&USERENTRY_BOTFL, (u)))
+#define is_bot(u)    ((u) && ((u)->flags & USER_BOT))
+#define is_owner(u)  ((u) && ((u)->flags & USER_OWNER))
 
 /* Fake users used to store ignores and bans
  */
----------------------- End of diff -----------------------



More information about the Changes mailing list