[eggheads-patches] splitmerge.diff

Ian Campbell ian at damnit.org
Thu Oct 11 23:37:01 CST 2001


Removes:
    splitc()
    splitcn()
    splitnick()

Modifies:
    newsplit()

    Now we only have to deal with one split function.... this will break
any module that uses any split function, and I'd appreciate some testing
with this. Everything I tried worked for me, but I'm sure I fucked up a
splitc() conversion somewhere.

--me.
-------------- next part --------------
Only in eggdev/src: Makefile.in
Only in eggdev/src/adns: Makefile.in
diff -Bur eggdrop1.7/src/botcmd.c eggdev/src/botcmd.c
--- eggdrop1.7/src/botcmd.c	Sat Oct  6 22:02:54 2001
+++ eggdev/src/botcmd.c	Thu Oct 11 19:15:23 2001
@@ -100,8 +100,8 @@
 
   if (bot_flags(dcc[idx].user) & BOT_ISOLATE)
     return;
-  from = newsplit(&msg);
-  p = newsplit(&msg);
+  from = newsplit(&msg, ' ');
+  p = newsplit(&msg, ' ');
 #ifndef NO_OLD_BOTNET
   if (b_numver(idx) < NEAT_BOTNET)
     chan = atoi(p);
@@ -154,7 +154,7 @@
 
   if (bot_flags(dcc[idx].user) & BOT_ISOLATE)
     return;
-  from = newsplit(&par);
+  from = newsplit(&par, ' ');
   if (strchr(from, '@') != NULL) {
     fake_alert(idx, "bot", from);
     return;
@@ -178,7 +178,7 @@
 
   if (bot_flags(dcc[idx].user) & BOT_ISOLATE)
     return;
-  from = newsplit(&par);
+  from = newsplit(&par, ' ');
   p = strchr(from, '@');
   if (p == NULL) {
     /* How can a bot do an action? */
@@ -197,7 +197,7 @@
     fake_alert(idx, "direction", p);
     return;
   }
-  p = newsplit(&par);
+  p = newsplit(&par, ' ');
 #ifndef NO_OLD_BOTNET
   if (b_numver(idx) < NEAT_BOTNET)
     chan = atoi(p);
@@ -222,9 +222,9 @@
   char *from, *p, *to = TBUF, *tobot;
   int i;
 
-  from = newsplit(&par);
-  tobot = newsplit(&par);
-  splitc(to, tobot, '@');
+  from = newsplit(&par, ' ');
+  tobot = newsplit(&par, ' ');
+  to = newsplit(&tobot, '@');
   p = strchr(from, '@');
   if (p != NULL)
     p++;
@@ -422,13 +422,13 @@
   char *from, *to, *p;
   int i, chan;
 
-  from = newsplit(&par);
+  from = newsplit(&par, ' ');
   p = strchr(from, '@');
   if (!p) {
     sprintf(TBUF, "%s@%s", from, dcc[idx].nick);
     from = TBUF;
   }
-  to = newsplit(&par);
+  to = newsplit(&par, ' ');
   if (!egg_strcasecmp(to, botnetnick))
     to[0] = 0;			/* (for me) */
 #ifndef NO_OLD_BOTNET
@@ -520,8 +520,8 @@
   char *from, *bot, *rfrom;
   int i;
 
-  from = newsplit(&par);
-  bot = newsplit(&par);
+  from = newsplit(&par, ' ');
+  bot = newsplit(&par, ' ');
 
   if (!egg_strcasecmp(bot, botnetnick)) {
     if ((rfrom = strchr(from, ':')))
@@ -549,9 +549,9 @@
   char *from, *bot, *rfrom, *p, *undes;
   int i;
 
-  from = newsplit(&par);
-  bot = newsplit(&par);
-  undes = newsplit(&par);
+  from = newsplit(&par, ' ');
+  bot = newsplit(&par, ' ');
+  undes = newsplit(&par, ' ');
   if (!egg_strcasecmp(bot, botnetnick)) {
     if ((rfrom = strchr(from, ':')))
       rfrom++;
@@ -606,7 +606,7 @@
   char *bot, x;
   int vnum;
 
-  bot = newsplit(&par);
+  bot = newsplit(&par, ' ');
   x = par[0];
   if (x)
     par++;
@@ -628,8 +628,8 @@
   int bogus = 0, i;
   struct userrec *u;
 
-  newbot = newsplit(&par);
-  next = newsplit(&par);
+  newbot = newsplit(&par, ' ');
+  next = newsplit(&par, ' ');
   s[0] = 0;
   if (!next[0]) {
     putlog(LOG_BOTS, "*", "Invalid eggnet protocol from %s (zapfing)",
@@ -729,7 +729,7 @@
   int i;
   char *bot;
 
-  bot = newsplit(&par);
+  bot = newsplit(&par, ' ');
   i = nextbot(bot);
   if ((i >= 0) && (i != idx))	/* Bot is NOT downstream along idx, so
 				 * BOGUS! */
@@ -751,8 +751,8 @@
   char *from, *dest;
   int i;
 
-  from = newsplit(&par);
-  dest = newsplit(&par);
+  from = newsplit(&par, ' ');
+  dest = newsplit(&par, ' ');
   simple_sprintf(TBUF, "%s:%s", par, botnetnick);
   botnet_send_traced(idx, from, TBUF);
   if (egg_strcasecmp(dest, botnetnick) && ((i = nextbot(dest)) > 0))
@@ -766,7 +766,7 @@
   char *to, *p;
   int i, sock;
 
-  to = newsplit(&par);
+  to = newsplit(&par, ' ');
   p = strchr(to, '@');
   if (p == NULL)
     p = to;
@@ -778,7 +778,7 @@
     time_t t = 0;
     char *p = par, *ss = TBUF;
 
-    splitc(ss, to, ':');
+    ss = newsplit(&to, ':');
     if (ss[0])
       sock = atoi(ss);
     else
@@ -819,7 +819,7 @@
 
   if (bot_flags(dcc[idx].user) & BOT_ISOLATE)
     return;
-  from = newsplit(&par);
+  from = newsplit(&par, ' ');
   frombot = strchr(from, '@');
   if (frombot)
     frombot++;
@@ -830,7 +830,7 @@
     fake_alert(idx, "direction", frombot);
     return;
   }
-  who = newsplit(&par);
+  who = newsplit(&par, ' ');
   if (!(destbot = strchr(who, '@'))) {
     /* Rejecting a bot */
     i = nextbot(who);
@@ -940,8 +940,8 @@
   char *from, *to;
   int i;
 
-  from = newsplit(&par);
-  to = newsplit(&par);
+  from = newsplit(&par, ' ');
+  to = newsplit(&par, ' ');
   i = nextbot(from);
   if (i != idx) {
     fake_alert(idx, "direction", from);
@@ -951,7 +951,7 @@
     /* For me! */
     char *opcode;
 
-    opcode = newsplit(&par);
+    opcode = newsplit(&par, ' ');
     check_tcl_bot(from, opcode, par);
     return;
   }
@@ -968,8 +968,8 @@
   char *from, *opcode;
   int i;
 
-  from = newsplit(&par);
-  opcode = newsplit(&par);
+  from = newsplit(&par, ' ');
+  opcode = newsplit(&par, ' ');
 
   i = nextbot(from);
   if (i != idx) {
@@ -989,7 +989,7 @@
   int i;
   struct flag_record fr = {FR_BOT, USER_BOT, 0, 0, 0, 0};
 
-  who = newsplit(&par);
+  who = newsplit(&par, ' ');
   if (!par[0] || !egg_strcasecmp(par, botnetnick)) {
     int irc = 0;
 
@@ -1046,8 +1046,8 @@
   char *path, *to, *tobot, *p;
   int i;
 
-  path = newsplit(&par);
-  to = newsplit(&par);
+  path = newsplit(&par, ' ');
+  to = newsplit(&par, ' ');
   if ((tobot = strchr(to, '@')))
     tobot++;
   else
@@ -1078,7 +1078,7 @@
   char *from, *path;
   int i;
 
-  from = newsplit(&tobot);
+  from = newsplit(&tobot, ' ');
   if ((path = strchr(tobot, ':'))) {
     *path++ = 0;
 
@@ -1109,8 +1109,8 @@
   int i;
   char *nfn;
 
-  botpath = newsplit(&par);
-  to = newsplit(&par);
+  botpath = newsplit(&par, ' ');
+  to = newsplit(&par, ' ');
   if ((tobot = strchr(to, '@'))) {
     *tobot = 0;
     tobot++;
@@ -1156,7 +1156,7 @@
 
   if (bot_flags(dcc[idx].user) & BOT_ISOLATE)
     return;
-  bot = newsplit(&par);
+  bot = newsplit(&par, ' ');
 #ifndef NO_OLD_BOTNET
   if (b_numver(idx) < NEAT_BOTNET) {
     fake_alert(idx, "botversion", "NEAT_BOTNET");
@@ -1168,9 +1168,9 @@
     fake_alert(idx, "direction", bot);
     return;
   }
-  ssock = newsplit(&par);
+  ssock = newsplit(&par, ' ');
   sock = base64_to_int(ssock);
-  newnick = newsplit(&par);
+  newnick = newsplit(&par, ' ');
   i = partynick(bot, sock, newnick);
   if (i < 0) {
     fake_alert(idx, "sock#", ssock);
@@ -1191,7 +1191,7 @@
 
   if (bot_flags(dcc[idx].user) & BOT_ISOLATE)
     return;
-  bot = newsplit(&par);
+  bot = newsplit(&par, ' ');
 #ifndef NO_OLD_BOTNET
   if (b_numver(idx) >= NEAT_BOTNET)
 #endif
@@ -1202,15 +1202,15 @@
   if (b_status(idx) & STAT_LINKING) {
     linking = 1;
   }
-  nick = newsplit(&par);
-  x = newsplit(&par);
+  nick = newsplit(&par, ' ');
+  x = newsplit(&par, ' ');
 #ifndef NO_OLD_BOTNET
   if (b_numver(idx) < NEAT_BOTNET)
     chan = atoi(x);
   else
 #endif
     chan = base64_to_int(x);
-  y = newsplit(&par);
+  y = newsplit(&par, ' ');
   if ((chan < 0) || !y[0])
     return;			/* Woops! pre 1.2.1's send .chat off'ers
 				 * too!! */
@@ -1271,13 +1271,13 @@
 
   if (bot_flags(dcc[idx].user) & BOT_ISOLATE)
     return;
-  bot = newsplit(&par);
+  bot = newsplit(&par, ' ');
   if (bot[0] == '!') {
     silent = 1;
     bot++;
   }
-  nick = newsplit(&par);
-  etc = newsplit(&par);
+  nick = newsplit(&par, ' ');
+  etc = newsplit(&par, ' ');
 #ifndef NO_OLD_BOTNET
   if (b_numver(idx) < NEAT_BOTNET) {
     sock = atoi(etc);
@@ -1323,7 +1323,7 @@
 
   if (bot_flags(dcc[idx].user) & BOT_ISOLATE)
     return;
-  bot = newsplit(&par);
+  bot = newsplit(&par, ' ');
 #ifndef NO_OLD_BOTNET
   if (b_numver(idx) >= NEAT_BOTNET)
 #endif
@@ -1334,7 +1334,7 @@
   if (b_status(idx) & STAT_LINKING) {
     linking = 1;
   }
-  etc = newsplit(&par);
+  etc = newsplit(&par, ' ');
 #ifndef NO_OLD_BOTNET
   if (b_numver(idx) < NEAT_BOTNET)
     sock = atoi(etc);
@@ -1374,8 +1374,8 @@
 
   if (bot_flags(dcc[idx].user) & BOT_ISOLATE)
     return;
-  bot = newsplit(&par);
-  work = newsplit(&par);
+  bot = newsplit(&par, ' ');
+  work = newsplit(&par, ' ');
 #ifndef NO_OLD_BOTNET
   if (b_numver(idx) < NEAT_BOTNET)
     sock = atoi(work);
@@ -1384,7 +1384,7 @@
     sock = base64_to_int(work);
   if (sock == 0)
     sock = partysock(bot, work);
-  work = newsplit(&par);
+  work = newsplit(&par, ' ');
 #ifndef NO_OLD_BOTNET
   if (b_numver(idx) < NEAT_BOTNET)
     idle = atoi(work);
@@ -1426,16 +1426,16 @@
  */
 static void bot_versions(int sock, char *par)
 {
-  char *frombot = newsplit(&par), *tobot, *from;
+  char *frombot = newsplit(&par, ' '), *tobot, *from;
   module_entry *me;
 
   if (nextbot(frombot) != sock)
     fake_alert(sock, "versions-direction", frombot);
-  else if (egg_strcasecmp(tobot = newsplit(&par), botnetnick)) {
+  else if (egg_strcasecmp(tobot = newsplit(&par, ' '), botnetnick)) {
     if ((sock = nextbot(tobot)) >= 0)
       dprintf(sock, "v %s %s %s\n", frombot, tobot, par);
   } else {
-    from = newsplit(&par);
+    from = newsplit(&par, ' ');
     botnet_send_priv(sock, botnetnick, from, frombot, "Modules loaded:\n");
     for (me = module_list; me; me = me->next)
       botnet_send_priv(sock, botnetnick, from, frombot, "  Module: %s (v%d.%d)\n",
diff -Bur eggdrop1.7/src/botmsg.c eggdev/src/botmsg.c
--- eggdrop1.7/src/botmsg.c	Fri Aug 10 17:51:20 2001
+++ eggdev/src/botmsg.c	Thu Oct 11 19:17:37 2001
@@ -771,7 +771,8 @@
 int add_note(char *to, char *from, char *msg, int idx, int echo)
 {
   int status, i, iaway, sock;
-  char *p, botf[81], ss[81], ssf[81];
+//  char *p, botf[81], ss[81], ssf[81];
+  char *p, botf[81], *ss, *ssf;
   struct userrec *u;
 
   if (strlen(msg) > 450)
@@ -813,10 +814,8 @@
     return NOTE_OK;		/* Forwarded to the right bot */
   }
   /* Might be form "sock:nick" */
-  splitc(ssf, from, ':');
-  rmspace(ssf);
-  splitc(ss, to, ':');
-  rmspace(ss);
+  ssf = newsplit(&from, ':');
+  ss = newsplit(&to, ':');
   if (!ss[0])
     sock = (-1);
   else
@@ -871,7 +870,7 @@
 	char work[1024];
 
 	while ((*msg == '<') || (*msg == '>')) {
-	  p = newsplit(&msg);
+	  p = newsplit(&msg, ' ');
 	  if (*p == '<')
 	    l += simple_sprintf(work + l, "via %s, ", p + 1);
 	  else if (*from == '@')
diff -Bur eggdrop1.7/src/botnet.c eggdev/src/botnet.c
--- eggdrop1.7/src/botnet.c	Thu Oct 11 20:27:45 2001
+++ eggdev/src/botnet.c	Thu Oct 11 05:34:19 2001
@@ -7,7 +7,7 @@
  *   linking, unlinking, and relaying to another bot
  *   pinging the bots periodically and checking leaf status
  *
- * $Id: botnet.c,v 1.43 2001/10/12 02:27:45 stdarg Exp $
+ * $Id: botnet.c,v 1.42 2001/10/11 11:34:19 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -30,7 +30,6 @@
 
 #include "main.h"
 #include "tandem.h"
-#include "modules.h"
 
 extern char		 spaces[], spaces2[];
 extern int		 dcc_total, backgrd, connect_timeout, max_dcc,
@@ -51,50 +50,19 @@
 int		 share_unlinks = 0;	/* Allow remote unlinks of my
 					   sharebots? */
 
-/* From main.c */
-extern int die_on_sigterm;
-extern int die_on_sighup;
-
 /* The bind tables we create. */
-static bind_table_t *BT_chjn, *BT_chpt;
-
-static void botnet_sigterm(char *);
-static void botnet_sighup(char *);
 
-/* We want to listen to the sigterm event. */
-static cmd_t botnet_events[] = {
-	{"botnet_sigterm", "", (Function) botnet_sigterm, NULL},
-	{"botnet_sighup", "", (Function) botnet_sighup, NULL},
-	0
-};
+static bind_table_t *BT_chjn = NULL;
+static bind_table_t *BT_chpt = NULL;
 
 static void init_bots();
 
 void botnet_init()
 {
-	bind_table_t *BT_event;
-
 	init_bots();
 
-	/* Create botnet bind tables. */
 	BT_chjn = add_bind_table2("chjn", 4, "ssdd", MATCH_MASK, BIND_STACKABLE);
 	BT_chpt = add_bind_table2("chpt", 4, "ssdd", MATCH_MASK, BIND_STACKABLE);
-
-	/* Add our event handlers */
-	add_hook(HOOK_5MINUTELY, (Function) check_botnet_pings);
-	BT_event = find_bind_table2("event");
-	if (BT_event) add_builtins2(BT_event, botnet_events);
-}
-
-/* Handle TERM signal */
-static void botnet_sigterm(char *event)
-{
-	if (die_on_sigterm) botnet_send_chat(-1, botnetnick, "ACK, I've been terminated! (SIGTERM)");
-}
-
-static void botnet_sighup(char *event)
-{
-	if (die_on_sighup) botnet_send_chat(-1, botnetnick, "ACK, I've been terminated! (SIGHUP)");
 }
 
 static void init_bots()
diff -Bur eggdrop1.7/src/chanprog.c eggdev/src/chanprog.c
--- eggdrop1.7/src/chanprog.c	Thu Oct 11 12:24:01 2001
+++ eggdev/src/chanprog.c	Thu Oct 11 18:28:43 2001
@@ -131,7 +131,7 @@
 
   strncpyz(buf, host, sizeof buf);
   uhost = buf;
-  nick = splitnick(&uhost);
+  nick = newsplit(&uhost, '!');
   for (chan = chanset; chan; chan = chan->next)
     for (m = chan->channel.member; m && m->nick[0]; m = m->next)
       if (!irccmp(nick, m->nick) && !egg_strcasecmp(uhost, m->userhost))
@@ -196,7 +196,7 @@
 
   strncpyz(buf, host, sizeof buf);
   uhost = buf;
-  nick = splitnick(&uhost);
+  nick = newsplit(&uhost, '!');
   for (chan = chanset; chan; chan = chan->next)
     for (m = chan->channel.member; m && m->nick[0]; m = m->next)
       if (!irccmp(nick, m->nick) && !egg_strcasecmp(uhost, m->userhost))
diff -Bur eggdrop1.7/src/cmds.c eggdev/src/cmds.c
--- eggdrop1.7/src/cmds.c	Thu Oct 11 05:34:19 2001
+++ eggdev/src/cmds.c	Thu Oct 11 20:38:14 2001
@@ -384,7 +384,7 @@
     dprintf(idx, "Usage: newpass <newpassword>\n");
     return;
   }
-  new = newsplit(&par);
+  new = newsplit(&par, ' ');
   if (strlen(new) > 16)
     new[16] = 0;
   if (strlen(new) < 6) {
@@ -518,13 +518,13 @@
     return;
   }
   putlog(LOG_CMDS, "*", "#%s# match %s", dcc[idx].nick, par);
-  s = newsplit(&par);
+  s = newsplit(&par, ' ');
   if (strchr(CHANMETA, par[0]) != NULL)
-    chname = newsplit(&par);
+    chname = newsplit(&par, ' ');
   else
     chname = "";
   if (atoi(par) > 0) {
-    s1 = newsplit(&par);
+    s1 = newsplit(&par, ' ');
     if (atoi(par) > 0) {
       start = atoi(s1);
       limit = atoi(par);
@@ -596,11 +596,11 @@
     dprintf(idx, "Usage: boot nick[@bot]\n");
     return;
   }
-  who = newsplit(&par);
+  who = newsplit(&par, ' ');
   if (strchr(who, '@') != NULL) {
-    char whonick[HANDLEN + 1];
-
-    splitcn(whonick, who, '@', HANDLEN + 1);
+    char *whonick = newsplit(&who, '@');
+    if (strlen(whonick) > HANDLEN)
+      whonick[HANDLEN]=0;
     if (!egg_strcasecmp(who, botnetnick)) {
       cmd_boot(u, idx, whonick);
       return;
@@ -661,7 +661,7 @@
   }
   get_user_flagrec(u, &fr, dcc[idx].u.chat->con_chan);
   strcpy(s1, par);
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
   /* Don't remove '+' as someone couldn't have '+' in CHANMETA cause
    * he doesn't use IRCnet ++rtc.
    */
@@ -680,7 +680,7 @@
   } else
     dest = idx;
   if (!nick[0])
-    nick = newsplit(&par);
+    nick = newsplit(&par, ' ');
   /* Consider modeless channels, starting with '+' */
   if ((nick [0] == '+' && findchan_by_dname(nick)) ||
       (nick [0] != '+' && strchr(CHANMETA "*", nick[0]))) {
@@ -701,7 +701,7 @@
       dcc[dest].u.chat->con_flags &= ~(LOG_MISC | LOG_CMDS | LOG_WALL);
   }
   if (!nick[0])
-    nick = newsplit(&par);
+    nick = newsplit(&par, ' ');
   pls = 1;
   if (nick[0]) {
     if ((nick[0] != '+') && (nick[0] != '-'))
@@ -770,8 +770,8 @@
   if (!par[0])
     dprintf(idx, "Usage: +bot <handle> <address[:telnet-port[/relay-port]]> [host]\n");
   else {
-    handle = newsplit(&par);
-    addr = newsplit(&par);
+    handle = newsplit(&par, ' ');
+    addr = newsplit(&par, ' ');
     if (strlen(handle) > HANDLEN)
       handle[HANDLEN] = 0;	/* max len = XX .. for the moment :) */
     if (get_user_by_handle(userlist, handle))
@@ -820,7 +820,7 @@
       set_user(&USERENTRY_BOTADDR, u1, bi);
       dprintf(idx, "Added bot '%s' with address '%s' and no password.\n",
 	      handle, addr);
-      host = newsplit(&par);
+      host = newsplit(&par, ' ');
       if (host[0]) {
 	addhost_by_handle(handle, host);
       } else if (!add_bot_hostmask(idx, handle))
@@ -836,8 +836,8 @@
   int i, atr = u ? u->flags : 0, atr2;
   struct userrec *u2;
 
-  strncpyz(hand, newsplit(&par), sizeof hand);
-  strncpyz(newhand, newsplit(&par), sizeof newhand);
+  strncpyz(hand, newsplit(&par, ' '), sizeof hand);
+  strncpyz(newhand, newsplit(&par, ' '), sizeof newhand);
 
   if (!hand[0] || !newhand[0]) {
     dprintf(idx, "Usage: chhandle <oldhandle> <newhandle>\n");
@@ -882,7 +882,7 @@
   char oldhandle[HANDLEN + 1], newhandle[HANDLEN + 1];
   int i;
 
-  strncpyz(newhandle, newsplit(&par), sizeof newhandle);
+  strncpyz(newhandle, newsplit(&par, ' '), sizeof newhandle);
 
   if (!newhandle[0]) {
     dprintf(idx, "Usage: handle <new-handle>\n");
@@ -917,7 +917,7 @@
   if (!par[0])
     dprintf(idx, "Usage: chpass <handle> [password]\n");
   else {
-    handle = newsplit(&par);
+    handle = newsplit(&par, ' ');
     u = get_user_by_handle(userlist, handle);
     if (!u)
       dprintf(idx, "No such user.\n");
@@ -937,7 +937,7 @@
       set_user(&USERENTRY_PASS, u, NULL);
       dprintf(idx, "Removed password.\n");
     } else {
-      l = strlen(new = newsplit(&par));
+      l = strlen(new = newsplit(&par, ' '));
       if (l > 16)
 	new[16] = 0;
       if (l < 6)
@@ -964,8 +964,8 @@
     dprintf(idx, "Usage: chaddr <botname> <address[:telnet-port[/relay-port]]>\n");
     return;
   }
-  handle = newsplit(&par);
-  addr = newsplit(&par);
+  handle = newsplit(&par, ' ');
+  addr = newsplit(&par, ' ');
   if (strlen(addr) > UHOSTMAX)
     addr[UHOSTMAX] = 0;
   u1 = get_user_by_handle(userlist, handle);
@@ -1031,7 +1031,7 @@
     dprintf(idx, "Usage: comment <handle> <newcomment>\n");
     return;
   }
-  handle = newsplit(&par);
+  handle = newsplit(&par, ' ');
   u1 = get_user_by_handle(userlist, handle);
   if (!u1) {
     dprintf(idx, "No such user!\n");
@@ -1125,7 +1125,7 @@
   char *nick;
   int i, ok = 0;
 
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
   if (!par[0]) {
     dprintf(idx, "Usage: simul <hand> <text>\n");
     return;
@@ -1157,7 +1157,7 @@
     return;
   }
   putlog(LOG_CMDS, "*", "#%s# link %s", dcc[idx].nick, par);
-  s = newsplit(&par);
+  s = newsplit(&par, ' ');
   if (!par[0] || !egg_strcasecmp(par, botnetnick))
     botlink(dcc[idx].nick, idx, s);
   else {
@@ -1183,7 +1183,7 @@
     return;
   }
   putlog(LOG_CMDS, "*", "#%s# unlink %s", dcc[idx].nick, par);
-  bot = newsplit(&par);
+  bot = newsplit(&par, ' ');
   i = nextbot(bot);
   if (i < 0) {
     botunlink(idx, bot, par);
@@ -1462,7 +1462,7 @@
     dprintf(idx, "Usage: chattr <handle> [changes] [channel]\n");
     return;
   }
-  hand = newsplit(&par);
+  hand = newsplit(&par, ' ');
   u2 = get_user_by_handle(userlist, hand);
   if (!u2) {
     dprintf(idx, "No such user!\n");
@@ -1471,11 +1471,11 @@
 
   /* Parse args */
   if (par[0]) {
-    arg = newsplit(&par);
+    arg = newsplit(&par, ' ');
     if (par[0]) {
       /* .chattr <handle> <changes> <channel> */
       chg = arg;
-      arg = newsplit(&par);
+      arg = newsplit(&par, ' ');
       chan = findchan_by_dname(arg);
     } else {
       chan = findchan_by_dname(arg);
@@ -1645,7 +1645,7 @@
     dprintf(idx, "Usage: botattr <handle> [changes] [channel]\n");
     return;
   }
-  hand = newsplit(&par);
+  hand = newsplit(&par, ' ');
   u2 = get_user_by_handle(userlist, hand);
   if (!u2 || !(u2->flags & USER_BOT)) {
     dprintf(idx, "No such bot!\n");
@@ -1661,11 +1661,11 @@
   }
   /* Parse args */
   if (par[0]) {
-    arg = newsplit(&par);
+    arg = newsplit(&par, ' ');
     if (par[0]) {
       /* .botattr <handle> <changes> <channel> */
       chg = arg;
-      arg = newsplit(&par);
+      arg = newsplit(&par, ' ');
       chan = findchan_by_dname(arg);
     } else {
       chan = findchan_by_dname(arg);
@@ -1782,7 +1782,7 @@
   int newchan, oldchan;
   module_entry *me;
 
-  arg = newsplit(&par);
+  arg = newsplit(&par, ' ');
   if (!egg_strcasecmp(arg, "off")) {
     /* Turn chat off */
     if (dcc[idx].u.chat->channel < 0) {
@@ -2008,7 +2008,7 @@
 	    stripmaskname(dcc[idx].u.chat->strip_flags));
     return;
   }
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
   if ((nick[0] != '+') && (nick[0] != '-') && u &&
       (u->flags & USER_MASTER)) {
     for (i = 0; i < dcc_total; i++)
@@ -2212,10 +2212,11 @@
 {
   int code;
 
-  if (!(isowner(dcc[idx].nick)) && (must_be_owner)) {
-    dprintf(idx, _("What?  You need .help\n"));
-    return;
-  }
+//  if (!(isowner(dcc[idx].nick)) && (must_be_owner)) {
+//    dprintf(idx, _("What?  You need .help\n"));
+//    return;
+//  }
+  putlog(LOG_MISC, "*", ".tcl called");
   debug1("tcl: evaluate (.tcl): %s", msg);
   code = Tcl_GlobalEval(interp, msg);
   if (code == TCL_OK)
@@ -2315,12 +2316,12 @@
     return;
   }
 
-  who = newsplit(&par);
+  who = newsplit(&par, ' ');
   if (par[0] == '%') {
     char		*p, *p_expire;
     unsigned long int	 expire_foo;
 
-    p = newsplit(&par);
+    p = newsplit(&par, ' ');
     p_expire = p + 1;
     while (*(++p) != 0) {
       switch (tolower(*p)) {
@@ -2407,8 +2408,8 @@
     dprintf(idx, "Usage: +user <handle> <hostmask>\n");
     return;
   }
-  handle = newsplit(&par);
-  host = newsplit(&par);
+  handle = newsplit(&par, ' ');
+  host = newsplit(&par, ' ');
   if (strlen(handle) > HANDLEN)
     handle[HANDLEN] = 0;
   if (get_user_by_handle(userlist, handle))
@@ -2434,7 +2435,7 @@
     dprintf(idx, "Usage: -user <hand>\n");
     return;
   }
-  handle = newsplit(&par);
+  handle = newsplit(&par, ' ');
   u2 = get_user_by_handle(userlist, handle);
   if (!u2 || !u) {
     dprintf(idx, "No such user!\n");
@@ -2486,10 +2487,10 @@
     return;
   }
 
-  handle = newsplit(&par);
+  handle = newsplit(&par, ' ');
 
   if (par[0]) {
-    host = newsplit(&par);
+    host = newsplit(&par, ' ');
     u2 = get_user_by_handle(userlist, handle);
   } else {
     host = handle;
@@ -2549,9 +2550,9 @@
 	    _("hostmask"));
     return;
   }
-  handle = newsplit(&par);
+  handle = newsplit(&par, ' ');
   if (par[0]) {
-    host = newsplit(&par);
+    host = newsplit(&par, ' ');
     u2 = get_user_by_handle(userlist, handle);
   } else {
     host = handle;
@@ -2818,7 +2819,7 @@
   {"status",		"m|m",	(Function) cmd_status,		NULL},
   {"strip",		"",	(Function) cmd_strip,		NULL},
   {"su",		"",	(Function) cmd_su,		NULL},
-  {"tcl",		"n",	(Function) cmd_tcl,		NULL},
+  {"tcl",		"",	(Function) cmd_tcl,		NULL},
   {"trace",		"",	(Function) cmd_trace,		NULL},
   {"unlink",		"t",	(Function) cmd_unlink,		NULL},
   {"unloadmod",		"n",	(Function) cmd_unloadmod,	NULL},
Only in eggdev/src/compat: Makefile.in
diff -Bur eggdrop1.7/src/dcc.c eggdev/src/dcc.c
--- eggdrop1.7/src/dcc.c	Thu Oct 11 05:34:19 2001
+++ eggdev/src/dcc.c	Thu Oct 11 19:21:37 2001
@@ -162,7 +162,7 @@
   if ((par[0] >= '0') && (par[0] <= '9')) {
     char *work;
 
-    work = newsplit(&par);
+    work = newsplit(&par, ' ');
     dcc[idx].u.bot->numver = atoi(work);
   } else
     dcc[idx].u.bot->numver = 0;
@@ -182,7 +182,7 @@
   } else {
 #endif
     dprintf(idx, "tb %s\n", botnetnick);
-    l = atoi(newsplit(&par));
+    l = atoi(newsplit(&par, ' '));
     if (l != HANDLEN) {
       dprintf(idx, "error Non-matching handle length: mine %d, yours %d\n",
 	      HANDLEN, l);
@@ -315,7 +315,7 @@
   char *code;
 
   strip_telnet(dcc[idx].sock, buf, &x);
-  code = newsplit(&buf);
+  code = newsplit(&buf, ' ');
   if (!egg_strcasecmp(code, "*hello!")) {
     greet_new_bot(idx);
   } else if (!egg_strcasecmp(code, "version") || !egg_strcasecmp(code, "v")) {
@@ -874,7 +874,7 @@
     if ((buf[0] == '.') || (dcc[idx].u.chat->channel < 0)) {
 	if (buf[0] == '.')
 	  buf++;
-	v = newsplit(&buf);
+	v = newsplit(&buf, ' ');
 	rmspace(buf);
 	check_tcl_dcc(v, idx, buf);
     } else if (buf[0] == ',') {
@@ -1540,20 +1540,17 @@
   putlog(LOG_MISC, "*", _("New user via telnet: [%s]%s/%d"), dcc[idx].nick, dcc[idx].host,
 	 dcc[idx].port);
   if (notify_new[0]) {
-    char s[121], s1[121], s2[121];
+    char s[121], s1[121], *s2=s1, *s3;
 
     sprintf(s, "Introduced to %s, %s", dcc[idx].nick, dcc[idx].host);
     strcpy(s1, notify_new);
-    splitc(s2, s1, ',');
-    while (s2[0]) {
-      rmspace(s2);
-      add_note(s2, botnetnick, s, -1, 0);
-      splitc(s2, s1, ',');
+    s3 = newsplit(&s2, ',');
+    while (s3[0]) {
+      add_note(s3, botnetnick, s, -1, 0);
+      s3 = newsplit(&s2, ',');
     }
-    rmspace(s1);
-    add_note(s1, botnetnick, s, -1, 0);
   }
-  newpass = newsplit(&buf);
+  newpass = newsplit(&buf, ' ');
   set_user(&USERENTRY_PASS, dcc[idx].user, newpass);
   dprintf(idx, "\nRemember that!  You'll need it next time you log in.\n");
   dprintf(idx, "You now have an account on %s...\n\n\n", botnetnick);
Only in eggdev/src/egglib: Makefile.in
diff -Bur eggdrop1.7/src/main.c eggdev/src/main.c
--- eggdrop1.7/src/main.c	Thu Oct 11 20:27:45 2001
+++ eggdev/src/main.c	Thu Oct 11 17:54:36 2001
@@ -5,7 +5,7 @@
  *   command line arguments
  *   context and assert debugging
  *
- * $Id: main.c,v 1.80 2001/10/12 02:27:45 stdarg Exp $
+ * $Id: main.c,v 1.79 2001/10/10 10:44:04 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -331,6 +331,7 @@
   write_userfile(-1);
   check_tcl_event("sigterm");
   if (die_on_sigterm) {
+    botnet_send_chat(-1, botnetnick, "ACK, I've been terminated!");
     fatal("TERMINATE SIGNAL -- SIGNING OFF", 0);
   } else {
     putlog(LOG_MISC, "*", "RECEIVED TERMINATE SIGNAL (IGNORING)");
@@ -452,8 +453,8 @@
 	  break;
 	case 'v':
 	  strncpyz(x, egg_version, sizeof x);
-	newsplit(&z);
-	newsplit(&z);
+	newsplit(&z, ' ');
+	newsplit(&z, ' ');
 	printf("%s\n", version);
 	if (z[0])
 	  printf("  (patches: %s)\n", z);
@@ -536,6 +537,7 @@
     miltime = (nowtm.tm_hour * 100) + (nowtm.tm_min);
     if (((int) (nowtm.tm_min / 5) * 5) == (nowtm.tm_min)) {	/* 5 min */
       call_hook(HOOK_5MINUTELY);
+      check_botnet_pings();
       if (!quick_logs) {
 	flushlogs();
 	check_logsize();
@@ -652,7 +654,6 @@
 int init_dcc_max(), init_userent(), init_misc(), init_net(),
  init_modules(), init_tcl(int, char **);
 void botnet_init();
-void init_binds();
 
 void patch(const char *str)
 {
@@ -767,7 +768,6 @@
   if (((int) getuid() == 0) || ((int) geteuid() == 0))
     fatal(_("ERROR: Eggdrop will not run as root!"), 0);
 
-  init_binds();
   init_dcc_max();
   init_userent();
   init_misc();
diff -Bur eggdrop1.7/src/main.h eggdev/src/main.h
--- eggdrop1.7/src/main.h	Wed Oct 10 04:44:04 2001
+++ eggdev/src/main.h	Thu Oct 11 17:46:40 2001
@@ -93,7 +93,7 @@
 	if ((x)[0] == ':')			 			\
 		(x)++;							\
 	else								\
-		(x) = newsplit(&(x));					\
+		(x) = newsplit(&(x),' ');				\
 } while (0)
 
 /* This macro copies (_len - 1) bytes from _source to _target. The
diff -Bur eggdrop1.7/src/misc.c eggdev/src/misc.c
--- eggdrop1.7/src/misc.c	Thu Oct 11 12:24:01 2001
+++ eggdev/src/misc.c	Thu Oct 11 22:19:36 2001
@@ -172,82 +172,17 @@
   return b - c;
 }
 
-/* Split first word off of rest and put it in first
- */
-void splitc(char *first, char *rest, char divider)
-{
-  char *p = strchr(rest, divider);
-
-  if (p == NULL) {
-    if (first != rest && first)
-      first[0] = 0;
-    return;
-  }
-  *p = 0;
-  if (first != NULL)
-    strcpy(first, rest);
-  if (first != rest)
-    /*    In most circumstances, strcpy with src and dst being the same buffer
-     *  can produce undefined results. We're safe here, as the src is
-     *  guaranteed to be at least 2 bytes higher in memory than dest. <Cybah>
-     */
-    strcpy(rest, p + 1);
-}
-
-/*    As above, but lets you specify the 'max' number of bytes (EXCLUDING the
- * terminating null).
- *
- * Example of use:
- *
- * char buf[HANDLEN + 1];
- *
- * splitcn(buf, input, "@", HANDLEN);
- *
- * <Cybah>
- */
-void splitcn(char *first, char *rest, char divider, size_t max)
-{
-  char *p = strchr(rest, divider);
-
-  if (p == NULL) {
-    if (first != rest && first)
-      first[0] = 0;
-    return;
-  }
-  *p = 0;
-  if (first != NULL)
-    strncpyz(first, rest, max);
-  if (first != rest)
-    /*    In most circumstances, strcpy with src and dst being the same buffer
-     *  can produce undefined results. We're safe here, as the src is
-     *  guaranteed to be at least 2 bytes higher in memory than dest. <Cybah>
-     */
-    strcpy(rest, p + 1);
-}
-
-char *splitnick(char **blah)
-{
-  char *p = strchr(*blah, '!'), *q = *blah;
-
-  if (p) {
-    *p = 0;
-    *blah = p + 1;
-    return q;
-  }
-  return "";
-}
-
-char *newsplit(char **rest)
+char *newsplit(char **rest, char token)
 {
   register char *o, *r;
 
   if (!rest)
     return *rest = "";
   o = *rest;
-  while (*o == ' ')
+  while (*o == token)
     o++;
   r = o;
-  while (*o && (*o != ' '))
+  while (*o && (*o != token))
     o++;
   if (*o)
     *o++ = 0;
Only in eggdev/src/mod: Makefile.in
Only in eggdev/src/mod/assoc.mod: Makefile.in
diff -Bur eggdrop1.7/src/mod/assoc.mod/assoc.c eggdev/src/mod/assoc.mod/assoc.c
--- eggdrop1.7/src/mod/assoc.mod/assoc.c	Wed Oct 10 12:47:42 2001
+++ eggdev/src/mod/assoc.mod/assoc.c	Thu Oct 11 17:57:07 2001
@@ -194,7 +194,7 @@
   } else if (!u || !(u->flags & USER_BOTMAST)) {
     dprintf(idx, _("What?  You need '.help'\n"));
   } else {
-    num = newsplit(&par);
+    num = newsplit(&par, ' ');
     if (num[0] == '*') {
       chan = 100000 + atoi(num + 1);
       if ((chan < 100000) || (chan > 199999)) {
@@ -309,10 +309,10 @@
   if ((idx >= 0) && !(bot_flags(dcc[idx].user) & BOT_ISOLATE)) {
     if (!egg_strcasecmp(dcc[idx].nick, botnick))
       linking = b_status(idx) & STAT_LINKING;
-    s = newsplit(&par);
+    s = newsplit(&par, ' ');
     chan = base64_to_int(s);
     if ((chan > 0) || (chan < GLOBAL_CHANS)) {
-      nick = newsplit(&par);
+      nick = newsplit(&par, ' ');
       s1 = get_assoc_name(chan);
       if (linking && ((s1 == NULL) || (s1[0] == 0) ||
 		      (((int) get_user(find_entry_type("BOTFL"),
Only in eggdev/src/mod/blowfish.mod: Makefile.in
Only in eggdev/src/mod/channels.mod: Makefile.in
diff -Bur eggdrop1.7/src/mod/channels.mod/channels.c eggdev/src/mod/channels.mod/channels.c
--- eggdrop1.7/src/mod/channels.mod/channels.c	Thu Oct 11 12:24:02 2001
+++ eggdev/src/mod/channels.mod/channels.c	Thu Oct 11 17:57:35 2001
@@ -85,7 +85,7 @@
   chan->mode_mns_prot = chan->mode_pls_prot = 0;
   chan->limit_prot = 0;
   chan->key_prot[0] = 0;
-  for (s = newsplit(&set); *s; s++) {
+  for (s = newsplit(&set, ' '); *s; s++) {
     i = 0;
     switch (*s) {
     case '+':
@@ -128,7 +128,7 @@
       i = CHANLIMIT;
       chan->limit_prot = 0;
       if (pos) {
-	s1 = newsplit(&set);
+	s1 = newsplit(&set, ' ');
 	if (s1[0])
 	  chan->limit_prot = atoi(s1);
       }
@@ -137,7 +137,7 @@
       i = CHANKEY;
       chan->key_prot[0] = 0;
       if (pos) {
-	s1 = newsplit(&set);
+	s1 = newsplit(&set, ' ');
 	if (s1[0])
 	  strcpy(chan->key_prot, s1);
       }
diff -Bur eggdrop1.7/src/mod/channels.mod/cmdschan.c eggdev/src/mod/channels.mod/cmdschan.c
--- eggdrop1.7/src/mod/channels.mod/cmdschan.c	Thu Oct 11 12:24:02 2001
+++ eggdev/src/mod/channels.mod/cmdschan.c	Thu Oct 11 17:59:21 2001
@@ -40,9 +40,9 @@
   if (!par[0]) {
     dprintf(idx, "Usage: +ban <hostmask> [channel] [%%<XdXhXm>] [reason]\n");
   } else {
-    who = newsplit(&par);
+    who = newsplit(&par, ' ');
     if (par[0] && strchr(CHANMETA, par[0]))
-      chname = newsplit(&par);
+      chname = newsplit(&par, ' ');
     else
       chname = 0;
     if (chname || !(u->flags & USER_MASTER)) {
@@ -62,7 +62,7 @@
       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)) {
@@ -176,9 +176,9 @@
   if (!par[0]) {
     dprintf(idx, "Usage: +exempt <hostmask> [channel] [%%<XdXhXm>] [reason]\n");
   } else {
-    who = newsplit(&par);
+    who = newsplit(&par, ' ');
     if ((par[0] == '#') || (par[0] == '&') || (par[0] == '+'))
-      chname = newsplit(&par);
+      chname = newsplit(&par, ' ');
     else
       chname = 0;
     if (chname || !(u->flags & USER_MASTER)) {
@@ -198,7 +198,7 @@
       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)) {
@@ -297,9 +297,9 @@
   if (!par[0]) {
     dprintf(idx, "Usage: +invite <hostmask> [channel] [%%<XdXhXm>] [reason]\n");
   } else {
-    who = newsplit(&par);
+    who = newsplit(&par, ' ');
     if ((par[0] == '#') || (par[0] == '&') || (par[0] == '+'))
-      chname = newsplit(&par);
+      chname = newsplit(&par, ' ');
     else
       chname = 0;
     if (chname || !(u->flags & USER_MASTER)) {
@@ -319,7 +319,7 @@
       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)) {
@@ -415,9 +415,9 @@
     dprintf(idx, "Usage: -ban <hostmask|ban #> [channel]\n");
     return;
   }
-  ban = newsplit(&par);
+  ban = newsplit(&par, ' ');
   if (par[0] && strchr(CHANMETA, par[0]))
-    chname = newsplit(&par);
+    chname = newsplit(&par, ' ');
   else
     chname = dcc[idx].u.chat->con_chan;
   if (chname || !(u->flags & USER_MASTER)) {
@@ -504,9 +504,9 @@
     dprintf(idx, "Usage: -exempt <hostmask|exempt #> [channel]\n");
     return;
   }
-  exempt = newsplit(&par);
+  exempt = newsplit(&par, ' ');
   if ((par[0] == '#') || (par[0] == '&') || (par[0] == '+'))
-    chname = newsplit(&par);
+    chname = newsplit(&par, ' ');
   else
     chname = dcc[idx].u.chat->con_chan;
   if (chname || !(u->flags & USER_MASTER)) {
@@ -593,9 +593,9 @@
     dprintf(idx, "Usage: -invite <hostmask|invite #> [channel]\n");
     return;
   }
-  invite = newsplit(&par);
+  invite = newsplit(&par, ' ');
   if ((par[0] == '#') || (par[0] == '&') || (par[0] == '+'))
-    chname = newsplit(&par);
+    chname = newsplit(&par, ' ');
   else
     chname = dcc[idx].u.chat->con_chan;
   if (chname || !(u->flags & USER_MASTER)) {
@@ -723,7 +723,7 @@
   if (s1 && s1[0] == '@')
     locked = 1;
   if (par[0] && strchr(CHANMETA, par[0])) {
-    chname = newsplit(&par);
+    chname = newsplit(&par, ' ');
     if (!findchan_by_dname(chname)) {
       dprintf(idx, "No such channel.\n");
       return;
@@ -789,7 +789,7 @@
     dprintf(idx, "Info storage is turned off.\n");
     return;
   }
-  handle = newsplit(&par);
+  handle = newsplit(&par, ' ');
   if (!handle[0]) {
     dprintf(idx, "Usage: chinfo <handle> [channel] <new-info>\n");
     return;
@@ -800,7 +800,7 @@
     return;
   }
   if (par[0] && strchr(CHANMETA, par[0])) {
-    chname = newsplit(&par);
+    chname = newsplit(&par, ' ');
     if (!findchan_by_dname(chname)) {
       dprintf(idx, "No such channel.\n");
       return;
@@ -855,9 +855,9 @@
   char *stick_type, s[UHOSTLEN], chname[81];
   module_entry *me;
 
-  stick_type = newsplit(&par);
-  strncpyz(s, newsplit(&par), sizeof s);
-  strncpyz(chname, newsplit(&par), sizeof chname);
+  stick_type = newsplit(&par, ' ');
+  strncpyz(s, newsplit(&par, ' '), sizeof s);
+  strncpyz(chname, newsplit(&par, ' '), sizeof chname);
 
   if (egg_strcasecmp(stick_type, "exempt") &&
       egg_strcasecmp(stick_type, "invite") &&
@@ -992,7 +992,7 @@
     dprintf(idx, "Usage: +chrec <user> [channel]\n");
     return;
   }
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
   u1 = get_user_by_handle(userlist, nick);
   if (!u1) {
     dprintf(idx, "No such user.\n");
@@ -1001,7 +1001,7 @@
   if (!par[0])
     chan = findchan_by_dname(dcc[idx].u.chat->con_chan);
   else {
-    chn = newsplit(&par);
+    chn = newsplit(&par, ' ');
     chan = findchan_by_dname(chn);
   }
   if (!chan) {
@@ -1038,7 +1038,7 @@
     dprintf(idx, "Usage: -chrec <user> [channel]\n");
     return;
   }
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
   u1 = get_user_by_handle(userlist, nick);
   if (!u1) {
     dprintf(idx, "No such user.\n");
@@ -1055,7 +1055,7 @@
       return;
     }
   } else
-    chn = newsplit(&par);
+    chn = newsplit(&par, ' ');
   get_user_flagrec(u, &user, chn);
   get_user_flagrec(u1, &victim, chn);
   if ((!glob_master(user) && !chan_master(user)) ||  /* drummer */
@@ -1084,7 +1084,7 @@
     return;
   }
 
-  chname = newsplit(&par);
+  chname = newsplit(&par, ' ');
   if (findchan_by_dname(chname)) {
     dprintf(idx, "That channel already exists!\n");
     return;
@@ -1112,7 +1112,7 @@
     dprintf(idx, "Usage: -chan [%s]<channel>\n", CHANMETA);
     return;
   }
-  chname = newsplit(&par);
+  chname = newsplit(&par, ' ');
   chan = findchan_by_dname(chname);
   if (!chan) {
     if ((chan = findchan(chname)))
@@ -1155,7 +1155,7 @@
       return;
     }
   } else {
-    chname = newsplit(&par);
+    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);
@@ -1303,10 +1303,10 @@
 	dprintf(idx, "You need to be a global master to use .chanset *.\n");
 	return;
       }
-      newsplit(&par);
+      newsplit(&par, ' ');
     } else {
       if (strchr(CHANMETA, par[0])) {
-        chname = newsplit(&par);
+        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);
@@ -1339,7 +1339,7 @@
       chname = chan->dname;
       strcpy(buf, bak);
       par = buf;
-      list[0] = newsplit(&par);
+      list[0] = newsplit(&par, ' ');
       answers[0] = 0;
       while (list[0][0]) {
 	if (list[0][0] == '+' || list[0][0] == '-' ||
@@ -1350,7 +1350,7 @@
 	  } 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);
+	  list[0] = newsplit(&par, ' ');
 	  continue;
 	}
 	/* The rest have an unknown amount of args, so assume the rest of the
diff -Bur eggdrop1.7/src/mod/channels.mod/userchan.c eggdev/src/mod/channels.mod/userchan.c
--- eggdrop1.7/src/mod/channels.mod/userchan.c	Thu Oct 11 12:24:02 2001
+++ eggdev/src/mod/channels.mod/userchan.c	Thu Oct 11 19:00:22 2001
@@ -732,7 +732,7 @@
 
   /* Was a channel given? */
   if (match[0]) {
-    chname = newsplit(&match);
+    chname = newsplit(&match, ' ');
     if (chname[0] && (strchr(CHANMETA, chname[0]) != NULL)) {
       chan = findchan_by_dname(chname);
       if (!chan) {
@@ -786,7 +786,7 @@
 	  (!u_equals_mask(chan->bans, b->mask))) {
 	strcpy(s, b->who);
 	s2 = s;
-	s1 = splitnick(&s2);
+	s1 = newsplit(&s2, '!');
 	if (s1[0])
 	  sprintf(fill, "%s (%s!%s)", b->mask, s1, s2);
 	else if (!egg_strcasecmp(s, "existant"))
@@ -820,7 +820,7 @@
 
   /* Was a channel given? */
   if (match[0]) {
-    chname = newsplit(&match);
+    chname = newsplit(&match, ' ');
     if (chname[0] && strchr(CHANMETA, chname[0])) {
       chan = findchan_by_dname(chname);
       if (!chan) {
@@ -877,7 +877,7 @@
 	  (!u_equals_mask(chan->exempts, e->mask))) {
 	strcpy(s, e->who);
 	s2 = s;
-	s1 = splitnick(&s2);
+	s1 = newsplit(&s2, '!');
 	if (s1[0])
 	  sprintf(fill, "%s (%s!%s)", e->mask, s1, s2);
 	else if (!egg_strcasecmp(s, "existant"))
@@ -911,7 +911,7 @@
 
   /* Was a channel given? */
   if (match[0]) {
-    chname = newsplit(&match);
+    chname = newsplit(&match, ' ');
     if (chname[0] && strchr(CHANMETA, chname[0])) {
       chan = findchan_by_dname(chname);
       if (!chan) {
@@ -968,7 +968,7 @@
 	  (!u_equals_mask(chan->invites, i->mask))) {
 	strcpy(s, i->who);
 	s2 = s;
-	s1 = splitnick(&s2);
+	s1 = newsplit(&s2, '!');
 	if (s1[0])
 	  sprintf(fill, "%s (%s!%s)", i->mask, s1, s2);
 	else if (!egg_strcasecmp(s, "existant"))
@@ -1216,7 +1216,7 @@
 
   strcpy(buf, who);
   sfrom = buf;
-  snick = splitnick(&sfrom);
+  snick = newsplit(&sfrom, '!');
 
   if (!snick[0])
     return 1;
Only in eggdev/src/mod/compress.mod: Makefile.in
Only in eggdev/src/mod/console.mod: Makefile.in
diff -Bur eggdrop1.7/src/mod/console.mod/console.c eggdev/src/mod/console.mod/console.c
--- eggdrop1.7/src/mod/console.mod/console.c	Thu Oct 11 05:34:20 2001
+++ eggdev/src/mod/console.mod/console.c	Thu Oct 11 18:00:00 2001
@@ -56,17 +56,17 @@
   char *par, *arg;
 
   par = e->u.list->extra;
-  arg = newsplit(&par);
+  arg = newsplit(&par, ' ');
   malloc_strcpy(ci->channel, arg);
-  arg = newsplit(&par);
+  arg = newsplit(&par, ' ');
   ci->conflags = logmodes(arg);
-  arg = newsplit(&par);
+  arg = newsplit(&par, ' ');
   ci->stripflags = stripmodes(arg);
-  arg = newsplit(&par);
+  arg = newsplit(&par, ' ');
   ci->echoflags = (arg[0] == '1') ? 1 : 0;
-  arg = newsplit(&par);
+  arg = newsplit(&par, ' ');
   ci->page = atoi(arg);
-  arg = newsplit(&par);
+  arg = newsplit(&par, ' ');
   ci->conchan = atoi(arg);
   list_type_kill(e->u.list);
   e->u.extra = ci;
Only in eggdev/src/mod/ctcp.mod: Makefile.in
Only in eggdev/src/mod/filesys.mod: Makefile.in
diff -Bur eggdrop1.7/src/mod/filesys.mod/dbcompat.c eggdev/src/mod/filesys.mod/dbcompat.c
--- eggdrop1.7/src/mod/filesys.mod/dbcompat.c	Thu Oct 11 07:01:35 2001
+++ eggdev/src/mod/filesys.mod/dbcompat.c	Thu Oct 11 18:01:17 2001
@@ -69,7 +69,7 @@
     if (s[strlen(s) - 1] == '\n')
       s[strlen(s) - 1] = 0;
     if (!feof(f)) {
-      fn = newsplit(&s1);
+      fn = newsplit(&s1, ' ');
       rmspace(fn);
       if ((fn[0]) && (fn[0] != ';') && (fn[0] != '#')) {
 	/* Not comment */
@@ -93,9 +93,9 @@
 	  }
 	  fdbe = malloc_fdbe();
 	  in_file = 1;
-	  nick = newsplit(&s1);
+	  nick = newsplit(&s1, ' ');
 	  rmspace(nick);
-	  tm = newsplit(&s1);
+	  tm = newsplit(&s1, ' ');
 	  rmspace(tm);
 	  rmspace(s1);
 	  i = strlen(fn) - 1;
diff -Bur eggdrop1.7/src/mod/filesys.mod/files.c eggdev/src/mod/filesys.mod/files.c
--- eggdrop1.7/src/mod/filesys.mod/files.c	Thu Oct 11 07:01:35 2001
+++ eggdev/src/mod/filesys.mod/files.c	Thu Oct 11 20:18:46 2001
@@ -435,7 +435,7 @@
 	    resend ? "re" : "");
     return;
   }
-  what = newsplit(&par);
+  what = newsplit(&par, ' ');
   if (strlen(par) > nicklen) {
     dprintf(idx, _("Be reasonable.\n"));
     return;
@@ -474,8 +474,7 @@
 	char *bot, *whoto = NULL;
 
 	/* This is a link to a file on another bot... */
-	bot = malloc(strlen(fdbe->sharelink) + 1);
-	splitc(bot, fdbe->sharelink, ':');
+	bot = newsplit(&(fdbe->sharelink), ':');
 	if (!egg_strcasecmp(bot, botnetnick)) {
 	  dprintf(idx, "Can't get that file, it's linked to this bot!\n");
 	} else if (!in_chain(bot)) {
@@ -498,7 +497,6 @@
 	  free_null(whoto);
 	  free_null(s);
 	}
-	free_null(bot);
       } else {
 	do_dcc_send(idx, destdir, fdbe->filename, par, resend);
 	/* Don't increase got count till later */
@@ -723,7 +721,7 @@
   FILE *fdb;
   filedb_entry *fdbe;
 
-  share = newsplit(&par);
+  share = newsplit(&par, ' ');
   if (strlen(share) > 60)
     share[60] = 0;
   /* Correct format? */
@@ -792,7 +790,7 @@
   filedb_entry *fdbe;
   long where;
 
-  fn = newsplit(&par);
+  fn = newsplit(&par, ' ');
   if (!fn[0]) {
     dprintf(idx, "%s: desc <filename> <new description>\n", _("Usage"));
     return;
@@ -948,7 +946,7 @@
     dprintf(idx, "%s: mkdir <dir> [required-flags] [channel]\n", _("Usage"));
     return;
   }
-  name = newsplit(&par);
+  name = newsplit(&par, ' ');
   ret = strlen(name);
   if (ret > 60)
     name[(ret = 60)] = 0;
@@ -957,8 +955,8 @@
   if (strchr(name, '/'))
     dprintf(idx, "You can only create directories in the current directory\n");
   else {
-    flags = newsplit(&par);
-    chan = newsplit(&par);
+    flags = newsplit(&par, ' ');
+    chan = newsplit(&par, ' ');
     if (!chan[0] && flags[0] && (strchr(CHANMETA, flags[0]) != NULL)) {
       /* Need some extra checking here to makesure we dont mix up
        * the flags with a +channel. <cybah>
@@ -1100,7 +1098,7 @@
   filedb_entry *fdbe_old = NULL, *fdbe_new = NULL;
   long where = 0;
 
-  fn = newsplit(&par);
+  fn = newsplit(&par, ' ');
   if (!par[0]) {
     dprintf(idx, "%s: %s <oldfilepath> <newfilepath>\n",
 	    _("Usage"), copy ? "cp" : "mv");
@@ -1294,7 +1292,7 @@
     dprintf(idx, "Usage: filestats <user>\n");
     return 0;
   }
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
   putlog(LOG_FILES, "*", "#%s# filestats %s", dcc[idx].nick, nick);
   if (nick[0] == 0)
     tell_file_stats(idx, dcc[idx].nick);
@@ -1410,8 +1408,7 @@
     char *bot, *whoto = NULL;
 
     /* This is a link to a file on another bot... */
-    bot = malloc(strlen(fdbe->sharelink) + 1);
-    splitc(bot, fdbe->sharelink, ':');
+    bot = newsplit(&(fdbe->sharelink), ':');
     if (!egg_strcasecmp(bot, botnetnick)) {
       /* Linked to myself *duh* */
       filedb_close(fdb);
@@ -1448,7 +1445,6 @@
       free_fdbe(&fdbe);
       free_null(what);
       free_null(destdir);
-      free_null(bot);
       free_null(whoto);
       free_null(s);
       return 1;
diff -Bur eggdrop1.7/src/mod/filesys.mod/filesys.c eggdev/src/mod/filesys.mod/filesys.c
--- eggdrop1.7/src/mod/filesys.mod/filesys.c	Thu Oct 11 07:01:35 2001
+++ eggdev/src/mod/filesys.mod/filesys.c	Thu Oct 11 18:03:00 2001
@@ -213,7 +213,7 @@
     return 1;
   if (msg[0] == '.')
     msg++;
-  code = newsplit(&msg);
+  code = newsplit(&msg, ' ');
   return check_tcl_fil(code, idx, msg);
 }
 
@@ -616,7 +616,7 @@
   buf = malloc(strlen(text) + 1);
   msg = buf;
   strcpy(buf, text);
-  param = newsplit(&msg);
+  param = newsplit(&msg, ' ');
   if (!(atr & USER_XFER)) {
     putlog(LOG_FILES, "*",
 	   "Refused DCC SEND %s (no access): %s!%s", param,
@@ -632,8 +632,8 @@
     putlog(LOG_FILES, "*",
 	   "Refused dcc send %s from %s!%s", param, nick, from);
   } else {
-    ip = newsplit(&msg);
-    prt = newsplit(&msg);
+    ip = newsplit(&msg, ' ');
+    prt = newsplit(&msg, ' ');
     if (atoi(prt) < 1024 || atoi(prt) > 65535) {
       /* Invalid port */
       dprintf(DP_HELP, "NOTICE %s :%s (invalid port)\n", nick,
@@ -813,7 +813,7 @@
     return 0;
   strcpy(buf, text + 5);
   get_user_flagrec(u, &fr, 0);
-  param = newsplit(&msg);
+  param = newsplit(&msg, ' ');
   if (dcc_total == max_dcc) {
     putlog(LOG_MISC, "*", _("DCC connections full: %s %s (%s!%s)"), "CHAT(file)", param, nick, from);
   } else if (glob_party(fr) || (!require_p && chan_op(fr)))
@@ -829,8 +829,8 @@
   } else if (!dccdir[0]) {
     putlog(LOG_MISC, "*", "%s: %s!%s", _("Refused DCC chat (+x but no file area)"), nick, from);
   } else {
-    ip = newsplit(&msg);
-    prt = newsplit(&msg);
+    ip = newsplit(&msg, ' ');
+    prt = newsplit(&msg, ' ');
     sock = getsock(0);
     if (sock < 0 || open_telnet_dcc(sock, ip, prt) < 0) {
       neterror(buf);
Only in eggdev/src/mod/irc.mod: Makefile.in
diff -Bur eggdrop1.7/src/mod/irc.mod/chan.c eggdev/src/mod/irc.mod/chan.c
--- eggdrop1.7/src/mod/irc.mod/chan.c	Thu Oct 11 12:24:02 2001
+++ eggdev/src/mod/irc.mod/chan.c	Thu Oct 11 19:01:44 2001
@@ -809,8 +809,8 @@
   char *p, *q, *chname;
   struct chanset_t *chan;
 
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   chan = findchan(chname);
   if (!chan) {
     putlog(LOG_MISC, "*", "%s: %s", _("Hmm, mode info from a channel Im not on"), chname);
@@ -928,15 +928,15 @@
   char *nick, *user, *host, *chname, *flags;
   struct chanset_t *chan;
 
-  newsplit(&msg);		/* Skip my nick - effeciently */
-  chname = newsplit(&msg);	/* Grab the channel */
-  chan = findchan(chname);	/* See if I'm on channel */
-  if (chan) {			/* Am I? */
-    user = newsplit(&msg);	/* Grab the user */
-    host = newsplit(&msg);	/* Grab the host */
-    newsplit(&msg);		/* Skip the server */
-    nick = newsplit(&msg);	/* Grab the nick */
-    flags = newsplit(&msg);	/* Grab the flags */
+  newsplit(&msg, ' ');			/* Skip my nick - effeciently */
+  chname = newsplit(&msg, ' ');		/* Grab the channel */
+  chan = findchan(chname);		/* See if I'm on channel */
+  if (chan) {				/* Am I? */
+    user = newsplit(&msg, ' ');		/* Grab the user */
+    host = newsplit(&msg, ' ');		/* Grab the host */
+    newsplit(&msg, ' ');		/* Skip the server */
+    nick = newsplit(&msg, ' ');		/* Grab the nick */
+    flags = newsplit(&msg, ' ');	/* Grab the flags */
     got352or4(chan, user, host, nick, flags);
   }
   return 0;
@@ -950,15 +950,15 @@
   struct chanset_t *chan;
 
   if (use_354) {
-    newsplit(&msg);		/* Skip my nick - effeciently */
+    newsplit(&msg, ' ');		/* Skip my nick - effeciently */
     if (msg[0] && (strchr(CHANMETA, msg[0]) != NULL)) {
-      chname = newsplit(&msg);	/* Grab the channel */
-      chan = findchan(chname);	/* See if I'm on channel */
-      if (chan) {		/* Am I? */
-	user = newsplit(&msg);	/* Grab the user */
-	host = newsplit(&msg);	/* Grab the host */
-	nick = newsplit(&msg);	/* Grab the nick */
-	flags = newsplit(&msg);	/* Grab the flags */
+      chname = newsplit(&msg, ' ');	/* Grab the channel */
+      chan = findchan(chname);		/* See if I'm on channel */
+      if (chan) {			/* Am I? */
+	user = newsplit(&msg, ' ');	/* Grab the user */
+	host = newsplit(&msg, ' ');	/* Grab the host */
+	nick = newsplit(&msg, ' ');	/* Grab the nick */
+	flags = newsplit(&msg, ' ');	/* Grab the flags */
 	got352or4(chan, user, host, nick, flags);
       }
     }
@@ -974,8 +974,8 @@
   char *chname;
   struct chanset_t *chan;
 
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   chan = findchan(chname);
   /* May have left the channel before the who info came in */
   if (!chan || !channel_pending(chan))
@@ -1014,13 +1014,13 @@
   strncpy(buf, origmsg, 510);
   buf[510] = 0;
   msg = buf;
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   chan = findchan(chname);
   if (!chan || !(channel_pending(chan) || channel_active(chan)))
     return 0;
-  ban = newsplit(&msg);
-  who = newsplit(&msg);
+  ban = newsplit(&msg, ' ');
+  who = newsplit(&msg, ' ');
   /* Extended timestamp format? */
   if (who[0])
     newban(chan, ban, who);
@@ -1048,8 +1048,8 @@
   char *chname;
 
   /* Okay, now add bans that i want, which aren't set yet */
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   chan = findchan(chname);
   if (chan)
     chan->status &= ~CHAN_ASKEDBANS;
@@ -1073,13 +1073,13 @@
   strncpy(buf, origmsg, 510);
   buf[510] = 0;
   msg = buf;
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   chan = findchan(chname);
   if (!chan || !(channel_pending(chan) || channel_active(chan)))
     return 0;
-  exempt = newsplit(&msg);
-  who = newsplit(&msg);
+  exempt = newsplit(&msg, ' ');
+  who = newsplit(&msg, ' ');
   /* Extended timestamp format? */
   if (who[0])
     newexempt(chan, exempt, who);
@@ -1097,8 +1097,8 @@
   char *chname;
 
   if (use_exempts == 1) {
-    newsplit(&msg);
-    chname = newsplit(&msg);
+    newsplit(&msg, ' ');
+    chname = newsplit(&msg, ' ');
     chan = findchan(chname);
     if (chan)
       chan->ircnet_status &= ~CHAN_ASKED_EXEMPTS;
@@ -1119,13 +1119,13 @@
   msg = buf;
   if (use_invites == 0)
     return 0;
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   chan = findchan(chname);
   if (!chan || !(channel_pending(chan) || channel_active(chan)))
     return 0;
-  invite = newsplit(&msg);
-  who = newsplit(&msg);
+  invite = newsplit(&msg, ' ');
+  who = newsplit(&msg, ' ');
   /* Extended timestamp format? */
   if (who[0])
     newinvite(chan, invite, who);
@@ -1143,8 +1143,8 @@
   char *chname;
 
   if (use_invites == 1) {
-    newsplit(&msg);
-    chname = newsplit(&msg);
+    newsplit(&msg, ' ');
+    chname = newsplit(&msg, ' ');
     chan = findchan(chname);
     if (chan)
       chan->ircnet_status &= ~CHAN_ASKED_INVITED;
@@ -1158,8 +1158,8 @@
 {
   char *chname;
 
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   putlog(LOG_MISC, "*", _("Im on too many channels--cant join: %s"), chname);
   return 0;
 }
@@ -1175,8 +1175,8 @@
   char *chname;
   struct chanset_t *chan;
 
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   if (chname && chname[0]=='!') {
     chan = findchan_by_dname(chname);
     if (!chan) {
@@ -1210,8 +1210,8 @@
   char *chname;
   struct chanset_t *chan;
 
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   /* !channel short names (also referred to as 'description names'
    * can be received by skipping over the unique ID.
    */
@@ -1238,8 +1238,8 @@
   char *chname;
   struct chanset_t *chan;
 
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   /* !channel short names (also referred to as 'description names'
    * can be received by skipping over the unique ID.
    */
@@ -1266,8 +1266,8 @@
   char *chname;
   struct chanset_t *chan;
 
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   /* !channel short names (also referred to as 'description names'
    * can be received by skipping over the unique ID.
    */
@@ -1294,8 +1294,8 @@
   char *chname;
   struct chanset_t *chan;
 
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   /* !channel short names (also referred to as 'description names'
    * can be received by skipping over the unique ID.
    */
@@ -1327,9 +1327,9 @@
   char *nick;
   struct chanset_t *chan;
 
-  newsplit(&msg);
+  newsplit(&msg, ' ');
   fixcolon(msg);
-  nick = splitnick(&from);
+  nick = newsplit(&from, '!');
   if (!irccmp(last_invchan, msg))
     if (now - last_invtime < 30)
       return 0;		/* Two invites to the same channel in 30 seconds? */
@@ -1372,10 +1372,10 @@
   struct chanset_t *chan;
   struct userrec *u;
 
-  chname = newsplit(&msg);
+  chname = newsplit(&msg, ' ');
   fixcolon(msg);
   u = get_user_by_host(from);
-  nick = splitnick(&from);
+  nick = newsplit(&from, '!');
   chan = findchan(chname);
   if (chan) {
     putlog(LOG_JOIN, chan->dname, "Topic changed on %s by %s!%s: %s",
@@ -1397,8 +1397,8 @@
   char *chname;
   struct chanset_t *chan;
 
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   chan = findchan(chname);
   if (chan) {
     set_topic(chan, NULL);
@@ -1415,8 +1415,8 @@
   struct chanset_t *chan;
   char *chname;
 
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   chan = findchan(chname);
   if (chan) {
     fixcolon(msg);
@@ -1514,7 +1514,7 @@
   } else if (!channel_pending(chan)) {
     chan->status &= ~CHAN_STOP_CYCLE;
     strcpy(uhost, from);
-    nick = splitnick(&uhost);
+    nick = newsplit(&uhost, '!');
     detect_chan_flood(nick, uhost, from, chan, FLOOD_JOIN, NULL);
     /* Grab last time joined before we update it */
     u = get_user_by_host(from);
@@ -1713,7 +1713,7 @@
   struct chanset_t *chan;
   struct userrec *u;
 
-  chname = newsplit(&msg);
+  chname = newsplit(&msg, ' ');
   fixcolon(msg);
   chan = findchan(chname);
   if (chan && channel_inactive(chan)) {
@@ -1723,7 +1723,7 @@
   }
   if (chan && !channel_pending(chan)) {
     u = get_user_by_host(from);
-    nick = splitnick(&from);
+    nick = newsplit(&from, '!');
     if (!channel_active(chan)) {
       /* whoa! */
       putlog(LOG_MISC, chan->dname,
@@ -1769,14 +1769,14 @@
   strncpy(buf2, origmsg, 510);
   buf2[510] = 0;
   msg = buf2;
-  chname = newsplit(&msg);
+  chname = newsplit(&msg, ' ');
   chan = findchan(chname);
   if (chan && channel_active(chan)) {
-    nick = newsplit(&msg);
+    nick = newsplit(&msg, ' ');
     fixcolon(msg);
     u = get_user_by_host(from);
     strcpy(uhost, from);
-    whodid = splitnick(&uhost);
+    whodid = newsplit(&uhost, '!');
     detect_chan_flood(whodid, uhost, from, chan, FLOOD_KICK, nick);
     m = ismember(chan, whodid);
     if (m)
@@ -1821,7 +1821,7 @@
   struct userrec *u;
 
   strcpy(uhost, from);
-  nick = splitnick(&uhost);
+  nick = newsplit(&uhost, '!');
   fixcolon(msg);
   for (chan = chanset; chan; chan = chan->next) { 
     m = ismember(chan, nick);
@@ -1882,7 +1882,7 @@
 
   strcpy(from2,from);
   u = get_user_by_host(from2);
-  nick = splitnick(&from);
+  nick = newsplit(&from, '!');
   fixcolon(msg);
   /* Fred1: Instead of expensive wild_match on signoff, quicker method.
    *        Determine if signoff string matches "%.% %.%", and only one
@@ -1961,14 +1961,14 @@
   if (!strchr("&#!+@$", msg[0]))
     return 0;
   ignoring = match_ignore(from);
-  to = newsplit(&msg);
+  to = newsplit(&msg, ' ');
   realto = (to[0] == '@') ? to + 1 : to;
   chan = findchan(realto);
   if (!chan)
     return 0;			/* Private msg to an unknown channel?? */
   fixcolon(msg);
   strcpy(uhost, from);
-  nick = splitnick(&uhost);
+  nick = newsplit(&uhost, '!');
   /* Only check if flood-ctcp is active */
   if (flud_ctcp_thr && detect_avalanche(msg)) {
     u = get_user_by_host(from);
@@ -2029,7 +2029,7 @@
       if (ctcp_count < answer_ctcp) {
 	ctcp_count++;
 	if (ctcp[0] != ' ') {
-	  code = newsplit(&ctcp);
+	  code = newsplit(&ctcp, ' ');
 	  u = get_user_by_host(from);
 	  if (!ignoring || trigger_on_ignore) {
 	    if (!check_tcl_ctcp(nick, uhost, u, to, code, ctcp))
@@ -2098,14 +2098,14 @@
   if (!strchr(CHANMETA "@", *msg))
     return 0;
   ignoring = match_ignore(from);
-  to = newsplit(&msg);
+  to = newsplit(&msg, ' ');
   realto = (*to == '@') ? to + 1 : to;
   chan = findchan(realto);
   if (!chan)
     return 0;			/* Notice to an unknown channel?? */
   fixcolon(msg);
   strcpy(uhost, from);
-  nick = splitnick(&uhost);
+  nick = newsplit(&uhost, '!');
   u = get_user_by_host(from);
   if (flud_ctcp_thr && detect_avalanche(msg)) {
     get_user_flagrec(u, &fr, chan->dname);
@@ -2152,7 +2152,7 @@
 			strncmp(ctcp, "ACTION ", 7) ?
 			FLOOD_CTCP : FLOOD_PRIVMSG, NULL);
       if (ctcp[0] != ' ') {
-	code = newsplit(&ctcp);
+	code = newsplit(&ctcp, ' ');
 	if (!ignoring || trigger_on_ignore) {
 	  check_tcl_ctcr(nick, uhost, u, chan->dname, code, msg);
 	  if (!ignoring) {
diff -Bur eggdrop1.7/src/mod/irc.mod/cmdsirc.c eggdev/src/mod/irc.mod/cmdsirc.c
--- eggdrop1.7/src/mod/irc.mod/cmdsirc.c	Thu Oct 11 12:24:02 2001
+++ eggdev/src/mod/irc.mod/cmdsirc.c	Thu Oct 11 18:08:07 2001
@@ -78,7 +78,7 @@
     return;
   }
   if (strchr(CHANMETA, par[0]) != NULL)
-    chname = newsplit(&par);
+    chname = newsplit(&par, ' ');
   else
     chname = 0;
   if (!(chan = has_op(idx, chname)))
@@ -103,7 +103,7 @@
 {
   char *nick;
 
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
   if (!par[0]) {
     dprintf(idx, "Usage: msg <nick> <message>\n");
   } else {
@@ -124,7 +124,7 @@
     return;
   }
   if (strchr(CHANMETA, par[0]) != NULL)
-    chname = newsplit(&par);
+    chname = newsplit(&par, ' ');
   else
     chname = 0;
   if (!(chan = has_op(idx, chname)))
@@ -156,7 +156,7 @@
     return;
   }
   if (strchr(CHANMETA, par[0]) != NULL)
-    chname = newsplit(&par);
+    chname = newsplit(&par, ' ');
   else
     chname = 0;
   if (!(chan = has_op(idx, chname)))
@@ -172,7 +172,7 @@
   }
   putlog(LOG_CMDS, "*", "#%s# (%s) kickban %s", dcc[idx].nick,
 	 chan->dname, par);
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
   if ((nick[0] == '@') || (nick[0] == '-')) {
     bantype = nick[0];
     nick++;
@@ -247,7 +247,7 @@
   memberlist *m;
   char s[UHOSTLEN];
 
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
   if (!(chan = has_op(idx, par)))
     return;
   if (!nick[0] && !(nick = getnick(u->handle, chan))) {
@@ -282,7 +282,7 @@
   memberlist *m;
   char s[UHOSTLEN];
 
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
   if (!(chan = has_op(idx, par)))
     return;
   if (!nick[0] && !(nick = getnick(u->handle, chan))) {
@@ -317,7 +317,7 @@
   memberlist *m;
   char s[UHOSTLEN];
 
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
   if (!(chan = has_op(idx, par)))
     return;
   if (!nick[0] && !(nick = getnick(u->handle, chan))) {
@@ -363,7 +363,7 @@
   memberlist *m;
   char s[UHOSTLEN];
 
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
   if (!(chan = has_op(idx, par)))
     return;
   if (!nick[0] && !(nick = getnick(u->handle, chan))) {
@@ -419,7 +419,7 @@
     return;
   }
   if (strchr(CHANMETA, par[0]) != NULL)
-    chname = newsplit(&par);
+    chname = newsplit(&par, ' ');
   else
     chname = 0;
   if (!(chan = has_op(idx, chname)))
@@ -435,7 +435,7 @@
   }
   putlog(LOG_CMDS, "*", "#%s# (%s) kick %s", dcc[idx].nick,
 	 chan->dname, par);
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
   if (!par[0])
     par = "request";
   if (match_my_nick(nick)) {
@@ -477,7 +477,7 @@
 
   if (!par[0])
     par = dcc[idx].nick;
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
   if (!(chan = has_op(idx, par)))
     return;
   putlog(LOG_CMDS, "*", "#%s# (%s) invite %s", dcc[idx].nick, chan->dname,
@@ -514,7 +514,7 @@
 
   if (!has_op(idx, par))
     return;
-  chname = newsplit(&par);
+  chname = newsplit(&par, ' ');
   putlog(LOG_CMDS, "*", "#%s# (%s) channel %s", dcc[idx].nick,
 	 dcc[idx].u.chat->con_chan, chname);
   if (!chname[0])
@@ -665,7 +665,7 @@
   struct chanset_t *chan;
 
   if (par[0] && (strchr(CHANMETA, par[0]) != NULL)) {
-    char *chname = newsplit(&par);
+    char *chname = newsplit(&par, ' ');
     chan = has_op(idx, chname);
   } else
     chan = has_op(idx, "");
@@ -698,7 +698,7 @@
   char *chname;
   struct chanset_t *chan;
 
-  chname = newsplit(&par);
+  chname = newsplit(&par, ' ');
   rmspace(chname);
 
   if (chname[0]) {
@@ -728,7 +728,7 @@
   char *chname;
   struct chanset_t *chan;
 
-  chname = newsplit(&par);
+  chname = newsplit(&par, ' ');
   rmspace(chname);
   if (chname[0]) {
     chan = findchan_by_dname(chname);
@@ -757,7 +757,7 @@
   char *chname;
   struct chanset_t *chan;
 
-  chname = newsplit(&par);
+  chname = newsplit(&par, ' ');
   rmspace(chname);
   if (chname[0]) {
     chan = findchan_by_dname(chname);
@@ -795,7 +795,7 @@
     dprintf(idx, "Usage: adduser <nick> [handle]\n");
     return;
   }
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
 
   /* This flag allows users to have static host (added by drummer, 20Apr99) */
   if (nick[0] == '!') {
@@ -887,7 +887,7 @@
     dprintf(idx, "Usage: deluser <nick>\n");
     return;
   }
-  nick = newsplit(&par);
+  nick = newsplit(&par, ' ');
 
   for (chan = chanset; chan; chan = chan->next) {
     m = ismember(chan, nick);
diff -Bur eggdrop1.7/src/mod/irc.mod/irc.c eggdev/src/mod/irc.mod/irc.c
--- eggdrop1.7/src/mod/irc.mod/irc.c	Thu Oct 11 12:24:02 2001
+++ eggdev/src/mod/irc.mod/irc.c	Thu Oct 11 19:02:19 2001
@@ -227,7 +227,7 @@
   if (chan->revenge_mode > 2) {
     char s[UHOSTLEN], s1[UHOSTLEN];
 
-    splitnick(&whobad);
+    newsplit(&whobad, '!');
     maskhost(whobad, s1);
     simple_sprintf(s, "(%s) %s", ct, reason);
     u_addban(chan, s1, origbotname, s, now + (60 * ban_time), 0);
@@ -265,11 +265,11 @@
 
   /* Get info about offender */
   u = get_user_by_host(whobad);
-  badnick = splitnick(&whobad);
+  badnick = newsplit(&whobad, '!');
 
   /* Get info about victim */
   u2 = get_user_by_host(whovictim);
-  victim = splitnick(&whovictim);
+  victim = newsplit(&whovictim, '!');
   mevictim = match_my_nick(victim);
 
   /* Do we want to revenge? */
@@ -714,7 +714,7 @@
   struct userrec *u;
 
   text = msg;
-  cmd = newsplit(&text);
+  cmd = newsplit(&text, ' ');
   simple_sprintf(host, "%s!%s", nick, from);
   u = get_user_by_host(host);
   get_user_flagrec(u, &fr, chname);
diff -Bur eggdrop1.7/src/mod/irc.mod/mode.c eggdev/src/mod/irc.mod/mode.c
--- eggdrop1.7/src/mod/irc.mod/mode.c	Thu Oct 11 12:24:02 2001
+++ eggdev/src/mod/irc.mod/mode.c	Thu Oct 11 19:02:35 2001
@@ -869,8 +869,8 @@
   msg = buf;
   /* Usermode changes? */
   if (msg[0] && (strchr(CHANMETA, msg[0]) != NULL)) {
-    ch = newsplit(&msg);
-    chg = newsplit(&msg);
+    ch = newsplit(&msg, ' ');
+    chg = newsplit(&msg, ' ');
     reversing = 0;
     chan = findchan(ch);
     if (!chan) {
@@ -884,7 +884,7 @@
 	     ch, chg, msg, from);
       u = get_user_by_host(from);
       get_user_flagrec(u, &user, ch);
-      nick = splitnick(&from);
+      nick = newsplit(&from, '!');
       m = ismember(chan, nick);
       if (m)
 	m->last = now;
@@ -985,7 +985,7 @@
 	    }
 	    chan->channel.maxmembers = 0;
 	  } else {
-	    op = newsplit(&msg);
+	    op = newsplit(&msg, ' ');
 	    fixcolon(op);
 	    if (op == '\0')
 	      break;
@@ -1013,7 +1013,7 @@
 	    chan->channel.mode |= CHANKEY;
 	  else
             chan->channel.mode &= ~CHANKEY;
-          op = newsplit(&msg);
+          op = newsplit(&msg, ' ');
 	  fixcolon(op);
 	  if (op == '\0') {
 	    break;
@@ -1035,7 +1035,7 @@
 	  }
 	  break;
 	case 'o':
-	  op = newsplit(&msg);
+	  op = newsplit(&msg, ' ');
 	  fixcolon(op);
 	  if (ms2[0] == '+')
 	    got_op(chan, nick, from, op, u, &user);
@@ -1043,7 +1043,7 @@
 	    got_deop(chan, nick, from, op, u);
 	  break;
 	case 'v':
-	  op = newsplit(&msg);
+	  op = newsplit(&msg, ' ');
 	  fixcolon(op);
 	  m = ismember(chan, op);
 	  if (!m) {
@@ -1087,7 +1087,7 @@
 	  }
 	  break;
 	case 'b':
-	  op = newsplit(&msg);
+	  op = newsplit(&msg, ' ');
 	  fixcolon(op);
 	  check_tcl_mode(nick, from, u, chan->dname, ms2, op);
 	  if (ms2[0] == '+')
@@ -1096,7 +1096,7 @@
 	    got_unban(chan, nick, from, op, u);
 	  break;
 	case 'e':
-	  op = newsplit(&msg);
+	  op = newsplit(&msg, ' ');
 	  fixcolon(op);
 	  check_tcl_mode(nick, from, u, chan->dname, ms2, op);
 	  if (ms2[0] == '+')
@@ -1105,7 +1105,7 @@
 	    got_unexempt(chan, nick, from, op, u);
 	  break;
 	case 'I':
-	  op = newsplit(&msg);
+	  op = newsplit(&msg, ' ');
 	  fixcolon(op);
 	  check_tcl_mode(nick, from, u, chan->dname, ms2, op);
 	  if (ms2[0] == '+')
diff -Bur eggdrop1.7/src/mod/irc.mod/msgcmds.c eggdev/src/mod/irc.mod/msgcmds.c
--- eggdrop1.7/src/mod/irc.mod/msgcmds.c	Thu Oct 11 12:24:02 2001
+++ eggdev/src/mod/irc.mod/msgcmds.c	Thu Oct 11 18:10:17 2001
@@ -140,7 +140,7 @@
     putlog(LOG_CMDS, "*", "(%s!%s) !%s! PASS?", nick, host, u->handle);
     return 1;
   }
-  old = newsplit(&par);
+  old = newsplit(&par, ' ');
   if (!u_pass_match(u, "-") && !par[0]) {
     dprintf(DP_HELP, "NOTICE %s :%s\n", nick, _("You already have a password set."));
     return 1;
@@ -150,7 +150,7 @@
       dprintf(DP_HELP, "NOTICE %s :%s\n", nick, _("Incorrect password."));
       return 1;
     }
-    new = newsplit(&par);
+    new = newsplit(&par, ' ');
   } else {
     new = old;
   }
@@ -182,7 +182,7 @@
       dprintf(DP_HELP, "NOTICE %s :%s\n", nick, _("Youre at a common site; you cant IDENT."));
     return 1;
   }
-  pass = newsplit(&par);
+  pass = newsplit(&par, ' ');
   if (!par[0])
     strcpy(who, nick);
   else {
@@ -254,7 +254,7 @@
       dprintf(DP_HELP, "NOTICE %s :%s\n", nick, _("Youre at a common site; you cant IDENT."));
     return 1;
   }
-  pass = newsplit(&par);
+  pass = newsplit(&par, ' ');
   if (!par[0]) {
     if (!quiet_reject)
       dprintf(DP_HELP, "NOTICE %s :You must supply a hostmask\n", nick);
@@ -294,7 +294,7 @@
   if (u->flags & (USER_COMMON | USER_BOT))
     return 1;
   if (!u_pass_match(u, "-")) {
-    pass = newsplit(&par);
+    pass = newsplit(&par, ' ');
     if (!u_pass_match(u, pass)) {
       putlog(LOG_CMDS, "*", "(%s!%s) !%s! failed INFO", nick, host, u->handle);
       return 1;
@@ -306,7 +306,7 @@
     return 1;
   }
   if (par[0] && (strchr(CHANMETA, par[0]) != NULL)) {
-    if (!findchan_by_dname(chname = newsplit(&par))) {
+    if (!findchan_by_dname(chname = newsplit(&par, ' '))) {
       dprintf(DP_HELP, "NOTICE %s :%s\n", nick, _("I dont monitor that channel."));
       return 1;
     }
@@ -584,7 +584,7 @@
 
   if (match_my_nick(nick))
     return 1;
-  pass = newsplit(&par);
+  pass = newsplit(&par, ' ');
   if (u_pass_match(u, pass)) {
     /* Prevent people from gaining ops when no password set */
     if (!u_pass_match(u, "-")) {
@@ -622,7 +622,7 @@
 
   if (match_my_nick(nick))
     return 1;
-  pass = newsplit(&par);
+  pass = newsplit(&par, ' ');
   if (u_pass_match(u, pass)) {
     /* Prevent people from getting key with no pass set */
     if (!u_pass_match(u, "-")) {
@@ -674,7 +674,7 @@
 
   if (match_my_nick(nick))
     return 1;
-  pass = newsplit(&par);
+  pass = newsplit(&par, ' ');
   if (u_pass_match(u, pass)) {
     if (!u_pass_match(u, "-")) {
       if (par[0]) {
@@ -715,7 +715,7 @@
 
   if (match_my_nick(nick))
     return 1;
-  pass = newsplit(&par);
+  pass = newsplit(&par, ' ');
   if (u_pass_match(u, pass) && !u_pass_match(u, "-")) {
     if (par[0] == '*') {
       for (chan = chanset; chan; chan = chan->next) {
@@ -775,7 +775,7 @@
   if (match_my_nick(nick))
     return 1;
   if (!u_pass_match(u, "-")) {
-    pass = newsplit(&par);
+    pass = newsplit(&par, ' ');
     if (!u_pass_match(u, pass)) {
       putlog(LOG_CMDS, "*", "(%s!%s) !%s! failed STATUS", nick, host,
 	     u->handle);
@@ -838,7 +838,7 @@
   if (match_my_nick(nick))
     return 1;
   if (!u_pass_match(u, "-")) {
-    pass = newsplit(&par);
+    pass = newsplit(&par, ' ');
     if (!u_pass_match(u, pass)) {
       putlog(LOG_CMDS, "*", "(%s!%s) !%s! failed DIE", nick, host, u->handle);
       return 1;
@@ -908,7 +908,7 @@
   if (match_my_nick(nick))
     return 1;
   if (!u_pass_match(u, "-")) {
-    pass = newsplit(&par);
+    pass = newsplit(&par, ' ');
     if (!u_pass_match(u, pass)) {
       putlog(LOG_CMDS, "*", "(%s!%s) !%s! failed RESET", nick, host,
 	     u->handle);
@@ -951,11 +951,11 @@
       dprintf(DP_HELP, "NOTICE %s :%s\n", nick, _("You dont have a password set."));
     return 1;
   }
-  s = newsplit(&par);		/* Password */
+  s = newsplit(&par, ' ');		/* Password */
   if (u_pass_match(u, s)) {
     if (par[0]) {
-      s = newsplit(&par);
-      port = atoi(newsplit(&par));
+      s = newsplit(&par, ' ');
+      port = atoi(newsplit(&par, ' '));
       if (!port)
 	port = default_port;
       putlog(LOG_CMDS, "*", "(%s!%s) !%s! JUMP %s %d %s", nick, host,
diff -Bur eggdrop1.7/src/mod/module.h eggdev/src/mod/module.h
--- eggdrop1.7/src/mod/module.h	Thu Oct 11 12:24:02 2001
+++ eggdev/src/mod/module.h	Thu Oct 11 22:20:00 2001
@@ -253,9 +253,9 @@
 #define daysdur ((void (*)(time_t,time_t,char *))global[135])
 /* 136 - 139 */
 #define ismember ((memberlist * (*) (struct chanset_t *, char *))global[136])
-#define newsplit ((char *(*)(char **))global[137])
-#define splitnick ((char *(*)(char **))global[138])
-#define splitc ((void (*)(char *,char *,char))global[139])
+#define newsplit ((char *(*)(char **,char))global[137])
+/* 138: splitnick -- UNUSED (Ian) */
+/* 139: splitc -- UNUSED (Ian) */
 /* 140 - 143 */
 #define addignore ((void (*) (char *, char *, char *,time_t))global[140])
 #define match_ignore ((int (*)(char *))global[141])
Only in eggdev/src/mod/notes.mod: Makefile.in
diff -Bur eggdrop1.7/src/mod/notes.mod/cmdsnote.c eggdev/src/mod/notes.mod/cmdsnote.c
--- eggdrop1.7/src/mod/notes.mod/cmdsnote.c	Wed Oct 10 04:44:07 2001
+++ eggdev/src/mod/notes.mod/cmdsnote.c	Thu Oct 11 22:05:46 2001
@@ -35,8 +35,8 @@
 
   p = buf = malloc(strlen(par) + 1);
   strcpy(p, par);
-  handle = newsplit(&p);
-  mask = newsplit(&p);
+  handle = newsplit(&p, ' ');
+  mask = newsplit(&p, ' ');
   if (mask[0]) {
     u2 = get_user_by_handle(userlist, handle);
     if (u != u2) {
@@ -76,8 +76,8 @@
   putlog(LOG_CMDS, "*", "#%s# -noteign %s", dcc[idx].nick, par);
   p = buf = malloc(strlen(par) + 1);
   strcpy(p, par);
-  handle = newsplit(&p);
-  mask = newsplit(&p);
+  handle = newsplit(&p, ' ');
+  mask = newsplit(&p, ' ');
   if (mask[0]) {
     u2 = get_user_by_handle(userlist, handle);
     if (u != u2) {
@@ -153,7 +153,7 @@
     dprintf(idx, "%s: fwd <handle> [user at bot]\n", _("Usage"));
     return;
   }
-  handle = newsplit(&par);
+  handle = newsplit(&par, ' ');
   u1 = get_user_by_handle(userlist, handle);
   if (!u1) {
     dprintf(idx, "%s\n", _("No such user."));
@@ -191,7 +191,7 @@
     dprintf(idx, "       ex: notes erase 2-4;8;16-\n");
     return;
   }
-  fcn = newsplit(&par);
+  fcn = newsplit(&par, ' ');
   if (!egg_strcasecmp(fcn, "index"))
     notes_read(dcc[idx].nick, "", "+", idx);
   else if (!egg_strcasecmp(fcn, "read")) {
@@ -213,10 +213,10 @@
 
 static void cmd_note(struct userrec *u, int idx, char *par)
 {
-  char handle[512], *p;
+  char *handle, *p;
   int echo;
 
-  p = newsplit(&par);
+  p = newsplit(&par, ' ');
   if (!par[0]) {
     dprintf(idx, "%s: note <to-whom> <message>\n", _("Usage"));
     return;
@@ -225,13 +225,11 @@
     par++;			/* These are now illegal *starting* notes
 				 * characters */
   echo = (dcc[idx].status & STAT_ECHO);
-  splitc(handle, p, ',');
+  handle = newsplit(&p, ',');
   while (handle[0]) {
-    rmspace(handle);
     add_note(handle, dcc[idx].nick, par, idx, echo);
-    splitc(handle, p, ',');
+    handle = newsplit(&p, ',');
   }
-  rmspace(p);
   add_note(p, dcc[idx].nick, par, idx, echo);
 }
 
diff -Bur eggdrop1.7/src/mod/notes.mod/notes.c eggdev/src/mod/notes.mod/notes.c
--- eggdrop1.7/src/mod/notes.mod/notes.c	Thu Oct 11 07:01:36 2001
+++ eggdev/src/mod/notes.mod/notes.c	Thu Oct 11 22:14:54 2001
@@ -96,7 +96,7 @@
       rmspace(s);
       if ((s[0]) && (s[0] != '#') && (s[0] != ';')) {	/* Not comment */
 	s1 = s;
-	to = newsplit(&s1);
+	to = newsplit(&s1, ' ');
 	if (!egg_strcasecmp(to, user))
 	  tot++;
       }
@@ -136,7 +136,7 @@
       rmspace(s);
       if ((s[0]) && (s[0] != '#') && (s[0] != ';')) {	/* Not comment */
 	s1 = s;
-	to = newsplit(&s1);
+	to = newsplit(&s1, ' ');
 	if (!egg_strcasecmp(to, oldnick)) {
 	  tot++;
 	  fprintf(g, "%s %s\n", newnick, s1);
@@ -183,9 +183,9 @@
       rmspace(s);
       if ((s[0]) && (s[0] != '#') && (s[0] != ';')) {	/* Not comment */
 	s1 = s;
-	to = newsplit(&s1);
-	from = newsplit(&s1);
-	ts = newsplit(&s1);
+	to = newsplit(&s1, ' ');
+	from = newsplit(&s1, ' ');
+	ts = newsplit(&s1, ' ');
 	lapse = (now - (time_t) atoi(ts)) / 86400;
 	if (lapse > note_life)
 	  tot++;
@@ -220,7 +220,7 @@
   idx = findanyidx(atoi(argv[4]));
   ur = get_user_by_handle(userlist, argv[2]);
   if (ur && allow_fwd && (f1 = get_user(&USERENTRY_FWD, ur))) {
-    char fwd[161], fwd2[161], *f2, *p, *q, *r;
+    char fwd[161], *f2, *p, *q, *r;
     int ok = 1;
     /* User is valid & has a valid forwarding address */
      strcpy(fwd, f1);		/* Only 40 bytes are stored in the userfile */
@@ -230,16 +230,17 @@
       if (!egg_strcasecmp(fwd, argv[2]))
 	/* They're forwarding to themselves on the same bot, llama's */
 	ok = 0;
-      strcpy(fwd2, fwd);
-      splitc(fwd2, fwd2, '@');
+
+      /* splitc(fwd2, fwd2, '@');  <-- do we really need this here? It's already
+      /* split by the strchr and *p=0 a few lines up... -- Ian */
+
       /* Get the user record of the user that we're forwarding to locally */
-      ur2 = get_user_by_handle(userlist, fwd2);
+      ur2 = get_user_by_handle(userlist, fwd);
       if (!ur2)
 	ok = 0;
       if ((f2 = get_user(&USERENTRY_FWD, ur2))) {
-	strcpy(fwd2, f2);
-	splitc(fwd2, fwd2, '@');
-	if (!egg_strcasecmp(fwd2, argv[2]))
+	p = newsplit(&f2,'@');
+	if (!egg_strcasecmp(p, argv[2]))
 	/* They're forwarding to someone who forwards back to them! */
 	ok = 0;
       }
@@ -307,7 +308,7 @@
 
 	chmod(notefile, userfile_perm);	/* Use userfile permissions. */
 	while ((argv[3][0] == '<') || (argv[3][0] == '>')) {
-	  p = newsplit(&(argv[3]));
+	  p = newsplit(&(argv[3]), ' ');
 	  if (*p == '<')
 	    l += simple_sprintf(work + l, "via %s, ", p + 1);
 	  else if (argv[1][0] == '@')
@@ -412,7 +413,7 @@
       rmspace(s);
       if ((s[0]) && (s[0] != '#') && (s[0] != ';')) {	/* Not comment */
 	s1 = s;
-	to = newsplit(&s1);
+	to = newsplit(&s1, ' ');
 	if (!egg_strcasecmp(to, argv[1])) {
 	  read++;
 	  if (!notes_in(nl, read)) {
@@ -501,12 +502,12 @@
       rmspace(s);
       if ((s[0]) && (s[0] != '#') && (s[0] != ';')) {	/* Not comment */
 	s1 = s;
-	to = newsplit(&s1);
+	to = newsplit(&s1, ' ');
 	if (!egg_strcasecmp(to, hand)) {
 	  int lapse;
 
-	  from = newsplit(&s1);
-	  dt = newsplit(&s1);
+	  from = newsplit(&s1, ' ');
+	  dt = newsplit(&s1, ' ');
 	  tt = atoi(dt);
 	  egg_strftime(wt, 14, "%b %d %H:%M", localtime(&tt));
 	  dt = wt;
@@ -617,7 +618,7 @@
       rmspace(s);
       if ((s[0]) && (s[0] != '#') && (s[0] != ';')) {	/* Not comment */
 	s1 = s;
-	to = newsplit(&s1);
+	to = newsplit(&s1, ' ');
 	if (!egg_strcasecmp(to, hand)) {
 	  if (!notes_in(dl, in))
 	    fprintf(g, "%s %s\n", to, s1);
@@ -699,13 +700,13 @@
       rmspace(s);
       if ((s[0]) && (s[0] != '#') && (s[0] != ';')) {	/* Not comment */
 	s1 = s;
-	to = newsplit(&s1);
+	to = newsplit(&s1, ' ');
 	if (!egg_strcasecmp(to, argv[1])) {
 	  read++;
 	  if (notes_in(nl, read)) {
 	    count++;
-	    from = newsplit(&s1);
-	    dt = newsplit(&s1);
+	    from = newsplit(&s1, ' ');
+	    dt = newsplit(&s1, ' ');
 	    list[0] = from;
 	    list[1] = dt;
 	    list[2] = s1;
@@ -745,11 +746,11 @@
   }
   if (!u_pass_match(u, "-")) {
     /* they have a password set */
-    pwd = newsplit(&par);
+    pwd = newsplit(&par, ' ');
     if (!u_pass_match(u, pwd))
       return 0;
   }
-  fcn = newsplit(&par);
+  fcn = newsplit(&par, ' ');
   if (!egg_strcasecmp(fcn, "INDEX"))
     notes_read(u->handle, nick, "+", -1);
   else if (!egg_strcasecmp(fcn, "READ")) {
@@ -768,7 +769,7 @@
     FILE *f;
     struct userrec *u2;
 
-    to = newsplit(&par);
+    to = newsplit(&par, ' ');
     if (!par[0]) {
       dprintf(DP_HELP, "NOTICE %s :%s: NOTES [pass] TO <hand> <message>\n",
 	      nick, _("Usage"));
Only in eggdev/src/mod/server.mod: Makefile.in
diff -Bur eggdrop1.7/src/mod/server.mod/cmdsserv.c eggdev/src/mod/server.mod/cmdsserv.c
--- eggdrop1.7/src/mod/server.mod/cmdsserv.c	Fri Aug 10 17:51:21 2001
+++ eggdev/src/mod/server.mod/cmdsserv.c	Thu Oct 11 18:11:53 2001
@@ -67,8 +67,8 @@
   int port;
 
   if (par[0]) {
-    other = newsplit(&par);
-    port = atoi(newsplit(&par));
+    other = newsplit(&par, ' ');
+    port = atoi(newsplit(&par, ' '));
     if (!port)
       port = default_port;
     putlog(LOG_CMDS, "*", "#%s# jump %s %d %s", dcc[idx].nick, other,
diff -Bur eggdrop1.7/src/mod/server.mod/server.c eggdev/src/mod/server.mod/server.c
--- eggdrop1.7/src/mod/server.mod/server.c	Thu Oct 11 12:24:03 2001
+++ eggdev/src/mod/server.mod/server.c	Thu Oct 11 18:13:57 2001
@@ -249,7 +249,7 @@
     return 0;
   if (msg[strlen(msg) - 1] == '\n')
     msg[strlen(msg) - 1] = '\0';
-  cmd = newsplit(&msg);
+  cmd = newsplit(&msg, ' ');
   if (msg)
     i = strlen(msg);
   else
@@ -261,8 +261,8 @@
   }
   penalty = (1 + i / 100);
   if (!egg_strcasecmp(cmd, "KICK")) {
-    par1 = newsplit(&msg); /* channel */
-    par2 = newsplit(&msg); /* victim(s) */
+    par1 = newsplit(&msg, ' '); /* channel */
+    par2 = newsplit(&msg, ' '); /* victim(s) */
     par3 = splitnicks(&par2);
     penalty++;
     while (strlen(par3) > 0) {
@@ -277,8 +277,8 @@
     }
   } else if (!egg_strcasecmp(cmd, "MODE")) {
     i = 0;
-    par1 = newsplit(&msg); /* channel */
-    par2 = newsplit(&msg); /* mode(s) */
+    par1 = newsplit(&msg, ' '); /* channel */
+    par2 = newsplit(&msg, ' '); /* mode(s) */
     if (!strlen(par2))
       i++;
     while (strlen(par2) > 0) {
@@ -289,7 +289,7 @@
       par2++;
     }
     while (strlen(msg) > 0) {
-      newsplit(&msg);
+      newsplit(&msg, ' ');
       i += 2;
     }
     ii = 0;
@@ -300,8 +300,8 @@
     penalty += (ii * i);
   } else if (!egg_strcasecmp(cmd, "TOPIC")) {
     penalty++;
-    par1 = newsplit(&msg); /* channel */
-    par2 = newsplit(&msg); /* topic */
+    par1 = newsplit(&msg, ' '); /* channel */
+    par2 = newsplit(&msg, ' '); /* topic */
     if (strlen(par2) > 0) {  /* topic manipulation => 2 penalty points */
       penalty += 2;
       par3 = splitnicks(&par1);
@@ -312,14 +312,14 @@
     }
   } else if (!egg_strcasecmp(cmd, "PRIVMSG") ||
 	     !egg_strcasecmp(cmd, "NOTICE")) {
-    par1 = newsplit(&msg); /* channel(s)/nick(s) */
+    par1 = newsplit(&msg, ' '); /* channel(s)/nick(s) */
     /* Add one sec penalty for each recipient */
     while (strlen(par1) > 0) {
       splitnicks(&par1);
       penalty++;
     }
   } else if (!egg_strcasecmp(cmd, "WHO")) {
-    par1 = newsplit(&msg); /* masks */
+    par1 = newsplit(&msg, ' '); /* masks */
     par2 = par1;
     while (strlen(par1) > 0) {
       par2 = splitnicks(&par1);
@@ -414,12 +414,12 @@
   m = h->head;
   strncpyz(msgstr, m->msg, sizeof msgstr);
   msg = msgstr;
-  cmd = newsplit(&msg);
+  cmd = newsplit(&msg, ' ');
   if (use_fastdeq > 1) {
     strncpyz(stackable, stackablecmds, sizeof stackable);
     stckbl = stackable;
     while (strlen(stckbl) > 0)
-      if (!egg_strcasecmp(newsplit(&stckbl), cmd)) {
+      if (!egg_strcasecmp(newsplit(&stckbl, ' '), cmd)) {
         found = 1;
         break;
       }
@@ -435,12 +435,12 @@
     strncpyz(stackable, stackable2cmds, sizeof stackable);
     stckbl = stackable;
     while (strlen(stckbl) > 0)
-      if (!egg_strcasecmp(newsplit(&stckbl), cmd)) {
+      if (!egg_strcasecmp(newsplit(&stckbl, ' '), cmd)) {
         stack_method = 2;
         break;
       }    
   }
-  to = newsplit(&msg);
+  to = newsplit(&msg, ' ');
   len = strlen(to);
   if (to[len - 1] == '\n')
     to[len -1] = 0;
@@ -451,8 +451,8 @@
       break;
     strncpyz(nextmsgstr, nm->msg, sizeof nextmsgstr);
     nextmsg = nextmsgstr;
-    nextcmd = newsplit(&nextmsg);
-    nextto = newsplit(&nextmsg);
+    nextcmd = newsplit(&nextmsg, ' ');
+    nextto = newsplit(&nextmsg, ' ');
     len = strlen(nextto);
     if (nextto[len - 1] == '\n')
       nextto[len - 1] = 0;
@@ -535,9 +535,9 @@
       if (buf[0] && (buf[strlen(buf)-1] == '\n'))
         buf[strlen(buf)-1] = '\0';
       msg = buf;
-      newsplit(&msg);
-      chan = newsplit(&msg);
-      nicks = newsplit(&msg);
+      newsplit(&msg, ' ');
+      chan = newsplit(&msg, ' ');
+      nicks = newsplit(&msg, ' ');
       while (strlen(nicks) > 0) {
         nick = splitnicks(&nicks);
         if (!egg_strcasecmp(nick, oldnick) &&
@@ -595,16 +595,16 @@
       if (buf[0] && (buf[strlen(buf)-1] == '\n'))
         buf[strlen(buf)-1] = '\0';
       reason = buf;
-      newsplit(&reason);
-      chan = newsplit(&reason);
-      nicks = newsplit(&reason);
+      newsplit(&reason, ' ');
+      chan = newsplit(&reason, ' ');
+      nicks = newsplit(&reason, ' ');
       while (strlen(nicks) > 0) {
         found = 0;
         nick = splitnicks(&nicks);
         strncpyz(chans, chan, sizeof chans);
         chns = chans;
         while (strlen(chns) > 0) {
-          ch = newsplit(&chns);
+          ch = newsplit(&chns, ' ');
           cs = findchan(ch);
           if (!cs)
             continue;
@@ -685,12 +685,12 @@
   msg = h->head;
   strncpyz(buf, msg->msg, sizeof buf);
   reason = buf;
-  newsplit(&reason);
-  chan = newsplit(&reason);
-  nicks = newsplit(&reason);
+  newsplit(&reason, ' ');
+  chan = newsplit(&reason, ' ');
+  nicks = newsplit(&reason, ' ');
   while (strlen(nicks) > 0) {
     egg_snprintf(newnicks, sizeof newnicks, "%s,%s", newnicks,
-		 newsplit(&nicks));
+		 newsplit(&nicks, ' '));
     nr++;
   }
   for (m = msg->next, lm = NULL; m && (nr < kick_method);) {
@@ -701,9 +701,9 @@
       if (buf2[0] && (buf2[strlen(buf2)-1] == '\n'))
         buf2[strlen(buf2)-1] = '\0';
       reason2 = buf2;
-      newsplit(&reason2);
-      chan2 = newsplit(&reason2);
-      nicks = newsplit(&reason2);
+      newsplit(&reason2, ' ');
+      chan2 = newsplit(&reason2, ' ');
+      nicks = newsplit(&reason2, ' ');
       if (!egg_strcasecmp(chan, chan2) && !egg_strcasecmp(reason, reason2)) {
         while (strlen(nicks) > 0) {
           nick = splitnicks(&nicks);
@@ -1411,10 +1411,10 @@
   struct in_addr ip4;
 
   strcpy(msg, text);
-  action = newsplit(&msg);
-  param = newsplit(&msg);
-  ip = newsplit(&msg);
-  prt = newsplit(&msg);
+  action = newsplit(&msg, ' ');
+  param = newsplit(&msg, ' ');
+  ip = newsplit(&msg, ' ');
+  prt = newsplit(&msg, ' ');
   if (egg_strcasecmp(action, "CHAT") || egg_strcasecmp(object, botname) || !u)
     return 0;
   get_user_flagrec(u, &fr, 0);
diff -Bur eggdrop1.7/src/mod/server.mod/servmsg.c eggdev/src/mod/server.mod/servmsg.c
--- eggdrop1.7/src/mod/server.mod/servmsg.c	Thu Oct 11 12:24:03 2001
+++ eggdev/src/mod/server.mod/servmsg.c	Thu Oct 11 19:04:46 2001
@@ -238,8 +238,8 @@
 	return 0;
       break;
     }
-  newsplit(&msg);
-  chname = newsplit(&msg);
+  newsplit(&msg, ' ');
+  chname = newsplit(&msg, ' ');
   chan = findchan(chname);
   if (chan)
     if (!channel_inactive(chan)) {
@@ -377,11 +377,11 @@
      (*msg == '@')))           /* Notice to a channel, not handled here */
     return 0;
   ignoring = match_ignore(from);
-  to = newsplit(&msg);
+  to = newsplit(&msg, ' ');
   fixcolon(msg);
   /* Only check if flood-ctcp is active */
   strcpy(uhost, from);
-  nick = splitnick(&uhost);
+  nick = newsplit(&uhost, '!');
   if (flud_ctcp_thr && detect_avalanche(msg)) {
     if (!ignoring) {
       putlog(LOG_MODES, "*", "Avalanche from %s - ignoring", from);
@@ -415,7 +415,7 @@
       if (ctcp_count < answer_ctcp) {
 	ctcp_count++;
 	if (ctcp[0] != ' ') {
-	  code = newsplit(&ctcp);
+	  code = newsplit(&ctcp, ' ');
 	  if ((to[0] == '$') || strchr(to, '.')) {
 	    if (!ignoring)
 	      /* Don't interpret */
@@ -430,7 +430,7 @@
 		  /* If it gets this far unhandled, it means that
 		   * the user is totally unknown.
 		   */
-		  code = newsplit(&ctcp);
+		  code = newsplit(&ctcp, ' ');
 		  if (!strcmp(code, "CHAT")) {
 		    if (!quiet_reject) {
 		      if (u)
@@ -491,7 +491,7 @@
       detect_flood(nick, uhost, from, FLOOD_PRIVMSG);
       u = get_user_by_host(from);
       if (!ignoring || trigger_on_ignore) check_tcl_msgm(nick, uhost, u, msg);
-      code = newsplit(&msg);
+      code = newsplit(&msg, ' ');
       rmspace(msg);
       if (!ignoring)
 	if (!check_tcl_msg(code, nick, uhost, u, msg))
@@ -513,10 +513,10 @@
       (*msg == '@')))           /* Notice to a channel, not handled here */
     return 0;
   ignoring = match_ignore(from);
-  to = newsplit(&msg);
+  to = newsplit(&msg, ' ');
   fixcolon(msg);
   strcpy(uhost, from);
-  nick = splitnick(&uhost);
+  nick = newsplit(&uhost, '!');
   if (flud_ctcp_thr && detect_avalanche(msg)) {
     /* Discard -- kick user if it was to the channel */
     if (!ignoring)
@@ -538,7 +538,7 @@
 	detect_flood(nick, uhost, from, FLOOD_CTCP);
       p = strchr(msg, 1);
       if (ctcp[0] != ' ') {
-	char *code = newsplit(&ctcp);
+	char *code = newsplit(&ctcp, ' ');
 
 	if ((to[0] == '$') || strchr(to, '.')) {
 	  if (!ignoring)
@@ -594,7 +594,7 @@
   fixcolon(msg);
   p = strchr(from, '!');
   if (p && (p == strrchr(from, '!'))) {
-    nick = splitnick(&from);
+    nick = newsplit(&from, '!');
     r = check_tcl_wall(nick, msg);
     if (r == 0)
       putlog(LOG_WALL, "*", "!%s(%s)! %s", nick, from, msg);
@@ -635,7 +635,7 @@
  */
 static int gotpong(char *from, char *ignore, char *msg)
 {
-  newsplit(&msg);
+  newsplit(&msg, ' ');
   fixcolon(msg);		/* Scrap server name */
   waiting_for_awake = 0;
   server_lag = now - my_atoul(msg);
@@ -657,12 +657,12 @@
       !strncmp(botname, origbotname, strlen(botname))) {
     return;
   }
-  newsplit(&msg);
+  newsplit(&msg, ' ');
   fixcolon(msg);
   alt = get_altbotnick();
-  tmp = newsplit(&msg);
+  tmp = newsplit(&msg, ' ');
   if (tmp[0] && !irccmp(botname, tmp)) {
-    while ((tmp = newsplit(&msg))[0]) { /* no, it's NOT == */
+    while ((tmp = newsplit(&msg, ' '))[0]) { /* no, it's NOT == */
       if (!irccmp(tmp, origbotname))
         ison_orig = 1;
       else if (alt[0] && !irccmp(tmp, alt))
@@ -685,8 +685,8 @@
 {
   char *erroneus;
 
-  newsplit(&msg);
-  erroneus = newsplit(&msg);
+  newsplit(&msg, ' ');
+  erroneus = newsplit(&msg, ' ');
   if (server_online)
     putlog(LOG_MISC, "*", "NICK IS INVALID: %s (keeping '%s').", erroneus,
 	   botname);
@@ -711,8 +711,8 @@
 
   if (server_online) {
     /* We are online and have a nickname, we'll keep it */
-    newsplit(&msg);
-    tmp = newsplit(&msg);
+    newsplit(&msg, ' ');
+    tmp = newsplit(&msg, ' ');
     putlog(LOG_MISC, "*", "NICK IN USE: %s (keeping '%s').", tmp, botname);
     nick_juped = 0;
     return 0;
@@ -728,8 +728,8 @@
   char *s;
   struct chanset_t *chan;
 
-  newsplit(&msg);
-  s = newsplit(&msg);
+  newsplit(&msg, ' ');
+  s = newsplit(&msg, ' ');
   if (s[0] && (strchr(CHANMETA, s[0]) != NULL)) {
     chan = findchan(s);
     if (chan) {
@@ -758,8 +758,8 @@
  */
 static int got438(char *from, char *ignore, char *msg)
 {
-  newsplit(&msg);
-  newsplit(&msg);
+  newsplit(&msg, ' ');
+  newsplit(&msg, ' ');
   fixcolon(msg);
   putlog(LOG_MISC, "*", "%s", msg);
   return 0;
@@ -801,7 +801,7 @@
   struct userrec *u;
 
   u = get_user_by_host(from);
-  nick = splitnick(&from);
+  nick = newsplit(&from, '!');
   fixcolon(msg);
   check_queues(nick, msg);
   if (match_my_nick(nick)) {
@@ -845,7 +845,7 @@
 {
   char *ch;
 
-  ch = newsplit(&msg);
+  ch = newsplit(&msg, ' ');
   /* Usermode changes? */
   if (strchr(CHANMETA, ch[0]) == NULL) {
     if (match_my_nick(ch) && check_mode_r) {
@@ -941,9 +941,9 @@
   from = "";
   if (msg[0] == ':') {
     msg++;
-    from = newsplit(&msg);
+    from = newsplit(&msg, ' ');
   }
-  code = newsplit(&msg);
+  code = newsplit(&msg, ' ');
   if (use_console_r) {
     if (!strcmp(code, "PRIVMSG") ||
 	!strcmp(code, "NOTICE")) {
@@ -1015,10 +1015,10 @@
 {
   char *n1, *n2, *u, *h;
   
-  n1 = newsplit(&msg);
-  n2 = newsplit(&msg);
-  u = newsplit(&msg);
-  h = newsplit(&msg);
+  n1 = newsplit(&msg, ' ');
+  n2 = newsplit(&msg, ' ');
+  u = newsplit(&msg, ' ');
+  h = newsplit(&msg, ' ');
   
   if (!n1 || !n2 || !u || !h)
     return 0;
Only in eggdev/src/mod/share.mod: Makefile.in
diff -Bur eggdrop1.7/src/mod/share.mod/share.c eggdev/src/mod/share.mod/share.c
--- eggdrop1.7/src/mod/share.mod/share.c	Thu Oct 11 12:24:03 2001
+++ eggdev/src/mod/share.mod/share.c	Thu Oct 11 18:18:50 2001
@@ -179,8 +179,8 @@
   int yn;
 
   if (dcc[idx].status & STAT_SHARE) {
-    host = newsplit(&par);
-    val = newsplit(&par);
+    host = newsplit(&par, ' ');
+    val = newsplit(&par, ' ');
     yn = atoi(val);
     noshare = 1;
     if (!par[0]) {		/* Global ban */
@@ -219,8 +219,8 @@
   int yn;
 
   if (dcc[idx].status & STAT_SHARE) {
-    host = newsplit(&par);
-    val = newsplit(&par);
+    host = newsplit(&par, ' ');
+    val = newsplit(&par, ' ');
     yn = atoi(val);
     noshare = 1;
     if (!par[0]) {		/* Global exempt */
@@ -258,8 +258,8 @@
   int yn;
 
   if (dcc[idx].status & STAT_SHARE) {
-    host = newsplit(&par);
-    val = newsplit(&par);
+    host = newsplit(&par, ' ');
+    val = newsplit(&par, ' ');
     yn = atoi(val);
     noshare = 1;
     if (!par[0]) {		/* Global invite */
@@ -296,7 +296,7 @@
   struct userrec *u;
 
   if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-    hand = newsplit(&par);
+    hand = newsplit(&par, ' ');
     u = get_user_by_handle(userlist, hand);
     if (u && !(u->flags & USER_UNSHARED)) {
       shareout_but(NULL, idx, "h %s %s\n", hand, par);
@@ -319,10 +319,10 @@
   module_entry *me;
 
   if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-    hand = newsplit(&par);
+    hand = newsplit(&par, ' ');
     u = get_user_by_handle(userlist, hand);
     if (u && !(u->flags & USER_UNSHARED)) {
-      atr = newsplit(&par);
+      atr = newsplit(&par, ' ');
       cst = findchan_by_dname(par);
       if (!par[0] || (cst && channel_shared(cst))) {
 	if (!(dcc[idx].status & STAT_GETTING) && (cst || !private_global))
@@ -395,7 +395,7 @@
   struct userrec *u;
 
   if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-    user = newsplit(&par);
+    user = newsplit(&par, ' ');
     if ((u = get_user_by_handle(userlist, user))) {
       chan = findchan_by_dname(par);
       fr.match = (FR_CHAN | FR_BOT);
@@ -425,7 +425,7 @@
   struct userrec *u;
 
   if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-    user = newsplit(&par);
+    user = newsplit(&par, ' ');
     if ((u = get_user_by_handle(userlist, user))) {
       chan = findchan_by_dname(par);
       fr.match = (FR_CHAN | FR_BOT);
@@ -452,9 +452,9 @@
   struct userrec *u;
 
   if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-    nick = newsplit(&par);
-    host = newsplit(&par);
-    pass = newsplit(&par);
+    nick = newsplit(&par, ' ');
+    host = newsplit(&par, ' ');
+    pass = newsplit(&par, ' ');
 
     if (!(u = get_user_by_handle(userlist, nick)) ||
 	!(u->flags & USER_UNSHARED)) {
@@ -520,7 +520,7 @@
   struct userrec *u;
 
   if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-    hand = newsplit(&par);
+    hand = newsplit(&par, ' ');
     if ((u = get_user_by_handle(userlist, hand)) &&
 	!(u->flags & USER_UNSHARED)) {
       shareout_but(NULL, idx, "+h %s %s\n", hand, par);
@@ -536,7 +536,7 @@
   struct userrec *u;
 
   if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-    hand = newsplit(&par);
+    hand = newsplit(&par, ' ');
     if (!(u = get_user_by_handle(userlist, hand)) ||
 	!(u->flags & USER_UNSHARED)) {
       if (!(dcc[idx].status & STAT_GETTING))
@@ -562,7 +562,7 @@
   struct userrec *u;
 
   if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-    hand = newsplit(&par);
+    hand = newsplit(&par, ' ');
     if ((u = get_user_by_handle(userlist, hand)) &&
 	!(u->flags & USER_UNSHARED)) {
       shareout_but(NULL, idx, "-h %s %s\n", hand, par);
@@ -582,8 +582,8 @@
   struct user_entry *e;
 
   if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-    key = newsplit(&par);
-    hand = newsplit(&par);
+    key = newsplit(&par, ' ');
+    hand = newsplit(&par, ' ');
     if (!(u = get_user_by_handle(userlist, hand)) ||
 	!(u->flags & USER_UNSHARED)) {
       if (!(uet = find_entry_type(key)))
@@ -631,10 +631,10 @@
   struct userrec *u;
 
   if ((dcc[idx].status & STAT_SHARE) && !private_user) {
-    hand = newsplit(&par);
+    hand = newsplit(&par, ' ');
     if ((u = get_user_by_handle(userlist, hand)) &&
 	!(u->flags & USER_UNSHARED) && share_greet) {
-      chan = newsplit(&par);
+      chan = newsplit(&par, ' ');
       cst = findchan_by_dname(chan);
       fr.match = (FR_CHAN | FR_BOT);
       get_user_flagrec(dcc[idx].user, &fr, chan);
@@ -711,7 +711,7 @@
   struct chanset_t *chan;
 
   if (dcc[idx].status & STAT_SHARE) {
-    chname = newsplit(&par);
+    chname = newsplit(&par, ' ');
     chan = findchan_by_dname(chname);
     fr.match = (FR_CHAN | FR_BOT);
     get_user_flagrec(dcc[idx].user, &fr, chname);
@@ -739,7 +739,7 @@
   struct chanset_t *chan;
 
   if (dcc[idx].status & STAT_SHARE) {
-    chname = newsplit(&par);
+    chname = newsplit(&par, ' ');
     chan = findchan_by_dname(chname);
     fr.match = (FR_CHAN | FR_BOT);
     get_user_flagrec(dcc[idx].user,&fr,chname);
@@ -767,7 +767,7 @@
   struct chanset_t *chan;
 
   if (dcc[idx].status & STAT_SHARE) {
-    chname = newsplit(&par);
+    chname = newsplit(&par, ' ');
     chan = findchan_by_dname(chname);
     fr.match = (FR_CHAN | FR_BOT);
     get_user_flagrec(dcc[idx].user,&fr,chname);
@@ -810,15 +810,15 @@
   if (dcc[idx].status & STAT_SHARE) {
     shareout_but(NULL, idx, "+b %s\n", par);
     noshare = 1;
-    ban = newsplit(&par);
+    ban = newsplit(&par, ' ');
     str_unescape(ban, '\\');
-    tm = newsplit(&par);
-    from = newsplit(&par);
+    tm = newsplit(&par, ' ');
+    from = newsplit(&par, ' ');
     if (strchr(from, 's'))
       flags |= MASKREC_STICKY;
     if (strchr(from, 'p'))
       flags |= MASKREC_PERM;
-    from = newsplit(&par);
+    from = newsplit(&par, ' ');
     expire_time = (time_t) atoi(tm);
     if (expire_time != 0L)
       expire_time += now;
@@ -837,9 +837,9 @@
   char *ban, *tm, *chname, *from;
 
   if (dcc[idx].status & STAT_SHARE) {
-    ban = newsplit(&par);
-    tm = newsplit(&par);
-    chname = newsplit(&par);
+    ban = newsplit(&par, ' ');
+    tm = newsplit(&par, ' ');
+    chname = newsplit(&par, ' ');
     chan = findchan_by_dname(chname);
     fr.match = (FR_CHAN | FR_BOT);
     get_user_flagrec(dcc[idx].user, &fr, chname);
@@ -851,12 +851,12 @@
     else {
       shareout_but(chan, idx, "+bc %s %s %s %s\n", ban, tm, chname, par);
       str_unescape(ban, '\\');
-      from = newsplit(&par);
+      from = newsplit(&par, ' ');
       if (strchr(from, 's'))
 	flags |= MASKREC_STICKY;
       if (strchr(from, 'p'))
 	flags |= MASKREC_PERM;
-      from = newsplit(&par);
+      from = newsplit(&par, ' ');
       putlog(LOG_CMDS, "*", "%s: ban %s on %s (%s:%s)", dcc[idx].nick,
 	     ban, chname, from, par);
       noshare = 1;
@@ -880,15 +880,15 @@
   if (dcc[idx].status & STAT_SHARE) {
     shareout_but(NULL,idx, "+e %s\n", par);
     noshare = 1;
-    exempt = newsplit(&par);
+    exempt = newsplit(&par, ' ');
     str_unescape(exempt, '\\');
-    tm = newsplit(&par);
-    from = newsplit(&par);
+    tm = newsplit(&par, ' ');
+    from = newsplit(&par, ' ');
     if (strchr(from,'s'))
       flags |= MASKREC_STICKY;
     if (strchr(from,'p'))
       flags |= MASKREC_PERM;
-    from = newsplit(&par);
+    from = newsplit(&par, ' ');
     expire_time = (time_t) atoi(tm);
     if (expire_time != 0L)
       expire_time += now;
@@ -909,9 +909,9 @@
   char *exempt, *tm, *chname, *from;
 
   if (dcc[idx].status & STAT_SHARE) {
-    exempt = newsplit(&par);
-    tm = newsplit(&par);
-    chname = newsplit(&par);
+    exempt = newsplit(&par, ' ');
+    tm = newsplit(&par, ' ');
+    chname = newsplit(&par, ' ');
     chan = findchan_by_dname(chname);
     fr.match = (FR_CHAN | FR_BOT);
     get_user_flagrec(dcc[idx].user,&fr,chname);
@@ -923,12 +923,12 @@
     else {
       shareout_but(chan,idx, "+ec %s %s %s %s\n", exempt, tm, chname, par);
       str_unescape(exempt, '\\');
-      from = newsplit(&par);
+      from = newsplit(&par, ' ');
       if (strchr(from,'s'))
 	flags |= MASKREC_STICKY;
       if (strchr(from,'p'))
 	flags |= MASKREC_PERM;
-      from = newsplit(&par);
+      from = newsplit(&par, ' ');
       putlog(LOG_CMDS, "*", "%s: exempt %s on %s (%s:%s)", dcc[idx].nick,
 	     exempt, chname, from, par);
       noshare = 1;
@@ -952,15 +952,15 @@
   if (dcc[idx].status & STAT_SHARE) {
     shareout_but(NULL,idx, "+inv %s\n", par);
     noshare = 1;
-    invite = newsplit(&par);
+    invite = newsplit(&par, ' ');
     str_unescape(invite, '\\');
-    tm = newsplit(&par);
-    from = newsplit(&par);
+    tm = newsplit(&par, ' ');
+    from = newsplit(&par, ' ');
     if (strchr(from,'s'))
       flags |= MASKREC_STICKY;
     if (strchr(from,'p'))
       flags |= MASKREC_PERM;
-    from = newsplit(&par);
+    from = newsplit(&par, ' ');
     expire_time = (time_t) atoi(tm);
     if (expire_time != 0L)
       expire_time += now;
@@ -981,9 +981,9 @@
   char *invite, *tm, *chname, *from;
 
   if (dcc[idx].status & STAT_SHARE) {
-    invite = newsplit(&par);
-    tm = newsplit(&par);
-    chname = newsplit(&par);
+    invite = newsplit(&par, ' ');
+    tm = newsplit(&par, ' ');
+    chname = newsplit(&par, ' ');
     chan = findchan_by_dname(chname);
     fr.match = (FR_CHAN | FR_BOT);
     get_user_flagrec(dcc[idx].user,&fr,chname);
@@ -995,12 +995,12 @@
     else {
       shareout_but(chan,idx, "+invc %s %s %s %s\n", invite, tm, chname, par);
       str_unescape(invite, '\\');
-      from = newsplit(&par);
+      from = newsplit(&par, ' ');
       if (strchr(from,'s'))
 	flags |= MASKREC_STICKY;
       if (strchr(from,'p'))
 	flags |= MASKREC_PERM;
-      from = newsplit(&par);
+      from = newsplit(&par, ' ');
       putlog(LOG_CMDS, "*", "%s: invite %s on %s (%s:%s)", dcc[idx].nick,
 	     invite, chname, from, par);
       noshare = 1;
@@ -1023,17 +1023,17 @@
   if (dcc[idx].status & STAT_SHARE) {
     shareout_but(NULL, idx, "+i %s\n", par);
     noshare = 1;
-    ign = newsplit(&par);
+    ign = newsplit(&par, ' ');
     str_unescape(ign, '\\');
-    ts = newsplit(&par);
+    ts = newsplit(&par, ' ');
     if (!atoi(ts))
       expire_time = 0L;
     else
       expire_time = now + atoi(ts);
-    from = newsplit(&par);
+    from = newsplit(&par, ' ');
     if (strchr(from, 'p'))
       expire_time = 0;
-    from = newsplit(&par);
+    from = newsplit(&par, ' ');
     if (strlen(from) > HANDLEN + 1)
       from[HANDLEN + 1] = 0;
     par[65] = 0;
@@ -1125,8 +1125,8 @@
     putlog(LOG_MISC, "*", "CAN'T WRITE USERFILE DOWNLOAD FILE!");
     zapfbot(idx);
   } else {
-    ip = newsplit(&par);
-    port = newsplit(&par);
+    ip = newsplit(&par, ' ');
+    port = newsplit(&par, ' ');
     sock = getsock(SOCK_BINARY);	/* Don't buffer this -> mark binary. */
     if (sock < 0 || open_telnet_dcc(sock, ip, port) < 0) {
       killsock(sock);
@@ -1301,7 +1301,7 @@
   char *code;
   int f, i;
 
-  code = newsplit(&msg);
+  code = newsplit(&msg, ' ');
   for (f = 0, i = 0; C_share[i].name && !f; i++) {
     int y = egg_strcasecmp(code, C_share[i].name);
 
Only in eggdev/src/mod/transfer.mod: Makefile.in
diff -Bur eggdrop1.7/src/mod/transfer.mod/transfer.c eggdev/src/mod/transfer.mod/transfer.c
--- eggdrop1.7/src/mod/transfer.mod/transfer.c	Thu Oct 11 12:24:03 2001
+++ eggdev/src/mod/transfer.mod/transfer.c	Thu Oct 11 18:19:33 2001
@@ -1507,16 +1507,16 @@
 
   fs = calloc(1, sizeof(struct filesys_stats));
   par = e->u.list->extra;
-  arg = newsplit(&par);
+  arg = newsplit(&par, ' ');
   if (arg[0])
     fs->uploads = atoi(arg);
-  arg = newsplit(&par);
+  arg = newsplit(&par, ' ');
   if (arg[0])
     fs->upload_ks = atoi(arg);
-  arg = newsplit(&par);
+  arg = newsplit(&par, ' ');
   if (arg[0])
     fs->dnloads = atoi(arg);
-  arg = newsplit(&par);
+  arg = newsplit(&par, ' ');
   if (arg[0])
     fs->dnload_ks = atoi(arg);
 
@@ -1672,16 +1672,16 @@
   default:
     if (!(fs = e->u.extra))
       fs = calloc(1, sizeof(struct filesys_stats));
-    p = newsplit (&par);
+    p = newsplit (&par, ' ');
     if (p[0])
       fs->uploads = atoi (p);
-    p = newsplit (&par);
+    p = newsplit (&par, ' ');
     if (p[0])
       fs->upload_ks = atoi (p);
-    p = newsplit (&par);
+    p = newsplit (&par, ' ');
     if (p[0])
       fs->dnloads = atoi (p);
-    p = newsplit (&par);
+    p = newsplit (&par, ' ');
     if (p[0])
       fs->dnload_ks = atoi (p);
     set_user(&USERENTRY_FSTAT, u, fs);
@@ -1787,12 +1787,12 @@
   unsigned long offset;
 
   strcpy(msg, text);
-  action = newsplit(&msg);
+  action = newsplit(&msg, ' ');
   if (egg_strcasecmp(action, "RESUME"))
     return 0;
-  fn = newsplit(&msg);
-  port = atoi(newsplit(&msg));
-  offset = my_atoul(newsplit(&msg));
+  fn = newsplit(&msg, ' ');
+  port = atoi(newsplit(&msg, ' '));
+  offset = my_atoul(newsplit(&msg, ' '));
   /* Search for existing SEND */
   for (i = 0; i < dcc_total; i++)
     if ((dcc[i].type == &DCC_GET_PENDING) &&
Only in eggdev/src/mod/uptime.mod: Makefile.in
diff -Bur eggdrop1.7/src/mod/uptime.mod/uptime.c eggdev/src/mod/uptime.mod/uptime.c
--- eggdrop1.7/src/mod/uptime.mod/uptime.c	Wed Oct 10 12:47:42 2001
+++ eggdev/src/mod/uptime.mod/uptime.c	Thu Oct 11 22:17:49 2001
@@ -99,7 +99,7 @@
 int init_uptime(void)
 {
 	struct  sockaddr_in sai;
-	char temp[50]="";
+	char temp[50]="", *a=temp;
 	upPack.regnr = 0;
 	upPack.pid = htonl(getpid());
 	upPack.type = htonl(UPTIME_EGGDROP);
@@ -110,10 +110,9 @@
 	uptimelast = 0;
 	uptimeip = -1;
 
-
 	strcpy(temp,ver);
-	splitc(uptime_version,temp,' ');
-	strcpy(uptime_version,temp);
+	newsplit(&a, ' ');
+	strcpy(uptime_version, a);
 
 	if ((uptimesock = socket(AF_INET,SOCK_DGRAM,0)) < 0) {
 		putlog(LOG_DEBUG, "*", "init_uptime socket returned <0 %d",uptimesock);
Only in eggdev/src/mod/woobie.mod: Makefile.in
diff -Bur eggdrop1.7/src/modules.c eggdev/src/modules.c
--- eggdrop1.7/src/modules.c	Thu Oct 11 12:24:01 2001
+++ eggdev/src/modules.c	Thu Oct 11 22:20:16 2001
@@ -328,8 +328,8 @@
   /* 136 - 139 */
   (Function) ismember,
   (Function) newsplit,
-  (Function) splitnick,
-  (Function) splitc,
+  (Function) 0,
+  (Function) 0,
   /* 140 - 143 */
   (Function) addignore,
   (Function) match_ignore,
diff -Bur eggdrop1.7/src/net.c eggdev/src/net.c
--- eggdrop1.7/src/net.c	Thu Oct 11 20:27:45 2001
+++ eggdev/src/net.c	Thu Oct 11 07:01:35 2001
@@ -2,7 +2,7 @@
  * net.c -- handles:
  *   all raw network i/o
  * 
- * $Id: net.c,v 1.44 2001/10/12 02:27:45 stdarg Exp $
+ * $Id: net.c,v 1.43 2001/10/11 13:01:35 tothwolf Exp $
  */
 /* 
  * This is hereby released into the public domain.
@@ -88,7 +88,6 @@
   char s[256];
   struct hostent *hp;
 
-  socklist = (sock_list *)calloc(MAXSOCKS, sizeof(sock_list));
   for (i = 0; i < MAXSOCKS; i++) {
     socklist[i].flags = SOCK_UNUSED;
   }
@@ -252,20 +251,17 @@
   int i;
 
   for (i = 0; i < MAXSOCKS; i++) {
-    if (socklist[i].flags & SOCK_UNUSED) break;
-  }
-
-  if (i == MAXSOCKS) {
-    /* Expand table by 5 */
-    socklist = (sock_list *)realloc(socklist, (MAXSOCKS+5) * sizeof(sock_list));
-    memset(socklist+MAXSOCKS, 0, 5 * sizeof(sock_list));
-    MAXSOCKS += 5;
+    if (socklist[i].flags & SOCK_UNUSED) {
+      /* yay!  there is table space */
+      socklist[i].inbuf = socklist[i].outbuf = NULL;
+      socklist[i].inbuflen = socklist[i].outbuflen = 0;
+      socklist[i].flags = options;
+      socklist[i].sock = sock;
+      return i;
+    }
   }
-
-  memset(socklist+i, 0, sizeof(sock_list));
-  socklist[i].flags = options;
-  socklist[i].sock = sock;
-  return(i);
+  fatal("Socket table is full!", 0);
+  return -1; /* Never reached */
 }
 
 /* Request a normal socket for i/o
diff -Bur eggdrop1.7/src/proto.h eggdev/src/proto.h
--- eggdrop1.7/src/proto.h	Thu Oct 11 12:24:01 2001
+++ eggdev/src/proto.h	Thu Oct 11 22:20:28 2001
@@ -178,10 +178,7 @@
 void check_logsize();
 void maskhost(const char *, char *);
 char *stristr(char *, char *);
-void splitc(char *, char *, char);
-void splitcn(char *, char *, char, size_t);
-char *newsplit(char **);
-char *splitnick(char **);
+char *newsplit(char **, char);
 void stridx(char *, char *, int);
 void dumplots(int, const char *, char *);
 void daysago(time_t, time_t, char *);
diff -Bur eggdrop1.7/src/tcl.c eggdev/src/tcl.c
--- eggdrop1.7/src/tcl.c	Thu Oct 11 20:27:45 2001
+++ eggdev/src/tcl.c	Thu Oct 11 19:25:46 2001
@@ -4,7 +4,7 @@
  *   Tcl initialization
  *   getting and setting Tcl/eggdrop variables
  *
- * $Id: tcl.c,v 1.44 2001/10/12 02:27:45 stdarg Exp $
+ * $Id: tcl.c,v 1.43 2001/10/10 10:44:04 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -325,11 +325,10 @@
       else if (st->str == logfile_suffix)
 	logsuffix_change(s);
       else if (st->str == firewall) {
-	splitc(firewall, s, ':');
-	if (!firewall[0])
-	  strcpy(firewall, s);
-	else
-	  firewallport = atoi(s);
+	char *s1=firewall, *s2;
+	s2 = newsplit(&s1, ':');
+        if (s1[0])
+	  firewallport = atoi(s1);
       } else
 	strcpy(st->str, s);
       if ((st->flags) && (s[0])) {
@@ -597,8 +596,9 @@
   Tcl_PkgProvide(interp, "eggdrop", pver);
 #endif
 
-  /* Initialize old binds and traces */
-  init_old_binds();
+  /* Initialize binds and traces */
+  init_bind2();
+  init_bind();
   init_traces();
 
   /* Add new commands */
diff -Bur eggdrop1.7/src/tcldcc.c eggdev/src/tcldcc.c
--- eggdrop1.7/src/tcldcc.c	Thu Oct 11 05:34:19 2001
+++ eggdev/src/tcldcc.c	Thu Oct 11 19:32:17 2001
@@ -962,15 +962,14 @@
 
 static int tcl_boot STDVAR
 {
-  char who[NOTENAMELEN + 1];
+  char *who;
   int i, ok = 0;
 
   BADARGS(2, 3, " user at bot ?reason?");
-  strncpyz(who, argv[1], sizeof who);
+  who = argv[1];
+  who[NOTENAMELEN]=0;
   if (strchr(who, '@') != NULL) {
-    char whonick[HANDLEN + 1];
-
-    splitc(whonick, who, '@');
+    char *whonick = newsplit(&who, '@');
     whonick[HANDLEN] = 0;
     if (!egg_strcasecmp(who, botnetnick))
        strncpyz(who, whonick, sizeof who);
diff -Bur eggdrop1.7/src/tclhash.c eggdev/src/tclhash.c
--- eggdrop1.7/src/tclhash.c	Thu Oct 11 20:27:45 2001
+++ eggdev/src/tclhash.c	Thu Oct 11 21:59:54 2001
@@ -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.43 2001/10/12 02:27:45 stdarg Exp $
+ * $Id: tclhash.c,v 1.42 2001/10/11 11:34:19 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -154,9 +154,11 @@
 static int tcl_bind2();
 static int tcl_unbind2();
 
-void init_binds(void)
+void init_bind2(void)
 {
 	bind_table_list_head = NULL;
+	Tcl_CreateCommand(interp, "bind2", tcl_bind2, NULL, NULL);
+	Tcl_CreateCommand(interp, "unbind2", tcl_unbind2, NULL, NULL);
 	BT_event = add_bind_table2("event", 1, "s", MATCH_MASK, BIND_STACKABLE);
 	BT_link = add_bind_table2("link", 2, "ss", MATCH_MASK, BIND_STACKABLE);
 	BT_disc = add_bind_table2("disc", 1, "s", MATCH_MASK, BIND_STACKABLE);
@@ -166,7 +168,7 @@
 	add_builtins2(BT_dcc, C_dcc);
 }
 
-void init_old_binds(void)
+void init_bind(void)
 {
   bind_table_list = NULL;
   Context;
@@ -1331,11 +1333,11 @@
   char			*name, *proc, *s, flg[100];
 
   if (par[0])
-    name = newsplit(&par);
+    name = newsplit(&par, ' ');
   else
     name = NULL;
   if (par[0])
-    s = newsplit(&par);
+    s = newsplit(&par, ' ');
   else
     s = NULL;
 
diff -Bur eggdrop1.7/src/userent.c eggdev/src/userent.c
--- eggdrop1.7/src/userent.c	Thu Oct 11 12:24:01 2001
+++ eggdev/src/userent.c	Thu Oct 11 17:55:33 2001
@@ -275,7 +275,7 @@
   struct laston_info *li;
 
   par = e->u.list->extra;
-  arg = newsplit (&par);
+  arg = newsplit(&par, ' ');
   if (!par[0])
     par = "???";
   li = malloc(sizeof(struct laston_info));
@@ -568,10 +568,10 @@
   struct bot_addr *bi;
 
   bi = calloc(1, sizeof(struct bot_addr));
-  arg = newsplit(&buf);
+  arg = newsplit(&buf, ' ');
   str_unescape(arg, '\\');
   malloc_strcpy(bi->address, arg);
-  arg = newsplit(&buf);
+  arg = newsplit(&buf, ' ');
   bi->telnet_port = atoi(arg);
   bi->relay_port = atoi(buf);
   if (!bi->telnet_port)
@@ -701,7 +701,7 @@
     t = malloc(sizeof(struct xtra_key));
 
     data = curr->extra;
-    key = newsplit(&data);
+    key = newsplit(&data, ' ');
     if (data[0]) {
       malloc_strcpy(t->key, key);
       malloc_strcpy(t->data, data);
@@ -761,7 +761,7 @@
   struct xtra_key *xk;
   int l;
 
-  arg = newsplit (&buf);
+  arg = newsplit(&buf, ' ');
   if (!arg[0])
     return 1;
 
diff -Bur eggdrop1.7/src/users.c eggdev/src/users.c
--- eggdrop1.7/src/users.c	Thu Oct 11 12:24:02 2001
+++ eggdev/src/users.c	Thu Oct 11 19:29:13 2001
@@ -643,7 +643,7 @@
 int noxtra = 0;
 int readuserfile(char *file, struct userrec **ret)
 {
-  char *p, buf[512], lasthand[512], *attr, *pass, *code, s1[512], *s;
+  char *p, buf[512], lasthand[512], *attr, *pass, *code, s1[512], *s, *s2;
   FILE *f;
   struct userrec *bu, *u = NULL;
   struct chanset_t *cst = NULL;
@@ -683,7 +683,7 @@
     fgets(s, 511, f);
     if (!feof(f)) {
       if (s[0] != '#' && s[0] != ';' && s[0]) {
-	code = newsplit(&s);
+	code = newsplit(&s, ' ');
 	rmspace(s);
 	if (!strcmp(code, "-")) {
 	  if (!lasthand[0])
@@ -691,10 +691,9 @@
 	  if (u) {		/* only break it down if there a real users */
 	    p = strchr(s, ',');
 	    while (p != NULL) {
-	      splitc(s1, s, ',');
-	      rmspace(s1);
-	      if (s1[0])
-		set_user(&USERENTRY_HOSTS, u, s1);
+	      s2 = newsplit(&s, ',');
+	      if (s2[0])
+		set_user(&USERENTRY_HOSTS, u, s2);
 	      p = strchr(s, ',');
 	    }
 	  }
@@ -741,9 +740,9 @@
 	  char *chname, *st, *fl;
 
 	  if (u) {
-	    chname = newsplit(&s);
-	    st = newsplit(&s);
-	    fl = newsplit(&s);
+	    chname = newsplit(&s, ' ');
+	    st = newsplit(&s, ' ');
+	    fl = newsplit(&s, ' ');
 	    rmspace(s);
 	    fr.match = FR_CHAN;
 	    break_down_flags(fl, &fr, 0);
@@ -892,8 +891,8 @@
 	  lasthand[0] = 0;
 	  u = NULL;
 	} else {
-	  pass = newsplit(&s);
-	  attr = newsplit(&s);
+	  pass = newsplit(&s, ' ');
+	  attr = newsplit(&s, ' ');
 	  rmspace(s);
 	  if (!attr[0] || !pass[0]) {
 	    putlog(LOG_MISC, "*", "* %s '%s'!", _("Corrupt user record"), code);


More information about the Patches mailing list