Browse Source

* Remove unnecessary egg_ prefix from some function calls

Bryan Drewery 17 năm trước cách đây
mục cha
commit
3fccf460bb
53 tập tin đã thay đổi với 506 bổ sung517 xóa
  1. 17 17
      src/adns.c
  2. 13 13
      src/binary.c
  3. 1 1
      src/binds.c
  4. 18 18
      src/botcmd.c
  5. 6 6
      src/botmsg.c
  6. 22 22
      src/botnet.c
  7. 6 6
      src/chanprog.c
  8. 88 88
      src/cmds.c
  9. 9 9
      src/compat/inet_ntop.c
  10. 1 3
      src/compat/inet_ntop.h
  11. 1 1
      src/compat/memcpy.c
  12. 1 3
      src/compat/memcpy.h
  13. 1 1
      src/compat/memset.c
  14. 3 4
      src/compat/memset.h
  15. 3 3
      src/compat/memutil.c
  16. 2 2
      src/compat/strcasecmp.c
  17. 2 6
      src/compat/strcasecmp.h
  18. 1 1
      src/compat/strftime.c
  19. 1 3
      src/compat/strftime.h
  20. 24 24
      src/conf.c
  21. 6 6
      src/core_binds.c
  22. 3 3
      src/crypt.c
  23. 2 2
      src/crypto/md32_common.h
  24. 17 17
      src/dcc.c
  25. 4 4
      src/dccutil.c
  26. 2 2
      src/debug.c
  27. 2 2
      src/enclink.c
  28. 6 6
      src/flags.c
  29. 7 7
      src/log.c
  30. 5 5
      src/main.c
  31. 2 2
      src/match.c
  32. 5 5
      src/misc.c
  33. 1 1
      src/mod/channels.mod/channels.c
  34. 11 11
      src/mod/channels.mod/cmdschan.c
  35. 5 5
      src/mod/channels.mod/tclchan.c
  36. 1 1
      src/mod/channels.mod/userchan.c
  37. 25 25
      src/mod/ctcp.mod/ctcp.c
  38. 6 6
      src/mod/irc.mod/chan.c
  39. 12 12
      src/mod/irc.mod/cmdsirc.c
  40. 3 3
      src/mod/irc.mod/irc.c
  41. 4 4
      src/mod/server.mod/cmdsserv.c
  42. 22 22
      src/mod/server.mod/server.c
  43. 26 26
      src/mod/server.mod/servmsg.c
  44. 9 9
      src/mod/share.mod/share.c
  45. 19 19
      src/mod/transfer.mod/transfer.c
  46. 3 3
      src/mod/update.mod/update.c
  47. 28 28
      src/net.c
  48. 18 18
      src/set.c
  49. 5 5
      src/shell.c
  50. 1 1
      src/socket.c
  51. 8 8
      src/userent.c
  52. 8 8
      src/userrec.c
  53. 10 10
      src/users.c

+ 17 - 17
src/adns.c

@@ -365,7 +365,7 @@ dns_query_t *find_query(const char *host)
   dns_query_t *q = NULL;
 
   for (q = query_head; q; q = q->next)
-    if (!egg_strcasecmp(q->query, host))
+    if (!strcasecmp(q->query, host))
       return q;
   return NULL;
 }
@@ -455,7 +455,7 @@ int egg_dns_lookup(const char *host, interval_t timeout, dns_callback_t callback
 
 	/* Ok, now see if it's in our host cache. */
 	for (i = 0; i < nhosts; i++) {
-		if (!egg_strcasecmp(host, hosts[i].host)) {
+		if (!strcasecmp(host, hosts[i].host)) {
 			dns_answer_t answer;
 
 			sdprintf("egg_dns_lookup(%s, %d): Found in hosts -> %s", host, timeout, hosts[i].ip);
@@ -512,7 +512,7 @@ int egg_dns_reverse(const char *ip, interval_t timeout, dns_callback_t callback,
 
 	/* Ok, see if we have it in our host cache. */
 	for (i = 0; i < nhosts; i++) {
-		if (!egg_strcasecmp(hosts[i].ip, ip)) {
+		if (!strcasecmp(hosts[i].ip, ip)) {
 			dns_answer_t answer;
 
 			sdprintf("egg_dns_reverse(%s, %d): Found in hosts -> %s", ip, timeout, hosts[i].host);
@@ -669,8 +669,8 @@ static void cache_del(int id)
 
 	ncache--;
 
-	if (id < ncache) egg_memcpy(&cache[id], &cache[ncache], sizeof(dns_cache_t));
-	else egg_bzero(&cache[id], sizeof(dns_cache_t));
+	if (id < ncache) memcpy(&cache[id], &cache[ncache], sizeof(dns_cache_t));
+	else bzero(&cache[id], sizeof(dns_cache_t));
 
 	cache = (dns_cache_t *) my_realloc(cache, (ncache+1)*sizeof(*cache));
 }
@@ -680,7 +680,7 @@ static void cache_add(const char *query, dns_answer_t *answer)
 	int i;
 
 	cache = (dns_cache_t *) my_realloc(cache, (ncache+1)*sizeof(*cache));
-	egg_bzero(&cache[ncache], sizeof(cache[ncache]));
+	bzero(&cache[ncache], sizeof(cache[ncache]));
 	cache[ncache].query = strdup(query);
 	answer_init(&cache[ncache].answer);
         for (i = 0; i < answer->len; i++)
@@ -694,7 +694,7 @@ static int cache_find(const char *query)
 	int i;
 
 	for (i = 0; i < ncache; i++)
-		if (!egg_strcasecmp(cache[i].query, query)) return (i);
+		if (!strcasecmp(cache[i].query, query)) return (i);
 
 	return (-1);
 }
@@ -717,7 +717,7 @@ static int read_thing(char *buf, char *ip)
 	skip = strspn(buf, separators);
 	buf += skip;
 	len = strcspn(buf, separators);
-	egg_memcpy(ip, buf, len);
+	memcpy(ip, buf, len);
 	ip[len] = 0;
 	return(skip + len);
 }
@@ -769,7 +769,7 @@ static int make_header(char *buf, int id)
 	_dns_header.question_count = htons(1);
 //	_dns_header.id = htons(id);
 	_dns_header.id = id;
-	egg_memcpy(buf, &_dns_header, HEAD_SIZE);
+	memcpy(buf, &_dns_header, HEAD_SIZE);
 	return(HEAD_SIZE);
 }
 
@@ -783,14 +783,14 @@ static int cut_host(const char *host, char *query)
 		len = period - host;
 		if (len > 63) return(-1);
 		*query++ = len;
-		egg_memcpy(query, host, len);
+		memcpy(query, host, len);
 		query += len;
 		host = period+1;
 	}
 	len = strlen(host);
 	if (len) {
 		*query++ = len;
-		egg_memcpy(query, host, len);
+		memcpy(query, host, len);
 		query += len;
 	}
 	*query++ = 0;
@@ -805,14 +805,14 @@ static int reverse_ip(const char *host, char *reverse)
 	period = strchr(host, '.');
 	if (!period) {
 		len = strlen(host);
-		egg_memcpy(reverse, host, len);
+		memcpy(reverse, host, len);
 		return(len);
 	}
 	else {
 		len = period - host;
 		offset = reverse_ip(host+len+1, reverse);
 		reverse[offset++] = '.';
-		egg_memcpy(reverse+offset, host, len);
+		memcpy(reverse+offset, host, len);
 		reverse[offset+len] = 0;
 		return(offset+len);
 	}
@@ -890,7 +890,7 @@ static int parse_reply(char *response, size_t nbytes, const char* server_ip)
 	unsigned char *ptr = (unsigned char *) response;
         int return_code = 0;
 
-	egg_memcpy(&header, ptr, HEAD_SIZE);
+	memcpy(&header, ptr, HEAD_SIZE);
 	ptr += HEAD_SIZE;
 
 	/* header.id is already in our order, echoed by the server */
@@ -986,7 +986,7 @@ static int parse_reply(char *response, size_t nbytes, const char* server_ip)
 		/* Read in the answer. */
 		ptr += skip_name(ptr);
 
-		egg_memcpy(&reply, ptr, RR_SIZE);
+		memcpy(&reply, ptr, RR_SIZE);
 		ptr += RR_SIZE;
 
 		reply.type = ntohs(reply.type);
@@ -1000,12 +1000,12 @@ static int parse_reply(char *response, size_t nbytes, const char* server_ip)
 
 		switch (reply.type) {
 		case DNS_A:
-			egg_inet_ntop(AF_INET, ptr, result, 512);
+			inet_ntop(AF_INET, ptr, result, 512);
 			answer_add(&q->answer, result);
 			break;
 		case DNS_AAAA:
 #ifdef USE_IPV6
-			egg_inet_ntop(AF_INET6, ptr, result, 512);
+			inet_ntop(AF_INET6, ptr, result, 512);
 			answer_add(&q->answer, result);
 #endif /* USE_IPV6 */
 			break;

+ 13 - 13
src/binary.c

@@ -269,9 +269,9 @@ bin_checksum(const char *fname, int todo)
 static int
 features_find(const char *buffer)
 {
-  if (!egg_strcasecmp(buffer, STR("no_take")))
+  if (!strcasecmp(buffer, STR("no_take")))
     return FEATURE_NO_TAKE;
-  else if (!egg_strcasecmp(buffer, STR("no_mdop")))
+  else if (!strcasecmp(buffer, STR("no_mdop")))
     return FEATURE_NO_MDOP;
   return 0;
 }
@@ -351,28 +351,28 @@ readcfg(const char *cfgfile, bool read_stdin)
       while (p && (strchr(LISTSEPERATORS, p[0])))
         *p++ = 0;
       if (p) {
-        if (!egg_strcasecmp(buffer, STR("packname"))) {
+        if (!strcasecmp(buffer, STR("packname"))) {
           strlcpy(settings.packname, trim(p), sizeof settings.packname);
-        } else if (!egg_strcasecmp(buffer, STR("shellhash"))) {
+        } else if (!strcasecmp(buffer, STR("shellhash"))) {
           if (strlen(trim(p)) != 40) {
             fprintf(stderr, STR("\nSHELLHASH should be a SHA1 hash.\n"));
             ADD_ERROR
           }
           strlcpy(settings.shellhash, trim(p), sizeof settings.shellhash);
-        } else if (!egg_strcasecmp(buffer, STR("dccprefix"))) {
+        } else if (!strcasecmp(buffer, STR("dccprefix"))) {
           strlcpy(settings.dcc_prefix, trim(p), 2);
-        } else if (!egg_strcasecmp(buffer, STR("owner"))) {
+        } else if (!strcasecmp(buffer, STR("owner"))) {
           strlcat(settings.owners, trim(p), sizeof(settings.owners));
           strlcat(settings.owners, ",", sizeof(settings.owners));
-        } else if (!egg_strcasecmp(buffer, STR("owneremail"))) {
+        } else if (!strcasecmp(buffer, STR("owneremail"))) {
           strlcat(settings.owneremail, trim(p), sizeof(settings.owneremail));
           strlcat(settings.owneremail, ",", sizeof(settings.owneremail));
-        } else if (!egg_strcasecmp(buffer, STR("hub"))) {
+        } else if (!strcasecmp(buffer, STR("hub"))) {
           strlcat(settings.hubs, trim(p), sizeof(settings.hubs));
           strlcat(settings.hubs, ",", sizeof(settings.hubs));
-        } else if (!egg_strcasecmp(buffer, STR("salt1"))) {
+        } else if (!strcasecmp(buffer, STR("salt1"))) {
           strlcat(settings.salt1, trim(p), sizeof(settings.salt1));
-        } else if (!egg_strcasecmp(buffer, STR("salt2"))) {
+        } else if (!strcasecmp(buffer, STR("salt2"))) {
           strlcat(settings.salt2, trim(p), sizeof(settings.salt2));
           if (read_stdin) break;
         }
@@ -430,7 +430,7 @@ static void edpack(settings_t *incfg, const char *in_hash, int what)
 		len = sizeof(_field) - 1;							\
 		tmp = (char *) enc_dec_string(hash, (unsigned char *) _field, &len);		\
 		if (what == PACK_ENC) 								\
-		  egg_memcpy(_field, tmp, len);							\
+		  memcpy(_field, tmp, len);							\
 		else 										\
 		  simple_snprintf(_field, sizeof(_field), "%s", tmp);				\
 		OPENSSL_cleanse(tmp, len);							\
@@ -633,8 +633,8 @@ void write_settings(const char *fname, int die, bool doconf)
 static void 
 clear_settings(void)
 {
-//  egg_memset(&settings.bots, 0, sizeof(settings_t) - SIZE_PACK - PREFIXLEN);
-  egg_memset(&settings.bots, 0, SIZE_CONF);
+//  memset(&settings.bots, 0, sizeof(settings_t) - SIZE_PACK - PREFIXLEN);
+  memset(&settings.bots, 0, SIZE_CONF);
 }
 
 void conf_to_bin(conf_t *in, bool move, int die)

+ 1 - 1
src/binds.c

@@ -388,7 +388,7 @@ static int bind_vcheck_hits (bind_table_t *table, const char *match, struct flag
 		}
 		else if (table->match_type & MATCH_PARTIAL) {
 			cmp = 1;
-			if (!egg_strncasecmp(match, entry->mask, matchlen)) {
+			if (!strncasecmp(match, entry->mask, matchlen)) {
 				winner = entry;
 				/* Is it an exact match? */
 				if (!entry->mask[matchlen]) {

+ 18 - 18
src/botcmd.c

@@ -158,7 +158,7 @@ void bot_remotecmd(int idx, char *par) {
     return;
   }
 
-  if (!egg_strcasecmp(tbot, conf.bot->nick)) {
+  if (!strcasecmp(tbot, conf.bot->nick)) {
     gotremotecmd(tbot, fbot, fhnd, fidx, par);
   } else if (!strcmp(tbot, "*")) {
     botnet_send_cmd_broad(idx, fbot, fhnd, atoi(fidx), par);
@@ -188,7 +188,7 @@ void bot_remotereply(int idx, char *par) {
     return;
   }
 
-  if (!egg_strcasecmp(tbot, conf.bot->nick)) {
+  if (!strcasecmp(tbot, conf.bot->nick)) {
     gotremotereply(fbot, fhnd, fidx, par);
   } else {
     if (nextbot(tbot)!= idx)
@@ -290,7 +290,7 @@ static void bot_priv(int idx, char *par)
   if (!to[0])
     return;			/* Silently ignore notes to '@bot' this
 				 * is legacy code */
-  if (!egg_strcasecmp(tobot, conf.bot->nick)) {		/* For me! */
+  if (!strcasecmp(tobot, conf.bot->nick)) {		/* For me! */
     if (p == from)
       add_note(to, from, par, -2, 0);
     else {
@@ -465,7 +465,7 @@ static void bot_who(int idx, char *par)
     from = TBUF;
   }
   to = newsplit(&par);
-  if (!egg_strcasecmp(to, conf.bot->nick))
+  if (!strcasecmp(to, conf.bot->nick))
     to[0] = 0;			/* (for me) */
   chan = base64_to_int(par);
   if (to[0]) {			/* Pass it on */
@@ -506,7 +506,7 @@ static void bot_link(int idx, char *par)
   from = newsplit(&par);
   bot = newsplit(&par);
 
-  if (!egg_strcasecmp(bot, conf.bot->nick)) {
+  if (!strcasecmp(bot, conf.bot->nick)) {
     if ((rfrom = strchr(from, ':')))
       rfrom++;
     else
@@ -563,7 +563,7 @@ static void bot_unlink(int idx, char *par)
   from = newsplit(&par);
   bot = newsplit(&par);
   undes = newsplit(&par);
-  if (!egg_strcasecmp(bot, conf.bot->nick)) {
+  if (!strcasecmp(bot, conf.bot->nick)) {
     if ((rfrom = strchr(from, ':')))
       rfrom++;
     else
@@ -650,7 +650,7 @@ static void bot_nlinked(int idx, char *par)
     putlog(LOG_BOTS, "*", "Invalid eggnet protocol from %s (zapfing)", dcc[idx].nick);
     simple_snprintf(s, sizeof(s), "Disconnected %s (invalid bot)", dcc[idx].nick);
     dprintf(idx, "error invalid eggnet protocol for 'nlinked'\n");
-  } else if ((in_chain(newbot)) || (!egg_strcasecmp(newbot, conf.bot->nick))) {
+  } else if ((in_chain(newbot)) || (!strcasecmp(newbot, conf.bot->nick))) {
     /* Loop! */
     putlog(LOG_BOTS, "*", "Loop detected %s (mutual: %s)", dcc[idx].nick, newbot);
     simple_snprintf(s, sizeof(s), "Detected loop: two bots exist named %s: disconnecting %s", newbot, dcc[idx].nick);
@@ -744,7 +744,7 @@ static void bot_trace(int idx, char *par)
   dest = newsplit(&par);
   simple_snprintf(TBUF, sizeof(TBUF), "%s:%s", par, conf.bot->nick);
   botnet_send_traced(idx, from, TBUF);
-  if (egg_strcasecmp(dest, conf.bot->nick) && ((i = nextbot(dest)) > 0))
+  if (strcasecmp(dest, conf.bot->nick) && ((i = nextbot(dest)) > 0))
     botnet_send_trace(i, from, dest, par);
 }
 
@@ -763,7 +763,7 @@ static void bot_traced(int idx, char *par)
     *p = 0;
     p++;
   }
-  if (!egg_strcasecmp(p, conf.bot->nick)) {
+  if (!strcasecmp(p, conf.bot->nick)) {
     time_t t = 0;
     char *p2 = par, *ss = TBUF;
 
@@ -781,7 +781,7 @@ static void bot_traced(int idx, char *par)
 	p2 = par + 1;
     }
     for (i = 0; i < dcc_total; i++) {
-      if (dcc[i].type && (dcc[i].type->flags & DCT_CHAT) && (!egg_strcasecmp(dcc[i].nick, to)) && 
+      if (dcc[i].type && (dcc[i].type->flags & DCT_CHAT) && (!strcasecmp(dcc[i].nick, to)) &&
           ((sock == (-1)) || (sock == dcc[i].sock))) {
 	if (t) {
           int j=0;
@@ -840,12 +840,12 @@ static void bot_reject(int idx, char *par)
   who = newsplit(&par);
   destbot = strchr(who, '@');
   *destbot++ = 0;
-  if (!egg_strcasecmp(destbot, conf.bot->nick)) {
+  if (!strcasecmp(destbot, conf.bot->nick)) {
     /* Kick someone here! */
     int ok = 0;
 
     for (i = 0; i < dcc_total; i++) {
-      if (dcc[i].type && dcc[i].simul == -1 && !egg_strcasecmp(who, dcc[i].nick) && (dcc[i].type->flags & DCT_CHAT)) {
+      if (dcc[i].type && dcc[i].simul == -1 && !strcasecmp(who, dcc[i].nick) && (dcc[i].type->flags & DCT_CHAT)) {
         u = get_user_by_handle(userlist, from);
         if (u) {
           if (!whois_access(u, dcc[idx].user)) {
@@ -868,7 +868,7 @@ static void bot_reject(int idx, char *par)
 
 static void bot_thisbot(int idx, char *par)
 {
-  if (egg_strcasecmp(par, dcc[idx].nick)) {
+  if (strcasecmp(par, dcc[idx].nick)) {
     char s[1024] = "";
 
     putlog(LOG_BOTS, "*", "Wrong bot--wanted %s, got %s", dcc[idx].nick, par);
@@ -904,7 +904,7 @@ static void bot_zapf(int idx, char *par)
     fake_alert(idx, "direction", from, "zapf");
     return;
   }
-  if (!egg_strcasecmp(to, conf.bot->nick)) {
+  if (!strcasecmp(to, conf.bot->nick)) {
     /* For me! */
     char *opcode;
 
@@ -1066,7 +1066,7 @@ static void bot_part(int idx, char *par)
   for (i = 0; i < dcc_total; i++) {
     /* This will potentially close all simul-idxs with matching nick, even though they may be connected multiple times
        but, it won't matter as a new will just be made as needed. */
-    if (dcc[i].type && dcc[i].simul >= 0 && !egg_strcasecmp(dcc[i].nick, nick)) {
+    if (dcc[i].type && dcc[i].simul >= 0 && !strcasecmp(dcc[i].nick, nick)) {
         dcc[i].simul = -1;
         lostdcc(i);
     }
@@ -1151,7 +1151,7 @@ static void bot_versions(int sock, char *par)
 
   if (nextbot(frombot) != sock)
     fake_alert(sock, "direction", frombot, "versions");
-  else if (egg_strcasecmp(tobot = newsplit(&par), conf.bot->nick)) {
+  else if (strcasecmp(tobot = newsplit(&par), conf.bot->nick)) {
     if ((sock = nextbot(tobot)) >= 0)
       dprintf(sock, "v %s %s %s\n", frombot, tobot, par);
   } else {
@@ -1220,7 +1220,7 @@ botcmd_t C_bot[] =
 static int comp_botcmd_t(const void *m1, const void *m2) {
   const botcmd_t *mi1 = (const botcmd_t *) m1;
   const botcmd_t *mi2 = (const botcmd_t *) m2;
-  return egg_strcasecmp(mi1->name, mi2->name);
+  return strcasecmp(mi1->name, mi2->name);
 }
 
 const botcmd_t *search_botcmd_t(const botcmd_t *table, const char* keyString, size_t elements) {
@@ -1276,7 +1276,7 @@ static void bot_rsim(char *botnick, char *code, char *msg)
 
   for (i = 0; i < dcc_total; i++) {
    /* See if we can find a simul-idx for the same ridx/nick */
-   if (dcc[i].type && dcc[i].simul == ridx && !egg_strcasecmp(dcc[i].nick, nick)) {
+   if (dcc[i].type && dcc[i].simul == ridx && !strcasecmp(dcc[i].nick, nick)) {
      putlog(LOG_DEBUG, "*", "Simul found old idx for %s: %d (ridx: %d)", nick, i, ridx);
      dcc[i].simultime = now;
      idx = i;

+ 6 - 6
src/botmsg.c

@@ -101,7 +101,7 @@ int botnet_send_cmd(char * fbot, char * bot, char *fhnd, int fromidx, char * cmd
     const size_t len = simple_snprintf(OBUF, sizeof(OBUF), "rc %s %s %s %i %s\n", bot, fbot, fhnd, fromidx, cmd);
     tputs(dcc[i].sock, OBUF, len);
     return 1;
-  } else if (!egg_strcasecmp(bot, conf.bot->nick)) {
+  } else if (!strcasecmp(bot, conf.bot->nick)) {
     char tmp[24] = "";
 
     simple_snprintf(tmp, sizeof(tmp), "%i", fromidx);
@@ -129,7 +129,7 @@ void botnet_send_cmdreply(char * fbot, char * bot, char * to, char * toidx, char
   if (i >= 0) {
     const size_t len = simple_snprintf(OBUF, sizeof OBUF, "rr %s %s %s %s %s\n", bot, fbot, to, toidx, ln);
     tputs(dcc[i].sock, OBUF, len);
-  } else if (!egg_strcasecmp(bot, conf.bot->nick)) {
+  } else if (!strcasecmp(bot, conf.bot->nick)) {
     gotremotereply(conf.bot->nick, to, toidx, ln);
   }
 }
@@ -460,9 +460,9 @@ int add_note(char *to, char *from, char *msg, int idx, int echo)
     x[20] = 0;
     *p = '@';
     p++;
-    if (!egg_strcasecmp(p, conf.bot->nick))	/* To me?? */
+    if (!strcasecmp(p, conf.bot->nick))	/* To me?? */
       return add_note(x, from, msg, idx, echo); /* Start over, dimwit. */
-    if (egg_strcasecmp(from, conf.bot->nick)) {
+    if (strcasecmp(from, conf.bot->nick)) {
       if (strlen(from) > 40)
 	from[40] = 0;
       if (strchr(from, '@')) {
@@ -512,7 +512,7 @@ int add_note(char *to, char *from, char *msg, int idx, int echo)
   for (i = 0; i < dcc_total; i++) {
     if (dcc[i].type && (dcc[i].type->flags & DCT_CHAT) &&
 	((sock == (-1)) || (sock == dcc[i].sock)) &&
-	(!egg_strcasecmp(dcc[i].nick, to))) {
+	(!strcasecmp(dcc[i].nick, to))) {
 
 	char *p2 = NULL, *fr = from;
 	int l = 0;
@@ -525,7 +525,7 @@ int add_note(char *to, char *from, char *msg, int idx, int echo)
 	  else if (*from == '@')
 	    fr = p2 + 1;
 	}
-	if (idx == -2 || (!egg_strcasecmp(from, conf.bot->nick)))
+	if (idx == -2 || (!strcasecmp(from, conf.bot->nick)))
 	  dprintf(i, "*** [%s] %s%s\n", fr, l ? work : "", msg);
 	else
 	  dprintf(i, "%cNote [%s]: %s%s\n", 7, fr, l ? work : "", msg);

+ 22 - 22
src/botnet.c

@@ -67,7 +67,7 @@ void init_party()
 tand_t *findbot(const char *who)
 {
   for (tand_t* ptr = tandbot; ptr; ptr = ptr->next)
-    if (!egg_strcasecmp(ptr->bot, who))
+    if (!strcasecmp(ptr->bot, who))
       return ptr;
   return NULL;
 }
@@ -79,7 +79,7 @@ void addbot(char *who, char *from, char *next, char flag, int vlocalhub, time_t
   tand_t **ptr = &tandbot, *ptr2 = NULL;
 
   while (*ptr) {
-    if (!egg_strcasecmp((*ptr)->bot, who))
+    if (!strcasecmp((*ptr)->bot, who))
       putlog(LOG_BOTS, "*", "!!! Duplicate botnet bot entry!!");
     ptr = &((*ptr)->next);
   }
@@ -100,7 +100,7 @@ void addbot(char *who, char *from, char *next, char flag, int vlocalhub, time_t
   ptr2->hub = is_hub(who);
   /* Cache user record */
   ptr2->u = userlist ? get_user_by_handle(userlist, who) : NULL;
-  if (!egg_strcasecmp(next, conf.bot->nick))
+  if (!strcasecmp(next, conf.bot->nick))
     ptr2->uplink = (tand_t *) 1;
   else
     ptr2->uplink = findbot(next);
@@ -148,7 +148,7 @@ int addparty(char *bot, char *nick, int chan, char flag, int sock, char *from, i
 
   for (i = 0; i < parties; i++) {
     /* Just changing the channel of someone already on? */
-    if (!egg_strcasecmp(party[i].bot, bot) && (party[i].sock == sock)) {
+    if (!strcasecmp(party[i].bot, bot) && (party[i].sock == sock)) {
       int oldchan = party[i].chan;
 
       party[i].chan = chan;
@@ -196,7 +196,7 @@ int addparty(char *bot, char *nick, int chan, char flag, int sock, char *from, i
 void partystat(char *bot, int sock, int add, int rem)
 {
   for (int i = 0; i < parties; i++) {
-    if ((!egg_strcasecmp(party[i].bot, bot)) &&
+    if ((!strcasecmp(party[i].bot, bot)) &&
 	(party[i].sock == sock)) {
       party[i].status |= add;
       party[i].status &= ~rem;
@@ -209,7 +209,7 @@ void partystat(char *bot, int sock, int add, int rem)
 void partysetidle(char *bot, int sock, int secs)
 {
   for (int i = 0; i < parties; i++) {
-    if ((!egg_strcasecmp(party[i].bot, bot)) &&
+    if ((!strcasecmp(party[i].bot, bot)) &&
 	(party[i].sock == sock)) {
       party[i].timer = (now - (time_t) secs);
     }
@@ -221,7 +221,7 @@ void partysetidle(char *bot, int sock, int secs)
 int getparty(char *bot, int sock)
 {
   for (int i = 0; i < parties; i++) {
-    if (!egg_strcasecmp(party[i].bot, bot) &&
+    if (!strcasecmp(party[i].bot, bot) &&
 	(party[i].sock == sock)) {
       return i;
     }
@@ -236,7 +236,7 @@ bool partyidle(char *bot, char *nick)
   bool ok = 0;
 
   for (int i = 0; i < parties; i++) {
-    if ((!egg_strcasecmp(party[i].bot, bot)) && (!egg_strcasecmp(party[i].nick, nick))) {
+    if ((!strcasecmp(party[i].bot, bot)) && (!strcasecmp(party[i].nick, nick))) {
       party[i].timer = now;
       ok = 1;
     }
@@ -251,7 +251,7 @@ int partynick(char *bot, int sock, char *nick)
   char work[HANDLEN + 1] = "";
 
   for (int i = 0; i < parties; i++) {
-    if (!egg_strcasecmp(party[i].bot, bot) && (party[i].sock == sock)) {
+    if (!strcasecmp(party[i].bot, bot) && (party[i].sock == sock)) {
       strlcpy(work, party[i].nick, sizeof(work));
       strlcpy(party[i].nick, nick, sizeof(party[i].nick));
       strlcpy(nick, work, HANDLEN + 1);
@@ -266,7 +266,7 @@ int partynick(char *bot, int sock, char *nick)
 void partyaway(char *bot, int sock, char *msg)
 {
   for (int i = 0; i < parties; i++) {
-    if ((!egg_strcasecmp(party[i].bot, bot)) &&
+    if ((!strcasecmp(party[i].bot, bot)) &&
 	(party[i].sock == sock)) {
       if (party[i].away)
 	free(party[i].away);
@@ -286,7 +286,7 @@ void rembot(const char *whoin)
   char *who = strdup(whoin);
 
   while (*ptr) {
-    if (!egg_strcasecmp((*ptr)->bot, who))
+    if (!strcasecmp((*ptr)->bot, who))
       break;
     ptr = &((*ptr)->next);
   }
@@ -313,7 +313,7 @@ void rembot(const char *whoin)
 void remparty(char *bot, int sock)
 {
   for (int i = 0; i < parties; i++)
-    if ((!egg_strcasecmp(party[i].bot, bot)) &&
+    if ((!strcasecmp(party[i].bot, bot)) &&
 	(party[i].sock == sock)) {
       parties--;
       if (party[i].from)
@@ -339,7 +339,7 @@ void remparty(char *bot, int sock)
 void rempartybot(char *bot)
 {
   for (int i = 0; i < parties; i++)
-    if (!egg_strcasecmp(party[i].bot, bot)) {
+    if (!strcasecmp(party[i].bot, bot)) {
       remparty(bot, party[i].sock);
       i--;
     }
@@ -377,7 +377,7 @@ int nextbot(const char *who)
     return -1;
 
   for (int j = 0; j < dcc_total; j++) {
-    if (dcc[j].type && bot->via && !egg_strcasecmp(bot->via->bot, dcc[j].nick) && (dcc[j].type == &DCC_BOT))
+    if (dcc[j].type && bot->via && !strcasecmp(bot->via->bot, dcc[j].nick) && (dcc[j].type == &DCC_BOT))
       return j;
   }
 
@@ -540,7 +540,7 @@ tell_bots(int idx, int up, const char *nodename)
 
   for (u = userlist; u; u = u->next) {
     if (u->bot) {
-      if (egg_strcasecmp(u->handle, conf.bot->nick)) {
+      if (strcasecmp(u->handle, conf.bot->nick)) {
         bool found = 0;
         
         if (findbot(u->handle))
@@ -802,7 +802,7 @@ void dump_links(int z)
 
 int in_chain(char *who)
 {
-  if (!egg_strcasecmp(who, conf.bot->nick))
+  if (!strcasecmp(who, conf.bot->nick))
     return 1;
   if (findbot(who))
     return 1;
@@ -834,7 +834,7 @@ int users_in_subtree(tand_t *bot)
   tand_t *b = NULL;
 
   for (i = 0; i < parties; i++)
-    if (!egg_strcasecmp(party[i].bot, bot->bot))
+    if (!strcasecmp(party[i].bot, bot->bot))
       nr++;
   for (b = tandbot; b; b = b->next)
     if (b->bot && (b->uplink == bot))
@@ -853,7 +853,7 @@ int botunlink(int idx, const char *nick, const char *reason)
   if (nick[0] == '*')
     dprintf(idx, "%s\n", "Unlinking all bots...");
   for (i = 0; i < dcc_total; i++) {
-    if (dcc[i].type && ((nick[0] == '*') || !egg_strcasecmp(dcc[i].nick, nick))) {
+    if (dcc[i].type && ((nick[0] == '*') || !strcasecmp(dcc[i].nick, nick))) {
       if (dcc[i].type == &DCC_FORK_BOT) {
 	if (idx >= 0)
 	  dprintf(idx, "%s: %s -> %s.\n", "Killed link attempt to",
@@ -952,7 +952,7 @@ int botlink(char *linker, int idx, char *nick)
   if (!u || !u->bot) {
     if (idx >= 0)
       dprintf(idx, "%s %s\n", nick, "is not a known bot.");
-  } else if (!egg_strcasecmp(nick, conf.bot->nick)) {
+  } else if (!strcasecmp(nick, conf.bot->nick)) {
     if (idx >= 0)
       dprintf(idx, "%s\n", "Link to myself?  Oh boy, Freud would have a field day.");
   } else if (in_chain(nick) && (idx != -3)) {
@@ -1123,7 +1123,7 @@ void tandem_relay(int idx, char *nick, register int i)
     dprintf(idx, "%s %s\n", nick, "is not a known bot.");
     return;
   }
-  if (!egg_strcasecmp(nick, conf.bot->nick)) {
+  if (!strcasecmp(nick, conf.bot->nick)) {
     dprintf(idx, "%s\n", "Relay to myself?  What on EARTH would be the point?!");
     return;
   }
@@ -1270,7 +1270,7 @@ static void pre_relay(int idx, char *buf, register int len)
     lostdcc(idx);
     return;
   }
-  if (!egg_strcasecmp(buf, "*bye*")) {
+  if (!strcasecmp(buf, "*bye*")) {
     /* Disconnect */
     struct chat_info *ci = dcc[idx].u.relay->chat;
 
@@ -1470,7 +1470,7 @@ static void dcc_relay(int idx, char *buf, int j)
 
 static void dcc_relaying(int idx, char *buf, int j)
 {
-  if (egg_strcasecmp(buf, "*bye*")) {
+  if (strcasecmp(buf, "*bye*")) {
     dprintf(-dcc[idx].u.relay->sock, "%s\n", buf);
     return;
   }

+ 6 - 6
src/chanprog.c

@@ -141,7 +141,7 @@ struct userrec *check_chanlist(const char *host)
   nick = splitnick(&uhost);
   for (chan = chanset; chan; chan = chan->next)
     for (m = chan->channel.member; m && m->nick[0]; m = m->next) 
-      if (!rfc_casecmp(nick, m->nick) && !egg_strcasecmp(uhost, m->userhost))
+      if (!rfc_casecmp(nick, m->nick) && !strcasecmp(uhost, m->userhost))
 	return m->user;
   return NULL;
 }
@@ -155,7 +155,7 @@ struct userrec *check_chanlist_hand(const char *hand)
 
   for (chan = chanset; chan; chan = chan->next)
     for (m = chan->channel.member; m && m->nick[0]; m = m->next)
-      if (m->user && !egg_strcasecmp(m->user->handle, hand))
+      if (m->user && !strcasecmp(m->user->handle, hand))
 	return m->user;
   return NULL;
 }
@@ -210,7 +210,7 @@ void set_chanlist(const char *host, struct userrec *rec)
   nick = splitnick(&uhost);
   for (chan = chanset; chan; chan = chan->next)
     for (m = chan->channel.member; m && m->nick[0]; m = m->next)
-      if (!rfc_casecmp(nick, m->nick) && !egg_strcasecmp(uhost, m->userhost))
+      if (!rfc_casecmp(nick, m->nick) && !strcasecmp(uhost, m->userhost))
 	m->user = rec;
 }
 
@@ -386,7 +386,7 @@ bool is_hub(const char* nick) {
 
       len = p2 - p;
       strlcpy(hubbuf, p, len + 1);
-      if (!egg_strncasecmp(nick, hubbuf, HANDLEN))
+      if (!strncasecmp(nick, hubbuf, HANDLEN))
         return 1;
     }
     if ((p = strchr(p, ',')))
@@ -439,7 +439,7 @@ void load_internal_users()
             bi->telnet_port = atoi(port) ? atoi(port) : 0;
             bi->relay_port = bi->telnet_port;
             bi->hublevel = hublevel;
-            if (conf.bot->hub && (!bi->hublevel) && (!egg_strcasecmp(hand, conf.bot->nick)))
+            if (conf.bot->hub && (!bi->hublevel) && (!strcasecmp(hand, conf.bot->nick)))
               bi->hublevel = 99;
             bi->uplink = (char *) my_calloc(1, 1);
             set_user(&USERENTRY_BOTADDR, u, bi);
@@ -692,7 +692,7 @@ int isowner(char *name)
       pb++;
     }
     pl = pb - pa;
-    if (pl == nl && !egg_strncasecmp(pa, name, nl))
+    if (pl == nl && !strncasecmp(pa, name, nl))
       return (1);
     while (1) {
       if ((*pb == 0) || ((*pb != ',') && (*pb != ' ')))

+ 88 - 88
src/cmds.c

@@ -144,7 +144,7 @@ static void tell_who(int idx, int chan)
 	ok = 1;
 	dprintf(idx, "Bots connected:\n");
       }
-      egg_strftime(s, 20, "%d %b %H:%M %Z", gmtime(&dcc[i].timeval));
+      strftime(s, 20, "%d %b %H:%M %Z", gmtime(&dcc[i].timeval));
       s[20] = 0;
       if (atr & USER_OWNER) {
         simple_snprintf(format, sizeof format, "  [%%.2lu]  %%s%%c%%-%zus (%%s) %%s\n", nicklen);
@@ -390,7 +390,7 @@ static void cmd_about(int idx, char *par)
   putlog(LOG_CMDS, "*", "#%s# about", dcc[idx].nick);
   dprintf(idx, STR("Wraith botpack by bryan\n"));
   dprintf(idx, STR("http://wraith.botpack.net\n"));
-  egg_strftime(c, sizeof c, "%c %Z", gmtime(&buildts));
+  strftime(c, sizeof c, "%c %Z", gmtime(&buildts));
   dprintf(idx, "Version: %s\n", egg_version);
   dprintf(idx, "Build: %s (%li)\n", c, (long)buildts);
   dprintf(idx, "Commit: %s\n", commit);
@@ -600,7 +600,7 @@ static void cmd_nohelp(int idx, char *par)
 
 bool is_restricted_cmd(const char* name) {
   if (name) {
-    if (!HAVE_MDOP && !egg_strcasecmp(name, "mmode"))
+    if (!HAVE_MDOP && !strcasecmp(name, "mmode"))
       return 1;
   }
   return 0;
@@ -609,7 +609,7 @@ bool is_restricted_cmd(const char* name) {
 static int comp_help_t(const void *m1, const void *m2) {
   const help_t *mi1 = (const help_t *) m1;
   const help_t *mi2 = (const help_t *) m2;
-  return egg_strcasecmp(mi1->cmd, mi2->cmd);
+  return strcasecmp(mi1->cmd, mi2->cmd);
 }
 
 static help_t *
@@ -740,7 +740,7 @@ static void cmd_who(int idx, char *par)
       return;
     }
     putlog(LOG_CMDS, "*", "#%s# who %s", dcc[idx].nick, par);
-    if (!egg_strcasecmp(par, conf.bot->nick))
+    if (!strcasecmp(par, conf.bot->nick))
       tell_who(idx, dcc[idx].u.chat->channel);
     else {
       int i = nextbot(par);
@@ -919,7 +919,7 @@ static void cmd_status(int idx, char *par)
 {
   int atr = dcc[idx].user ? dcc[idx].user->flags : 0, all = 0;
 
-  if (!egg_strcasecmp(par, "all")) {
+  if (!strcasecmp(par, "all")) {
     if (!(atr & USER_MASTER)) {
       dprintf(idx, "You do not have Bot Master privileges.\n");
       return;
@@ -963,7 +963,7 @@ static void cmd_boot(int idx, char *par)
     char whonick[HANDLEN + 1];
 
     splitcn(whonick, who, '@', HANDLEN + 1);
-    if (!egg_strcasecmp(who, conf.bot->nick)) {
+    if (!strcasecmp(who, conf.bot->nick)) {
       cmd_boot(idx, whonick);
       return;
     }
@@ -977,7 +977,7 @@ static void cmd_boot(int idx, char *par)
     return;
   }
   for (i = 0; i < dcc_total; i++) {
-    if (dcc[i].type && dcc[i].simul == -1 && !egg_strcasecmp(dcc[i].nick, who) && (dcc[i].type->flags & DCT_CANBOOT)) {
+    if (dcc[i].type && dcc[i].simul == -1 && !strcasecmp(dcc[i].nick, who) && (dcc[i].type->flags & DCT_CANBOOT)) {
       if (!whois_access(dcc[idx].user, dcc[i].user)) {
         dprintf(idx, "Sorry, you cannot boot %s.\n", dcc[i].nick);
         return;
@@ -1015,7 +1015,7 @@ static void cmd_console(int idx, char *par)
    */
   if (nick[0] && !strchr(CHANMETA "+-*", nick[0]) && glob_master(fr)) {
     for (i = 0; i < dcc_total; i++) {
-      if (dcc[i].type && !egg_strcasecmp(nick, dcc[i].nick) && (dcc[i].type == &DCC_CHAT) && (!ok)) {
+      if (dcc[i].type && !strcasecmp(nick, dcc[i].nick) && (dcc[i].type == &DCC_CHAT) && (!ok)) {
 	ok = 1;
 	dest = i;
       }
@@ -1114,13 +1114,13 @@ static void cmd_date(int idx, char *par)
 
   putlog(LOG_CMDS, "*", "#%s# date", dcc[idx].nick);
 
-  egg_strftime(date, sizeof date, "%c %Z", localtime(&now));
+  strftime(date, sizeof date, "%c %Z", localtime(&now));
   dprintf(idx, "%s (local shell time)\n", date);
-  egg_strftime(date, sizeof date, "%c %Z", gmtime(&now));
+  strftime(date, sizeof date, "%c %Z", gmtime(&now));
   dprintf(idx, "%s <-- This time is used on the bot.\n", date);
   
   hub = now + timesync;
-  egg_strftime(date, sizeof date, "%c %Z", gmtime(&hub));
+  strftime(date, sizeof date, "%c %Z", gmtime(&hub));
   dprintf(idx, "%s <-- Botnet uses this\n", date);
 }
 
@@ -1157,7 +1157,7 @@ static void cmd_chhandle(int idx, char *par)
     return;
   } else if (strchr(BADHANDCHARS, newhand[0]) != NULL)
     dprintf(idx, "Bizarre quantum forces prevent nicknames from starting with '%c'.\n", newhand[0]);
-  else if (get_user_by_handle(userlist, newhand) && egg_strcasecmp(hand, newhand))
+  else if (get_user_by_handle(userlist, newhand) && strcasecmp(hand, newhand))
     dprintf(idx, "Somebody is already using %s.\n", newhand);
   else {
     int atr = dcc[idx].user ? dcc[idx].user->flags : 0, atr2 = u2 ? u2->flags : 0;
@@ -1167,11 +1167,11 @@ static void cmd_chhandle(int idx, char *par)
     else if (u2->bot && !(atr & USER_OWNER))
       dprintf(idx, "You can't change a bot's nick.\n");
     else if ((atr2 & USER_OWNER) && !(atr & USER_OWNER) &&
-            egg_strcasecmp(dcc[idx].nick, hand))
+            strcasecmp(dcc[idx].nick, hand))
       dprintf(idx, "You can't change a bot owner's handle.\n");
-    else if (isowner(hand) && egg_strcasecmp(dcc[idx].nick, hand))
+    else if (isowner(hand) && strcasecmp(dcc[idx].nick, hand))
       dprintf(idx, "You can't change a permanent bot owner's handle.\n");
-    else if (!egg_strcasecmp(newhand, conf.bot->nick) && !(u2->bot || nextbot(hand) != -1))
+    else if (!strcasecmp(newhand, conf.bot->nick) && !(u2->bot || nextbot(hand) != -1))
       dprintf(idx, "Hey! That's MY name!\n");
     else if (change_handle(u2, newhand)) {
       putlog(LOG_CMDS, "*", "#%s# chhandle %s %s", dcc[idx].nick,
@@ -1202,9 +1202,9 @@ static void cmd_handle(int idx, char *par)
     return;
   } else if (strchr(BADHANDCHARS, newhandle[0]) != NULL) {
     dprintf(idx, "Bizarre quantum forces prevent handle from starting with '%c'.\n", newhandle[0]);
-  } else if (get_user_by_handle(userlist, newhandle) && egg_strcasecmp(dcc[idx].nick, newhandle)) {
+  } else if (get_user_by_handle(userlist, newhandle) && strcasecmp(dcc[idx].nick, newhandle)) {
     dprintf(idx, "Somebody is already using %s.\n", newhandle);
-  } else if (!egg_strcasecmp(newhandle, conf.bot->nick)) {
+  } else if (!strcasecmp(newhandle, conf.bot->nick)) {
     dprintf(idx, "Hey!  That's MY name!\n");
   } else {
     char oldhandle[HANDLEN + 1] = "";
@@ -1280,9 +1280,9 @@ static void cmd_chsecpass(int idx, char *par)
   else if (u->bot)
     dprintf(idx, "Bots do not have secpasses.\n");
 //  int atr = dcc[idx].user ? dcc[idx].user->flags : 0;
-//  else if ((u->flags & USER_OWNER) && !(atr & USER_OWNER) && egg_strcasecmp(handle, dcc[idx].nick))
+//  else if ((u->flags & USER_OWNER) && !(atr & USER_OWNER) && strcasecmp(handle, dcc[idx].nick))
 //    dprintf(idx, "You can't change a bot owner's secpass.\n");
-//  else if (isowner(handle) && egg_strcasecmp(dcc[idx].nick, handle))
+//  else if (isowner(handle) && strcasecmp(dcc[idx].nick, handle))
 //    dprintf(idx, "You can't change a permanent bot owner's secpass.\n");
   else if (!par[0]) {
     putlog(LOG_CMDS, "*", "#%s# chsecpass %s [nothing]", dcc[idx].nick, handle);
@@ -1341,8 +1341,8 @@ static void cmd_botcmd(int idx, char *par)
     putlog(LOG_CMDS, "*", "#%s# botcmd %s %s ...", dcc[idx].nick, botm, cmd);
 
   if (!strcmp(botm, "*")) {
-    if (!egg_strncasecmp(cmd, "di", 2) || (!egg_strncasecmp(cmd, "res", 3) && egg_strncasecmp(cmd, "reset", 5)) || !egg_strncasecmp(cmd, "sui", 3) || 
-        !egg_strncasecmp(cmd, "j", 1)) {
+    if (!strncasecmp(cmd, "di", 2) || (!strncasecmp(cmd, "res", 3) && strncasecmp(cmd, "reset", 5)) || !strncasecmp(cmd, "sui", 3) ||
+        !strncasecmp(cmd, "j", 1)) {
       dprintf(idx, "Not a good idea.\n");
       return;
     } else if (!(dcc[idx].user->flags & USER_OWNER)) {
@@ -1385,7 +1385,7 @@ static void cmd_botcmd(int idx, char *par)
   }
 
   /* Only wild_match when not using botm=? and strlen(conf.bot->nick) > 1, ie dont match on hubs with 1 letter nicks */
-  if ((!(strlen(conf.bot->nick) == 1 && !strcmp(botm, "?")) && wild_match(botm, conf.bot->nick)) || !egg_strcasecmp(botm, conf.bot->nick)) {
+  if ((!(strlen(conf.bot->nick) == 1 && !strcmp(botm, "?")) && wild_match(botm, conf.bot->nick)) || !strcasecmp(botm, conf.bot->nick)) {
     found++;
     check_bind_dcc(cmd, idx, par);
   }
@@ -1575,7 +1575,7 @@ static void cmd_comment(int idx, char *par)
   }
 
   putlog(LOG_CMDS, "*", "#%s# comment %s %s", dcc[idx].nick, handle, par);
-  if (!egg_strcasecmp(par, "none")) {
+  if (!strcasecmp(par, "none")) {
     dprintf(idx, "Okay, comment blanked.\n");
     set_user(&USERENTRY_COMMENT, u1, NULL);
     return;
@@ -1659,7 +1659,7 @@ static void cmd_conf(int idx, char *par)
   conf_bot *oldlist = conf_bots_dup(conf.bots);
   
   putlog(LOG_CMDS, "*", "#%s# conf %s %s", dcc[idx].nick, cmd, par[0] ? par : "");
-  if (!egg_strcasecmp(cmd, "add") || !egg_strcasecmp(cmd, "change")) {
+  if (!strcasecmp(cmd, "add") || !strcasecmp(cmd, "change")) {
     char *nick = NULL, *host = NULL, *ip = NULL, *ipsix = NULL;
 
     nick = newsplit(&par);
@@ -1687,7 +1687,7 @@ static void cmd_conf(int idx, char *par)
       dprintf(idx, "Changed bot: %s\n", nick);
     listbot = strdup(nick);
     save++;
-  } else if (!egg_strncasecmp(cmd, "del", 3) || !egg_strncasecmp(cmd, "rem", 3)) {
+  } else if (!strncasecmp(cmd, "del", 3) || !strncasecmp(cmd, "rem", 3)) {
     if (!par[0]) {
       dprintf(idx, "Usage: conf del <bot>\n");
 
@@ -1712,12 +1712,12 @@ static void cmd_conf(int idx, char *par)
       save++;
     } else
       dprintf(idx, "Error trying to remove bot '%s'\n", par);
-  } else if (!egg_strcasecmp(cmd, "disable") || !egg_strcasecmp(cmd, "enable")) {
+  } else if (!strcasecmp(cmd, "disable") || !strcasecmp(cmd, "enable")) {
     conf_bot *bot = NULL;
 
     for (bot = conf.bots; bot && bot->nick; bot = bot->next) {
-      if (!egg_strcasecmp(bot->nick, par)) {
-        if (!egg_strcasecmp(cmd, "enable")) {
+      if (!strcasecmp(bot->nick, par)) {
+        if (!strcasecmp(cmd, "enable")) {
           if (bot->disabled) {
             dprintf(idx, "Enabled '%s'.\n", bot->nick);
             bot->disabled = 0;
@@ -1736,7 +1736,7 @@ static void cmd_conf(int idx, char *par)
     }
   }
 #ifndef CYGWIN_HACKS
-  if (!egg_strcasecmp(cmd, "set")) {
+  if (!strcasecmp(cmd, "set")) {
     char *what = NULL;
     int show = 1, set = 0;
 
@@ -1746,19 +1746,19 @@ static void cmd_conf(int idx, char *par)
       if (par[0] && what) { /* set */
         set++;
         save = 1;
-/*        if (!egg_strcasecmp(what, "uid"))            conf.uid = atoi(par);
-        else if (!egg_strcasecmp(what, "uname"))     str_redup(&conf.uname, par);
-        else if (!egg_strcasecmp(what, "username"))  str_redup(&conf.username, par);
+/*        if (!strcasecmp(what, "uid"))            conf.uid = atoi(par);
+        else if (!strcasecmp(what, "uname"))     str_redup(&conf.uname, par);
+        else if (!strcasecmp(what, "username"))  str_redup(&conf.username, par);
 */
-        if (!egg_strcasecmp(what, "homedir"))   str_redup(&conf.homedir, par);
-        else if (!egg_strcasecmp(what, "binpath"))   str_redup(&conf.binpath, par);
-        else if (!egg_strcasecmp(what, "binname"))   str_redup(&conf.binname, par);
-        else if (!egg_strcasecmp(what, "datadir"))   str_redup(&conf.datadir, par);
-        else if (!egg_strcasecmp(what, "portmin"))   conf.portmin = atoi(par);
-        else if (!egg_strcasecmp(what, "portmax"))   conf.portmax = atoi(par);
-        else if (!egg_strcasecmp(what, "autocron"))  conf.autocron = atoi(par);
-        else if (!egg_strcasecmp(what, "autouname")) conf.autouname = atoi(par);
-        else if (!egg_strcasecmp(what, "watcher"))  conf.watcher = atoi(par);
+        if (!strcasecmp(what, "homedir"))   str_redup(&conf.homedir, par);
+        else if (!strcasecmp(what, "binpath"))   str_redup(&conf.binpath, par);
+        else if (!strcasecmp(what, "binname"))   str_redup(&conf.binname, par);
+        else if (!strcasecmp(what, "datadir"))   str_redup(&conf.datadir, par);
+        else if (!strcasecmp(what, "portmin"))   conf.portmin = atoi(par);
+        else if (!strcasecmp(what, "portmax"))   conf.portmax = atoi(par);
+        else if (!strcasecmp(what, "autocron"))  conf.autocron = atoi(par);
+        else if (!strcasecmp(what, "autouname")) conf.autouname = atoi(par);
+        else if (!strcasecmp(what, "watcher"))  conf.watcher = atoi(par);
         else { 
           set--;
           save = 0;
@@ -1769,31 +1769,31 @@ static void cmd_conf(int idx, char *par)
     if (show) {
       const char *ss = set ? "Set: " : "";
       
-/*      if (!what || !egg_strcasecmp(what, "uid"))        dprintf(idx, "%suid: %d\n", ss, conf.uid);
-      if (!what || !egg_strcasecmp(what, "uname"))      dprintf(idx, "%suname: %s\n", ss, conf.uname);
-      if (!what || !egg_strcasecmp(what, "username"))   dprintf(idx, "%susername: %s\n", ss, conf.username);
+/*      if (!what || !strcasecmp(what, "uid"))        dprintf(idx, "%suid: %d\n", ss, conf.uid);
+      if (!what || !strcasecmp(what, "uname"))      dprintf(idx, "%suname: %s\n", ss, conf.uname);
+      if (!what || !strcasecmp(what, "username"))   dprintf(idx, "%susername: %s\n", ss, conf.username);
 */
-      if (!what || !egg_strcasecmp(what, "homedir"))    dprintf(idx, "%shomedir: %s\n", ss, conf.homedir);
-      if (!what || !egg_strcasecmp(what, "binpath"))    dprintf(idx, "%sbinpath: %s\n", ss, conf.binpath);
-      if (!what || !egg_strcasecmp(what, "binname"))    dprintf(idx, "%sbinname: %s\n", ss, conf.binname);
-      if (!what || !egg_strcasecmp(what, "datadir"))    dprintf(idx, "%sdatadir: %s\n", ss, conf.datadir);
-      if (!what || !egg_strcasecmp(what, "portmin"))    dprintf(idx, "%sportmin: %d\n", ss, conf.portmin);
-      if (!what || !egg_strcasecmp(what, "portmax"))    dprintf(idx, "%sportmax: %d\n", ss, conf.portmax);
-      if (!what || !egg_strcasecmp(what, "autocron"))   dprintf(idx, "%sautocron: %d\n", ss, conf.autocron);
-      if (!what || !egg_strcasecmp(what, "autouname"))  dprintf(idx, "%sautouname: %d\n", ss, conf.autouname);
-      if (!what || !egg_strcasecmp(what, "watcher"))    dprintf(idx, "%swatcher: %d\n", ss, conf.watcher);
+      if (!what || !strcasecmp(what, "homedir"))    dprintf(idx, "%shomedir: %s\n", ss, conf.homedir);
+      if (!what || !strcasecmp(what, "binpath"))    dprintf(idx, "%sbinpath: %s\n", ss, conf.binpath);
+      if (!what || !strcasecmp(what, "binname"))    dprintf(idx, "%sbinname: %s\n", ss, conf.binname);
+      if (!what || !strcasecmp(what, "datadir"))    dprintf(idx, "%sdatadir: %s\n", ss, conf.datadir);
+      if (!what || !strcasecmp(what, "portmin"))    dprintf(idx, "%sportmin: %d\n", ss, conf.portmin);
+      if (!what || !strcasecmp(what, "portmax"))    dprintf(idx, "%sportmax: %d\n", ss, conf.portmax);
+      if (!what || !strcasecmp(what, "autocron"))   dprintf(idx, "%sautocron: %d\n", ss, conf.autocron);
+      if (!what || !strcasecmp(what, "autouname"))  dprintf(idx, "%sautouname: %d\n", ss, conf.autouname);
+      if (!what || !strcasecmp(what, "watcher"))    dprintf(idx, "%swatcher: %d\n", ss, conf.watcher);
     }
   }
 #endif /* !CYGWIN_HACKS */
 
-  if (listbot || !egg_strcasecmp(cmd, "list")) {
+  if (listbot || !strcasecmp(cmd, "list")) {
     conf_checkpids(conf.bots);
     conf_bot *bot = NULL;
     unsigned int i = 0;
 
     for (bot = conf.bots; bot && bot->nick; bot = bot->next) {
       i++;
-      if (!listbot || (listbot && !egg_strcasecmp(listbot, bot->nick)))
+      if (!listbot || (listbot && !strcasecmp(listbot, bot->nick)))
         dprintf(idx, "%d: %s%s IP: %s HOST: %s IP6: %s HOST6: %s HUB: %d PID: %d\n", i,
                       bot->disabled ? "/" : "",
                       bot->nick,
@@ -1985,7 +1985,7 @@ static void cmd_simul(int idx, char *par)
   bool ok = 0;
 
   for (int i = 0; i < dcc_total; i++) {
-    if (dcc[i].type && !egg_strcasecmp(nick, dcc[i].nick) && !ok && (dcc[i].type->flags & DCT_SIMUL)) {
+    if (dcc[i].type && !strcasecmp(nick, dcc[i].nick) && !ok && (dcc[i].type->flags & DCT_SIMUL)) {
       putlog(LOG_CMDS, "*", "#%s# simul %s %s", dcc[idx].nick, nick, par);
       if (dcc[i].type && dcc[i].type->activity) {
 	dcc[i].type->activity(i, par, strlen(par));
@@ -2014,7 +2014,7 @@ static void cmd_link(int idx, char *par)
     return;
   }
 
-  if (!par[0] || !egg_strcasecmp(par, conf.bot->nick))
+  if (!par[0] || !strcasecmp(par, conf.bot->nick))
     botlink(dcc[idx].nick, idx, s);
   else {
     char x[40] = "";
@@ -2047,7 +2047,7 @@ static void cmd_unlink(int idx, char *par)
   /* If we're directly connected to that bot, just do it
    * (is nike gunna sue?)
    */
-  if (!egg_strcasecmp(dcc[i].nick, bot))
+  if (!strcasecmp(dcc[i].nick, bot))
     botunlink(idx, bot, par);
   else {
     char x[40] = "";
@@ -2106,7 +2106,7 @@ static void cmd_trace(int idx, char *par)
     dprintf(idx, "Usage: trace <bot>\n");
     return;
   }
-  if (!egg_strcasecmp(par, conf.bot->nick)) {
+  if (!strcasecmp(par, conf.bot->nick)) {
     dprintf(idx, "That's me!  Hiya! :)\n");
     return;
   }
@@ -2154,7 +2154,7 @@ int check_dcc_attrs(struct userrec *u, flag_t oatr)
       continue;
     }
 
-    if ((dcc[i].type->flags & DCT_MASTER) && (!egg_strcasecmp(u->handle, dcc[i].nick))) {
+    if ((dcc[i].type->flags & DCT_MASTER) && (!strcasecmp(u->handle, dcc[i].nick))) {
       stat = dcc[i].status;
       if ((dcc[i].type == &DCC_CHAT) &&
 	  ((u->flags & (USER_OP | USER_MASTER | USER_OWNER))
@@ -2256,7 +2256,7 @@ int check_dcc_chanattrs(struct userrec *u, char *chname, flag_t chflags, flag_t
   struct chat_info dummy;
 
   for (int i = 0; i < dcc_total; i++) {
-    if (dcc[i].type && dcc[i].simul == -1 && (dcc[i].type->flags & DCT_MASTER) && !egg_strcasecmp(u->handle, dcc[i].nick)) {
+    if (dcc[i].type && dcc[i].simul == -1 && (dcc[i].type->flags & DCT_MASTER) && !strcasecmp(u->handle, dcc[i].nick)) {
       if ((dcc[i].type == &DCC_CHAT) &&
 	  ((chflags & (USER_OP | USER_MASTER | USER_OWNER))
 	   != (ochatr & (USER_OP | USER_MASTER | USER_OWNER))))
@@ -2541,7 +2541,7 @@ static void cmd_chat(int idx, char *par)
 
   char *arg = newsplit(&par);
 
-  if (!egg_strcasecmp(arg, "off")) {
+  if (!strcasecmp(arg, "off")) {
     /* Turn chat off */
     if (dcc[idx].u.chat->channel < 0) {
       dprintf(idx, "You weren't in chat anyway!\n");
@@ -2577,7 +2577,7 @@ static void cmd_chat(int idx, char *par)
       }
     } else {
       if (((arg[0] < '0') || (arg[0] > '9')) && (arg[0])) {
-	if (!egg_strcasecmp(arg, "on"))
+	if (!strcasecmp(arg, "on"))
 	  newchan = 0;
 	else {
           newchan = -1;
@@ -2741,10 +2741,10 @@ static void cmd_echo(int idx, char *par)
     dprintf(idx, "Echo is currently %s.\n", dcc[idx].status & STAT_ECHO ? "on" : "off");
     return;
   }
-  if (!egg_strcasecmp(par, "on")) {
+  if (!strcasecmp(par, "on")) {
     dprintf(idx, "Echo turned on.\n");
     dcc[idx].status |= STAT_ECHO;
-  } else if (!egg_strcasecmp(par, "off")) {
+  } else if (!strcasecmp(par, "off")) {
     dprintf(idx, "Echo turned off.\n");
     dcc[idx].status &= ~STAT_ECHO;
   } else {
@@ -2766,13 +2766,13 @@ static void cmd_login(int idx, char *par)
 
   which = newsplit(&par);
 
-  if (!egg_strcasecmp(which, "banner"))
+  if (!strcasecmp(which, "banner"))
     whichbit = STAT_BANNER;
-  else if (!egg_strcasecmp(which, "bots"))
+  else if (!strcasecmp(which, "bots"))
     whichbit = STAT_BOTS;
-  else if (!egg_strcasecmp(which, "channels"))
+  else if (!strcasecmp(which, "channels"))
     whichbit = STAT_CHANNELS;
-  else if (!egg_strcasecmp(which, "whom"))
+  else if (!strcasecmp(which, "whom"))
     whichbit = STAT_WHOM;
   else {
     dprintf(idx, "Unrecognized option '$b%s$b'\n", which);
@@ -2784,9 +2784,9 @@ static void cmd_login(int idx, char *par)
     return;
   }
 
-  if (!egg_strcasecmp(par, "on"))
+  if (!strcasecmp(par, "on"))
     set = 1;
-  else if (!egg_strcasecmp(par, "off"))
+  else if (!strcasecmp(par, "off"))
     set = 0;
   else {
     dprintf(idx, "Unrecognized setting '$b%s$b'\n", par);
@@ -2818,9 +2818,9 @@ static void cmd_color(int idx, char *par)
 
   char *of = newsplit(&par);
 
-  if (!egg_strcasecmp(of, "on")) {
+  if (!strcasecmp(of, "on")) {
     dcc[idx].status |= STAT_COLOR;
-  } else if (!egg_strcasecmp(of, "off")) {
+  } else if (!strcasecmp(of, "off")) {
     dcc[idx].status &= ~(STAT_COLOR);
     dprintf(idx, "Color turned off.\n");
   } else {
@@ -2922,7 +2922,7 @@ static void cmd_strip(int idx, char *par)
 
   if ((nick[0] != '+') && (nick[0] != '-') &&dcc[idx].user && (dcc[idx].user->flags & USER_MASTER)) {
     for (i = 0; i < dcc_total; i++) {
-      if (dcc[i].type && !egg_strcasecmp(nick, dcc[i].nick) && dcc[i].type == &DCC_CHAT && !ok) {
+      if (dcc[i].type && !strcasecmp(nick, dcc[i].nick) && dcc[i].type == &DCC_CHAT && !ok) {
 	ok = 1;
 	dest = i;
       }
@@ -3091,7 +3091,7 @@ static void cmd_page(int idx, char *par)
     return;
   }
   a = atoi(par);
-  if ((!a && !par[0]) || !egg_strcasecmp(par, "off")) {
+  if ((!a && !par[0]) || !strcasecmp(par, "off")) {
     dcc[idx].status &= ~STAT_PAGE;
     dcc[idx].u.chat->max_line = 0x7ffffff;	/* flush_lines needs this */
     while (dcc[idx].u.chat->buffer)
@@ -3334,7 +3334,7 @@ static void cmd_pls_user(int idx, char *par)
     dprintf(idx, "Someone already exists by that name.\n");
   else if (strchr(BADHANDCHARS, handle[0]) != NULL)
     dprintf(idx, "You can't start a nick with '%c'.\n", handle[0]);
-  else if (!egg_strcasecmp(handle, conf.bot->nick))
+  else if (!strcasecmp(handle, conf.bot->nick))
     dprintf(idx, "Hey! That's MY name!\n");
   else {
     struct userrec *u2 = NULL;
@@ -3415,7 +3415,7 @@ static void cmd_mns_user(int idx, char *par)
         dprintf(idx, "You can't remove bots.\n");
         return;
     }
-    if (!egg_strcasecmp(u2->handle, conf.bot->nick)) {
+    if (!strcasecmp(u2->handle, conf.bot->nick)) {
       dprintf(idx, "The 'suicide' cmd should be used instead.\n");
       return;
     }
@@ -3424,7 +3424,7 @@ static void cmd_mns_user(int idx, char *par)
 
     if (i < 0)
       botunlink(idx, handle, "Bot removed.");
-    else if (!egg_strcasecmp(dcc[i].nick, handle))
+    else if (!strcasecmp(dcc[i].nick, handle))
       botunlink(idx, handle, "Bot removed.");
     else {
       char x[40] = "";
@@ -3473,7 +3473,7 @@ static void cmd_pls_host(int idx, char *par)
                      fr  = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0 };
 
   get_user_flagrec(dcc[idx].user, &fr, NULL);
-  if (egg_strcasecmp(handle, dcc[idx].nick)) {
+  if (strcasecmp(handle, dcc[idx].nick)) {
     get_user_flagrec(u2, &fr2, NULL);
     if (!glob_master(fr) && !glob_bot(fr2) && !chan_master(fr)) {
       dprintf(idx, "You can't add hostmasks to non-bots.\n");
@@ -3590,7 +3590,7 @@ static void cmd_mns_host(int idx, char *par)
       return;
     }
 
-  if (egg_strcasecmp(handle, dcc[idx].nick)) {
+  if (strcasecmp(handle, dcc[idx].nick)) {
     if (!glob_master(fr) && !glob_bot(fr2) && !chan_master(fr)) {
       dprintf(idx, "You can't remove hostmasks from non-bots.\n");
       return;
@@ -3694,7 +3694,7 @@ static void cmd_clearhosts(int idx, char *par)
       return;
     }
 
-  if (egg_strcasecmp(handle, dcc[idx].nick)) {
+  if (strcasecmp(handle, dcc[idx].nick)) {
     if (!glob_master(fr) && !glob_bot(fr2) && !chan_master(fr)) {
       dprintf(idx, "You can't remove hostmasks from non-bots.\n");
       return;
@@ -3749,7 +3749,7 @@ static void cmd_botserver(int idx, char * par) {
     dprintf(idx, "Usage: botserver <bot>\n");
     return;
   }
-  if (egg_strcasecmp(conf.bot->nick, par) && nextbot(par)<0) {
+  if (strcasecmp(conf.bot->nick, par) && nextbot(par)<0) {
     dprintf(idx, "%s isn't a linked bot.\n", par);
     return;
   }
@@ -3807,7 +3807,7 @@ static void cmd_botversion(int idx, char * par) {
     dprintf(idx, "Usage: botversion <bot>\n");
     return;
   }
-  if (egg_strcasecmp(conf.bot->nick, par) && nextbot(par)<0) {
+  if (strcasecmp(conf.bot->nick, par) && nextbot(par)<0) {
     dprintf(idx, "%s isn't a linked bot.\n", par);
     return;
   }
@@ -3884,7 +3884,7 @@ static void cmd_botmsg(int idx, char * par) {
     dprintf(idx, "Usage: botmsg <bot> <nick|#channel> <message>\n");
     return;
   }
-  if (egg_strcasecmp(conf.bot->nick, tbot) && nextbot(tbot)<0) {
+  if (strcasecmp(conf.bot->nick, tbot) && nextbot(tbot)<0) {
     dprintf(idx, "%s isn't a linked bot.\n", tbot);
     return;
   }
@@ -3918,7 +3918,7 @@ static void rcmd_msg(char * tobot, char * frombot, char * fromhand, char * fromi
     char *nick = newsplit(&par);
 
     dprintf(DP_SERVER, "PRIVMSG %s :%s\n", nick, par);
-    if (!egg_strcasecmp(tobot, conf.bot->nick)) {
+    if (!strcasecmp(tobot, conf.bot->nick)) {
       char buf[1024] = "";
 
       simple_snprintf(buf, sizeof buf, "Sent message to %s", nick);
@@ -4082,7 +4082,7 @@ static void cmd_dns(int idx, char *par)
      return;
   }
 
-  if (!egg_strcasecmp(par, "flush")) {
+  if (!strcasecmp(par, "flush")) {
     dprintf(idx, "Flushing cache...\n");
     dns_cache_flush();
     return;
@@ -4209,7 +4209,7 @@ static void cmd_botjump(int idx, char * par) {
     dprintf(idx, "Usage: botjump <bot> [server [port [pass]]]\n");
     return;
   }
-  if (egg_strcasecmp(conf.bot->nick, tbot) && nextbot(tbot)<0) {
+  if (strcasecmp(conf.bot->nick, tbot) && nextbot(tbot)<0) {
     dprintf(idx, "%s isn't a linked bot.\n", tbot);
     return;
   }

+ 9 - 9
src/compat/inet_ntop.c

@@ -36,9 +36,9 @@
  * sizeof(int) < 4.  sizeof(int) > 4 is fine; all the world's not a VAX.
  */
 
-static const char *egg_inet_ntop4 (const u_char *src, char *dst, socklen_t size);
+static const char *inet_ntop4 (const u_char *src, char *dst, socklen_t size);
 #ifdef USE_IPV6
-static const char *egg_inet_ntop6 (const u_char *src, char *dst, socklen_t size);
+static const char *inet_ntop6 (const u_char *src, char *dst, socklen_t size);
 #endif /* USE_IPV6 */
 
 /* char *
@@ -50,14 +50,14 @@ static const char *egg_inet_ntop6 (const u_char *src, char *dst, socklen_t size)
  *	Paul Vixie, 1996.
  */
 const char *
-egg_inet_ntop(int af, const void *src, char *dst, socklen_t size)
+inet_ntop(int af, const void *src, char *dst, socklen_t size)
 {
 	switch (af) {
 	case AF_INET:
-		return (egg_inet_ntop4((const u_char *) src, dst, size));
+		return (inet_ntop4((const u_char *) src, dst, size));
 #ifdef USE_IPV6
 	case AF_INET6:
-		return (egg_inet_ntop6((const u_char *) src, dst, size));
+		return (inet_ntop6((const u_char *) src, dst, size));
 #endif /* USE_IPV6 */
 	default:
 		return (NULL);
@@ -77,7 +77,7 @@ egg_inet_ntop(int af, const void *src, char *dst, socklen_t size)
  *	Paul Vixie, 1996.
  */
 static const char *
-egg_inet_ntop4(const u_char *src, char *dst, socklen_t size)
+inet_ntop4(const u_char *src, char *dst, socklen_t size)
 {
 	static const char fmt[] = "%u.%u.%u.%u";
 	char tmp[sizeof "255.255.255.255"];
@@ -96,7 +96,7 @@ egg_inet_ntop4(const u_char *src, char *dst, socklen_t size)
  *	Paul Vixie, 1996.
  */
 static const char *
-egg_inet_ntop6(const u_char *src, char *dst, socklen_t size)
+inet_ntop6(const u_char *src, char *dst, socklen_t size)
 {
 	/*
 	 * Note that int32_t and int16_t need only be "at least" large enough
@@ -115,7 +115,7 @@ egg_inet_ntop6(const u_char *src, char *dst, socklen_t size)
 	 *	Copy the input (bytewise) array into a wordwise array.
 	 *	Find the longest run of 0x00's in src[] for :: shorthanding.
 	 */
-	egg_memset(words, '\0', sizeof words);
+	memset(words, '\0', sizeof words);
 	for (i = 0; i < NS_IN6ADDRSZ; i += 2)
 		words[i >> 1] = (src[i] << 8) | src[i + 1];
 	best.base = -1;
@@ -161,7 +161,7 @@ egg_inet_ntop6(const u_char *src, char *dst, socklen_t size)
 		/* Is this address an encapsulated IPv4? */
 		if (i == 6 && best.base == 0 &&
 		    (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
-			if (!egg_inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
+			if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
 				return (NULL);
 			tp += strlen(tp);
 			break;

+ 1 - 3
src/compat/inet_ntop.h

@@ -14,9 +14,7 @@
 #include <arpa/inet.h>
 
 #ifndef HAVE_INET_NTOP
-const char *egg_inet_ntop(int af, const void *src, char *dst, socklen_t size);
-#else
-#  define egg_inet_ntop inet_ntop
+const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
 #endif
 
 #endif /* !_EGG_COMPAT_INET_NTOP_H */

+ 1 - 1
src/compat/memcpy.c

@@ -8,7 +8,7 @@
 #include "memcpy.h"
 
 #ifndef HAVE_MEMCPY
-void *egg_memcpy(void *dest, const void *src, size_t n)
+void *memcpy(void *dest, const void *src, size_t n)
 {
   while (n--)
     *((char *) dest)++ = *((char *) src)++;

+ 1 - 3
src/compat/memcpy.h

@@ -12,9 +12,7 @@
 
 #ifndef HAVE_MEMCPY
 /* Use our own implementation. */
-void *egg_memcpy(void *dest, const void *src, size_t n);
-#else
-#  define egg_memcpy	memcpy
+void *memcpy(void *dest, const void *src, size_t n);
 #endif
 
 #endif	/* !__EGG_COMPAT_MEMCPY_H */

+ 1 - 1
src/compat/memset.c

@@ -8,7 +8,7 @@
 #include "memset.h"
 
 #ifndef HAVE_MEMSET
-void *egg_memset(void *dest, int c, size_t n)
+void *memset(void *dest, int c, size_t n)
 {
   while (n--)
     *((u_8bit_t *) dest)++ = c;

+ 3 - 4
src/compat/memset.h

@@ -12,13 +12,12 @@
 
 #ifndef HAVE_MEMSET
 /* Use our own implementation. */
-void *egg_memset(void *dest, int c, size_t n);
-#else
-#  define egg_memset	memset
+void *memset(void *dest, int c, size_t n);
 #endif
 
 /* Use memset instead of bzero.
  */
-#define egg_bzero(dest, n)	egg_memset(dest, 0, n)
+#undef bzero
+#define bzero(dest, n)	memset(dest, 0, n)
 
 #endif	/* !__EGG_COMPAT_MEMSET_H */

+ 3 - 3
src/compat/memutil.c

@@ -16,7 +16,7 @@ str_redup(char **str, const char *newstr)
         }
         len = strlen(newstr) + 1;
         *str = (char *) my_realloc(*str, len);
-        egg_memcpy(*str, newstr, len);
+        memcpy(*str, newstr, len);
 }
 
 char *
@@ -26,7 +26,7 @@ strdup(const char *entry)
   char *target = (char *) my_calloc(1, len + 1);
   if (target == NULL) return NULL;
   target[len] = 0;
-  return (char *) egg_memcpy(target, entry, len);
+  return (char *) memcpy(target, entry, len);
 }
 
 char *
@@ -37,7 +37,7 @@ strldup(const char *entry, size_t maxlen)
   char *target = (char *) my_calloc(1, len + 1);
   if (target == NULL) return NULL;
   target[len] = 0;
-  return (char *) egg_memcpy(target, entry, len);
+  return (char *) memcpy(target, entry, len);
 }
 
 

+ 2 - 2
src/compat/strcasecmp.c

@@ -8,7 +8,7 @@
 #include "memcpy.h"
 
 #ifndef HAVE_STRCASECMP
-int egg_strcasecmp(const char *s1, const char *s2)
+int strcasecmp(const char *s1, const char *s2)
 {
   while ((*s1) && (*s2) && (toupper(*s1) == toupper(*s2))) {
     s1++;
@@ -19,7 +19,7 @@ int egg_strcasecmp(const char *s1, const char *s2)
 #endif /* !HAVE_STRCASECMP */
 
 #ifndef HAVE_STRNCASECMP
-int egg_strncasecmp(const char *s1, const char *s2, size_t n)
+int strncasecmp(const char *s1, const char *s2, size_t n)
 {
   if (!n)
     return 0;

+ 2 - 6
src/compat/strcasecmp.h

@@ -13,16 +13,12 @@
 
 #ifndef HAVE_STRCASECMP
 /* Use our own implementation. */
-int egg_strcasecmp(const char *, const char *);
-#else
-#  define egg_strcasecmp	strcasecmp
+int strcasecmp(const char *, const char *);
 #endif
 
 #ifndef HAVE_STRNCASECMP
 /* Use our own implementation. */
-int egg_strncasecmp(const char *, const char *, size_t);
-#else
-#  define egg_strncasecmp	strncasecmp
+int strncasecmp(const char *, const char *, size_t);
 #endif
 
 #endif	/* !__EGG_COMPAT_STRCASECMP_H */

+ 1 - 1
src/compat/strftime.c

@@ -10,7 +10,7 @@
 #ifndef HAVE_STRFTIME
 #  undef emacs
 #  undef _LIBC
-#  define strftime	egg_strftime
+#  define strftime	strftime
 
 #  include "gnu_strftime.c"
 #endif	/* !HAVE_STRFTIME */

+ 1 - 3
src/compat/strftime.h

@@ -14,9 +14,7 @@
  * use our own.
  */
 #ifndef HAVE_STRFTIME
-size_t egg_strftime(char *s, size_t maxsize, const char *format, const struct tm *tp);
-#else
-#  define egg_strftime strftime
+size_t strftime(char *s, size_t maxsize, const char *format, const struct tm *tp);
 #endif
 
 #endif	/* !_EGG_COMPAT_STRFTIME_H_ */

+ 24 - 24
src/conf.c

@@ -120,7 +120,7 @@ spawnbots(conf_bot *bots, bool rehashed)
       -if updating and we find our nick, skip
       -if pid exists and not updating, bot is running and we have nothing more to do, skip.
      */
-    } else if ((conf.bot && !egg_strcasecmp(bot->nick, conf.bot->nick) && 
+    } else if ((conf.bot && !strcasecmp(bot->nick, conf.bot->nick) &&
                (updating == UPDATE_AUTO || rehashed)) || (bot->pid && !updating)) {
       sdprintf(STR(" ... skipping. Updating: %d, pid: %d"), updating, bot->pid);
       continue;
@@ -149,10 +149,10 @@ conf_killbot(conf_bot *bots, const char *botnick, conf_bot *bot, int signal, boo
       /* kill all bots but myself if botnick==NULL, otherwise just kill botnick */
       if ((!conf.bot) || 
           (!botnick && 
-             (conf.bot->nick && egg_strcasecmp(conf.bot->nick, bot->nick))) || 
+             (conf.bot->nick && strcasecmp(conf.bot->nick, bot->nick))) ||
           (botnick && 
-             ((notbotnick == 0 && !egg_strcasecmp(botnick, bot->nick)) || 
-              (notbotnick == 1 && egg_strcasecmp(botnick, bot->nick))
+             ((notbotnick == 0 && !strcasecmp(botnick, bot->nick)) ||
+              (notbotnick == 1 && strcasecmp(botnick, bot->nick))
              )  
           ) 
          ) {
@@ -427,7 +427,7 @@ checkpid(const char *nick, conf_bot *bot)
 
   if (bot && !(bot->pid_file))
     bot->pid_file = strdup(buf);
-  else if (bot && egg_strcasecmp(bot->pid_file, buf))
+  else if (bot && strcasecmp(bot->pid_file, buf))
     str_redup(&bot->pid_file, buf);
 
   if ((f = fopen(buf, "r"))) {
@@ -452,7 +452,7 @@ checkpid(const char *nick, conf_bot *bot)
 
 
     if (bufp[0] && pid && can_stat(bufp) && (getpid() == pid) &&
-        !egg_strncasecmp(nick, origbotnick, HANDLEN)) {
+        !strncasecmp(nick, origbotnick, HANDLEN)) {
       socksfile = strdup(bufp);
       return 0;
     }
@@ -560,7 +560,7 @@ conf_delbot(char *botn, bool kill)
   conf_bot *bot = NULL;
 
   for (bot = conf.bots; bot && bot->nick; bot = bot->next) {
-    if (!egg_strcasecmp(bot->nick, botn)) {     /* found it! */
+    if (!strcasecmp(bot->nick, botn)) {     /* found it! */
       if (kill) {
         bot->pid = checkpid(bot->nick, bot);
         conf_killbot(conf.bots, NULL, bot, SIGKILL);
@@ -720,45 +720,45 @@ readconf(const char *fname, int bits)
         if (!option || !line[0])
           continue;
 
-        if (!egg_strcasecmp(option, STR("autocron"))) {      /* automatically check/create crontab? */
+        if (!strcasecmp(option, STR("autocron"))) {      /* automatically check/create crontab? */
           if (egg_isdigit(line[0]))
             conf.autocron = atoi(line);
 
-        } else if (!egg_strcasecmp(option, STR("autouname"))) {      /* auto update uname contents? */
+        } else if (!strcasecmp(option, STR("autouname"))) {      /* auto update uname contents? */
           if (egg_isdigit(line[0]))
             conf.autouname = atoi(line);
 
-        } else if (!egg_strcasecmp(option, STR("username"))) {       /* shell username */
+        } else if (!strcasecmp(option, STR("username"))) {       /* shell username */
           str_redup(&conf.username, line);
 
-        } else if (!egg_strcasecmp(option, STR("homedir"))) {        /* homedir */
+        } else if (!strcasecmp(option, STR("homedir"))) {        /* homedir */
           str_redup(&conf.homedir, line);
 
-        } else if (!egg_strcasecmp(option, STR("datadir"))) {        /* datadir */
+        } else if (!strcasecmp(option, STR("datadir"))) {        /* datadir */
           str_redup(&conf.datadir, line);
 
-        } else if (!egg_strcasecmp(option, STR("binpath"))) {        /* path that the binary should move to? */
+        } else if (!strcasecmp(option, STR("binpath"))) {        /* path that the binary should move to? */
           str_redup(&conf.binpath, line);
 
-        } else if (!egg_strcasecmp(option, STR("binname"))) {        /* filename of the binary? */
+        } else if (!strcasecmp(option, STR("binname"))) {        /* filename of the binary? */
           str_redup(&conf.binname, line);
 
-        } else if (!egg_strcasecmp(option, STR("portmin"))) {
+        } else if (!strcasecmp(option, STR("portmin"))) {
           if (egg_isdigit(line[0]))
             conf.portmin = atoi(line);
 
-        } else if (!egg_strcasecmp(option, STR("portmax"))) {
+        } else if (!strcasecmp(option, STR("portmax"))) {
           if (egg_isdigit(line[0]))
             conf.portmax = atoi(line);
 
-        } else if (!egg_strcasecmp(option, STR("uid"))) {    /* new method uid */
+        } else if (!strcasecmp(option, STR("uid"))) {    /* new method uid */
           if (str_isdigit(line))
             conf.uid = atoi(line);
 
-        } else if (!egg_strcasecmp(option, STR("uname"))) {  /* new method uname */
+        } else if (!strcasecmp(option, STR("uname"))) {  /* new method uname */
           str_redup(&conf.uname, line);
 
-        } else if (!egg_strcasecmp(option, STR("watcher"))) {
+        } else if (!strcasecmp(option, STR("watcher"))) {
           if (egg_isdigit(line[0]))
             conf.watcher = atoi(line);
 
@@ -1010,12 +1010,12 @@ void deluser_removed_bots(conf_bot *oldlist, conf_bot *newlist)
     for (botold = oldlist; botold && botold->nick; botold = botold->next) {
       found = 0;
       for (botnew = newlist; botnew && botnew->nick; botnew = botnew->next) {
-        if (!egg_strcasecmp(botold->nick, botnew->nick)) {
+        if (!strcasecmp(botold->nick, botnew->nick)) {
           found = 1;
           break;
         }
       }
-      if (!found && egg_strcasecmp(botold->nick, origbotnick)) {	/* Never kill ME.. will handle it elsewhere */
+      if (!found && strcasecmp(botold->nick, origbotnick)) {	/* Never kill ME.. will handle it elsewhere */
 	/* No need to kill -- they are signalled and they will die on their own now */
         //botold->pid = checkpid(botold->nick, botold);
         //conf_killbot(conf.bots, NULL, botold, SIGKILL);
@@ -1054,10 +1054,10 @@ fill_conf_bot(bool fatal)
   sdprintf(STR("mynick: %s"), mynick);
 
   for (me = conf.bots; me && me->nick; me = me->next)
-    if (!egg_strcasecmp(me->nick, mynick))
+    if (!strcasecmp(me->nick, mynick))
       break;
 
-  if (fatal && (!me || (me->nick && egg_strcasecmp(me->nick, mynick))))
+  if (fatal && (!me || (me->nick && strcasecmp(me->nick, mynick))))
     werr(ERR_BADBOT);
 
   free(mynick);
@@ -1231,7 +1231,7 @@ void conf_setmypid(pid_t pid) {
   conf.bot->pid = pid;
   conf_bot *bot = conf.bots;
   if (conf.bots) {
-    for (; bot && egg_strcasecmp(bot->nick, conf.bot->nick); bot = bot->next)
+    for (; bot && strcasecmp(bot->nick, conf.bot->nick); bot = bot->next)
      ;
     if (bot)
       bot->pid = pid;

+ 6 - 6
src/core_binds.c

@@ -52,7 +52,7 @@ void core_binds_init()
         BT_bot = bind_table_add("bot", 3, "sss", MATCH_EXACT, 0);
         BT_chon = bind_table_add("chon", 2, "si", MATCH_MASK | MATCH_FLAGS, BIND_STACKABLE);
         BT_dcc = bind_table_add("dcc", 2, "is", MATCH_PARTIAL | MATCH_FLAGS, 0);
-	egg_bzero(&cmdlist, 500);
+	bzero(&cmdlist, 500);
         add_builtins("dcc", C_dcc);
         BT_nkch = bind_table_add("nkch", 2, "ss", MATCH_MASK, BIND_STACKABLE);
         BT_note = bind_table_add("note", 3 , "sss", MATCH_EXACT, 0);
@@ -72,7 +72,7 @@ bool check_aliases(int idx, const char *cmd, const char *args)
 
   while ((a = strsep(&aliasdup, ","))) { //a = entire alias "alias cmd params"
     p = newsplit(&a);   //p = alias //a = cmd params
-    if (!egg_strcasecmp(p, cmd)) { //a match on the cmd we were given!
+    if (!strcasecmp(p, cmd)) { //a match on the cmd we were given!
       p = newsplit(&a); //p = cmd //a = params
 
       /*
@@ -82,7 +82,7 @@ bool check_aliases(int idx, const char *cmd, const char *args)
        */
 
       /* Simple loop check */
-      if (!egg_strcasecmp(cmd, p)) {
+      if (!strcasecmp(cmd, p)) {
         putlog(LOG_WARN, "*", "Loop detected in alias '%s'", p);
         if (argsp)
           free(argsp);
@@ -93,7 +93,7 @@ bool check_aliases(int idx, const char *cmd, const char *args)
       bool find = 0;
       table = bind_table_lookup("dcc");
       for (entry = table->entries; entry && entry->next; entry = entry->next) {
-        if (!egg_strncasecmp(p, entry->mask, strlen(p))) {
+        if (!strncasecmp(p, entry->mask, strlen(p))) {
           find = 1;
           break;
         }
@@ -179,12 +179,12 @@ void real_check_bind_dcc(const char *cmd, int idx, const char *text, Auth *auth)
   int hits = 0;
 
   for (entry = table->entries; entry && entry->next; entry = entry->next)
-    if (!egg_strncasecmp(cmd, entry->mask, cmdlen))
+    if (!strncasecmp(cmd, entry->mask, cmdlen))
       ++hits;
  
   if (hits == 1) {
     for (entry = table->entries; entry && entry->next; entry = entry->next) {
-      if (!egg_strncasecmp(cmd, entry->mask, cmdlen)) {
+      if (!strncasecmp(cmd, entry->mask, cmdlen)) {
         if (has_cmd_pass(entry->mask)) {
           if (flagrec_ok(&entry->user_flags, &fr)) {
             char *p = NULL, work[1024] = "", pass[MAXPASSLEN + 1] = "";

+ 3 - 3
src/crypt.c

@@ -32,12 +32,12 @@ encrypt_binary(const char *keydata, unsigned char *in, size_t *inlen)
     len += (CRYPT_BLOCKSIZE - (len % CRYPT_BLOCKSIZE));
 
   out = (unsigned char *) my_calloc(1, len + 1);
-  egg_memcpy(out, in, *inlen);
+  memcpy(out, in, *inlen);
   *inlen = len;
 
   if (!keydata || !*keydata) {
     /* No key, no encryption */
-    egg_memcpy(out, in, len);
+    memcpy(out, in, len);
   } else {
     char key[CRYPT_KEYSIZE + 1] = "";
 
@@ -62,7 +62,7 @@ decrypt_binary(const char *keydata, unsigned char *in, size_t *len)
 
   *len -= *len % CRYPT_BLOCKSIZE;
   out = (unsigned char *) my_calloc(1, *len + 1);
-  egg_memcpy(out, in, *len);
+  memcpy(out, in, *len);
 
   if (!keydata || !*keydata) {
     /* No key, no decryption */

+ 2 - 2
src/crypto/md32_common.h

@@ -494,7 +494,7 @@ int HASH_UPDATE (HASH_CTX *c, const void *data_, unsigned long len)
 #if !defined(HASH_BLOCK_DATA_ORDER)
 			while (sw--)
 				{
-				egg_memcpy (p=c->data,data,HASH_CBLOCK);
+				memcpy (p=c->data,data,HASH_CBLOCK);
 				HASH_BLOCK_DATA_ORDER_ALIGNED(c,p,1);
 				data+=HASH_CBLOCK;
 				len-=HASH_CBLOCK;
@@ -537,7 +537,7 @@ void HASH_TRANSFORM (HASH_CTX *c, const unsigned char *data)
 	else
 #if !defined(HASH_BLOCK_DATA_ORDER)
 		{
-		egg_memcpy (c->data,data,HASH_CBLOCK);
+		memcpy (c->data,data,HASH_CBLOCK);
 		HASH_BLOCK_DATA_ORDER_ALIGNED (c,c->data,1);
 		}
 #endif

+ 17 - 17
src/dcc.c

@@ -163,11 +163,11 @@ send_sysinfo()
   uarch = gotun ? un.machine : "*";
   uosver = gotun ? un.release : "*";
 
-  if (((sysname && egg_strcasecmp(sysname, usysname)) ||
-       (username && egg_strcasecmp(username, uusername)) ||
-       (nodename && egg_strcasecmp(nodename, unodename)) ||
-       (arch && egg_strcasecmp(arch, uarch)) ||
-       (osver && egg_strcasecmp(osver, uosver))
+  if (((sysname && strcasecmp(sysname, usysname)) ||
+       (username && strcasecmp(username, uusername)) ||
+       (nodename && strcasecmp(nodename, unodename)) ||
+       (arch && strcasecmp(arch, uarch)) ||
+       (osver && strcasecmp(osver, uosver))
       ) ||
       ((!sysname && usysname) || 
        (!username && uusername) || 
@@ -370,13 +370,13 @@ dcc_bot_new(int idx, char *buf, int x)
 
   strip_telnet(dcc[idx].sock, buf, &x);
   code = newsplit(&buf);
-  if (!egg_strcasecmp(code, "goodbye!")) {
+  if (!strcasecmp(code, "goodbye!")) {
     greet_new_bot(idx);
-  } else if (!egg_strcasecmp(code, "v")) {
+  } else if (!strcasecmp(code, "v")) {
     bot_version(idx, buf);
-  } else if (!egg_strcasecmp(code, STR("neg!"))) {	/* something to parse in enclink.c */
+  } else if (!strcasecmp(code, STR("neg!"))) {	/* something to parse in enclink.c */
     link_parse(idx, buf);
-  } else if (!egg_strcasecmp(code, STR("neg?"))) {	/* we're connecting to THEM */
+  } else if (!strcasecmp(code, STR("neg?"))) {	/* we're connecting to THEM */
     int snum = findanysnum(dcc[idx].sock);
 
     if (snum >= 0) {
@@ -402,7 +402,7 @@ dcc_bot_new(int idx, char *buf, int x)
       socklist[snum].enclink = i;
       link_link(idx, -1, i, TO);
     }
-  } else if (!egg_strcasecmp(code, "error")) {
+  } else if (!strcasecmp(code, "error")) {
     putlog(LOG_MISC, "*", "ERROR linking %s: %s", dcc[idx].nick, buf);
     killsock(dcc[idx].sock);
     lostdcc(idx);
@@ -965,9 +965,9 @@ dcc_chat_pass(int idx, char *buf, int atr)
   pass = newsplit(&buf);
 
   if (dcc[idx].user->bot) {
-    if (!egg_strcasecmp(pass, STR("neg!"))) {		/* we're the hub */
+    if (!strcasecmp(pass, STR("neg!"))) {		/* we're the hub */
       link_parse(idx, buf);
-    } else if (!egg_strcasecmp(pass, STR("neg."))) {		/* we're done, link up! */
+    } else if (!strcasecmp(pass, STR("neg."))) {		/* we're done, link up! */
       dcc[idx].type = &DCC_BOT_NEW;
       dcc[idx].u.bot = (struct bot_info *) my_calloc(1, sizeof(struct bot_info));
       dcc[idx].status = STAT_CALLED;
@@ -975,7 +975,7 @@ dcc_chat_pass(int idx, char *buf, int atr)
       greet_new_bot(idx);
       if (conf.bot->hub)
         send_timesync(idx);
-    } else if (!egg_strcasecmp(pass, STR("neg"))) {
+    } else if (!strcasecmp(pass, STR("neg"))) {
       int snum = findanysnum(dcc[idx].sock);
 
       if (snum >= 0) {
@@ -1007,7 +1007,7 @@ dcc_chat_pass(int idx, char *buf, int atr)
         if (buf[0]) {
           const char *expected_nick = newsplit(&buf);
 
-          if (egg_strcasecmp(expected_nick, conf.bot->nick)) {
+          if (strcasecmp(expected_nick, conf.bot->nick)) {
             putlog(LOG_WARN, "*", STR("%s failed encrypted link handshake (was expecting '%s' instead of me)"), dcc[idx].nick, expected_nick);
             killsock(dcc[idx].sock);
             lostdcc(idx);
@@ -1323,7 +1323,7 @@ detect_telnet_flood(char *floodhost)
   get_user_flagrec(get_user_by_host(floodhost), &fr, NULL);
   if (!flood_telnet_thr || glob_noflood(fr))
     return 0;                   /* No flood protection */
-  if (egg_strcasecmp(lasttelnethost, floodhost)) {      /* New... */
+  if (strcasecmp(lasttelnethost, floodhost)) {      /* New... */
     strlcpy(lasttelnethost, floodhost, sizeof(lasttelnethost));
     lasttelnettime = now;
     lasttelnets = 0;
@@ -1618,7 +1618,7 @@ void
 dupwait_notify(const char *who)
 {
   for (register int idx = 0; idx < dcc_total; idx++)
-    if (dcc[idx].type && (dcc[idx].type == &DCC_DUPWAIT) && !egg_strcasecmp(dcc[idx].nick, who)) {
+    if (dcc[idx].type && (dcc[idx].type == &DCC_DUPWAIT) && !strcasecmp(dcc[idx].nick, who)) {
       dcc_telnet_pass(idx, dcc[idx].u.dupwait->atr);
       break;
     }
@@ -1683,7 +1683,7 @@ dcc_telnet_id(int idx, char *buf, int atr)
   correct_handle(nick);
   strlcpy(dcc[idx].nick, nick, NICKLEN);
   if (dcc[idx].user->bot) {
-    if (!egg_strcasecmp(conf.bot->nick, dcc[idx].nick)) {
+    if (!strcasecmp(conf.bot->nick, dcc[idx].nick)) {
       putlog(LOG_BOTS, "*", "Refused telnet connection from %s (tried using my botnetnick)", dcc[idx].host);
       killsock(dcc[idx].sock);
       lostdcc(idx);

+ 4 - 4
src/dccutil.c

@@ -562,7 +562,7 @@ lostdcc(int n)
 
 //  This is also done when we new_dcc(), so don't bother for now, we set sock/type to NULL, so it won't even be 
 //  parsed by anything.
-//  egg_bzero(&dcc[n], sizeof(struct dcc_t));
+//  bzero(&dcc[n], sizeof(struct dcc_t));
 
   dcc[n].sock = -1;
   dcc[n].type = NULL;
@@ -721,7 +721,7 @@ new_dcc(struct dcc_table *type, int xtra_size)
   dccn++;
 
   /* empty out the memory for the entry */
-  egg_bzero((char *) &dcc[i], sizeof(struct dcc_t));
+  bzero((char *) &dcc[i], sizeof(struct dcc_t));
 
   dcc[i].type = type;
   if (xtra_size)
@@ -1070,7 +1070,7 @@ int check_cmd_pass(const char *cmd, char *pass)
   struct cmd_pass *cp = NULL;
 
   for (cp = cmdpass; cp; cp = cp->next)
-    if (!egg_strcasecmp(cmd, cp->name)) {
+    if (!strcasecmp(cmd, cp->name)) {
       char *epass = NULL;
 
       /* Does the old pass need to be converted? */
@@ -1111,7 +1111,7 @@ int has_cmd_pass(const char *cmd)
   struct cmd_pass *cp = NULL;
 
   for (cp = cmdpass; cp; cp = cp->next)
-    if (!egg_strcasecmp(cmd, cp->name))
+    if (!strcasecmp(cmd, cp->name))
       return 1;
   return 0;
 }

+ 2 - 2
src/debug.c

@@ -101,8 +101,8 @@ void init_debug()
     Context;
 
 #ifdef DEBUG_CONTEXT
-  egg_bzero(&cx_file, sizeof cx_file);
-  egg_bzero(&cx_note, sizeof cx_note);
+  bzero(&cx_file, sizeof cx_file);
+  bzero(&cx_note, sizeof cx_note);
 #endif /* DEBUG_CONTEXT */
 }
 

+ 2 - 2
src/enclink.c

@@ -56,7 +56,7 @@ static void ghost_link_case(int idx, direction_t direction)
       struct sockaddr_in sa;
       socklen_t socklen = sizeof(sa);
 
-      egg_bzero(&sa, socklen);
+      bzero(&sa, socklen);
       getsockname(socklist[snum].sock, (struct sockaddr *) &sa, &socklen);
       port = sa.sin_port;
     }
@@ -191,7 +191,7 @@ void ghost_parse(int idx, int snum, char *buf)
 
   char *code = newsplit(&buf);
 
-  if (!egg_strcasecmp(code, STR("elink"))) {
+  if (!strcasecmp(code, STR("elink"))) {
     const char salt2[] = SALT2;
     char *tmp = decrypt_string(salt2, newsplit(&buf));
 

+ 6 - 6
src/flags.c

@@ -160,10 +160,10 @@ break_down_flags(const char *string, struct flag_record *plus, struct flag_recor
     else
       return;                   /* We dont actually want any..huh? */
   }
-  egg_bzero(plus, sizeof(struct flag_record));
+  bzero(plus, sizeof(struct flag_record));
 
   if (minus)
-    egg_bzero(minus, sizeof(struct flag_record));
+    bzero(minus, sizeof(struct flag_record));
 
   plus->match = FR_OR;          /* Default binding type OR */
   while (*string) {
@@ -624,13 +624,13 @@ int deflag_translate(const char *buf)
   if (str_isdigit(buf))
     return (atoi(buf));
 
-  if (!egg_strcasecmp(buf, "ignore"))
+  if (!strcasecmp(buf, "ignore"))
     return P_IGNORE;
-  else if (!egg_strcasecmp(buf, "deop"))
+  else if (!strcasecmp(buf, "deop"))
     return P_DEOP;
-  else if (!egg_strcasecmp(buf, "kick"))
+  else if (!strcasecmp(buf, "kick"))
     return P_KICK;
-  else if (!egg_strcasecmp(buf, "delete") || !egg_strcasecmp(buf, "remove"))
+  else if (!strcasecmp(buf, "delete") || !strcasecmp(buf, "remove"))
     return P_DELETE;
   return P_IGNORE;
 }

+ 7 - 7
src/log.c

@@ -170,7 +170,7 @@ void logfile_close(void)
 
   char date[50] = "";
 
-  egg_strftime(date, sizeof date, "%c %Z", gmtime(&now));
+  strftime(date, sizeof date, "%c %Z", gmtime(&now));
   fprintf(logf, "--- Log session end: %s ---\n", date);
   fclose(logf);
   logf = NULL;  
@@ -193,7 +193,7 @@ bool logfile_open()
 
   char date[50] = "";
 
-  egg_strftime(date, sizeof date, "%c %Z", gmtime(&now));
+  strftime(date, sizeof date, "%c %Z", gmtime(&now));
   fprintf(logf, "--- Log session begin: %s ---\n", date);
   return 1;
 }
@@ -222,7 +222,7 @@ void logfile(int type, const char *msg)
 //  if (!logfile_stat(".l"))
 //    return;
 
-  if (!egg_strncasecmp(msg, log_last, sizeof(log_last))) {
+  if (!strncasecmp(msg, log_last, sizeof(log_last))) {
     repeats++;
     return;
   }
@@ -265,8 +265,8 @@ void putlog(int type, const char *chname, const char *format, ...)
 
   if (!log_repeated) {
     if (type == last_type && 
-        !egg_strncasecmp(chname, last_chname, sizeof(last_chname)) && 
-        !egg_strncasecmp(va_out, last_log, sizeof(last_log))) {
+        !strncasecmp(chname, last_chname, sizeof(last_chname)) &&
+        !strncasecmp(va_out, last_log, sizeof(last_log))) {
       ++log_repeats;
 
       return;
@@ -294,7 +294,7 @@ void putlog(int type, const char *chname, const char *format, ...)
     char stamp[34] = "";
     struct tm *t = gmtime(&now);
 
-    egg_strftime(stamp, sizeof(stamp), LOG_TS, t);
+    strftime(stamp, sizeof(stamp), LOG_TS, t);
     /* Place the timestamp in the string to be printed */
     strlcpy(out, stamp, sizeof(out));
     strlcat(out, " ", sizeof(out));
@@ -341,7 +341,7 @@ irc_log(struct chanset_t *chan, const char *format, ...)
   egg_vsnprintf(va_out, sizeof(va_out), format, va);
   va_end(va);
 
-  if ((chan && egg_strcasecmp(chan->dname, "#!obs")) || !chan)
+  if ((chan && strcasecmp(chan->dname, "#!obs")) || !chan)
     dprintf(DP_HELP, "PRIVMSG %s :[%s] %s\n", relay_chan, chan ? chan->dname : "*" , va_out);
 /*
   chanout_but(-1, 1, "[%s] %s\n", chan->dname, va_out);

+ 5 - 5
src/main.c

@@ -428,7 +428,7 @@ static void dtx_arg(int& argc, char *argv[])
       {
         char date[50] = "";
 
-        egg_strftime(date, sizeof date, "%c %Z", gmtime(&buildts));
+        strftime(date, sizeof date, "%c %Z", gmtime(&buildts));
 	printf(STR("%s\nBuild Date: %s (%s%lu%s)\n"), version, date, BOLD(-1), buildts, BOLD_END(-1));
         printf(STR("BuildOS: %s%s%s BuildArch: %s%s%s\n"), BOLD(-1), BUILD_OS, BOLD_END(-1), BOLD(-1), BUILD_ARCH, BOLD_END(-1));
 	printf(STR("pack: %d conf: %d settings_t: %d prefix: %d pad: %d\n"), SIZE_PACK, SIZE_CONF, sizeof(settings_t), PREFIXLEN, SIZE_PAD);
@@ -506,8 +506,8 @@ static void event_resettraffic()
 	traffic.in_total.trans += traffic.in_today.trans;
 	traffic.in_total.unknown += traffic.in_today.unknown;
 
-	egg_memset(&traffic.out_today, 0, sizeof(traffic.out_today));
-	egg_memset(&traffic.in_today, 0, sizeof(traffic.in_today));
+	memset(&traffic.out_today, 0, sizeof(traffic.out_today));
+	memset(&traffic.in_today, 0, sizeof(traffic.in_today));
 }
 
 static void core_secondly()
@@ -534,7 +534,7 @@ static void core_secondly()
       ++ison_cnt;
   }
 
-  egg_memcpy(&nowtm, gmtime(&now), sizeof(struct tm));
+  memcpy(&nowtm, gmtime(&now), sizeof(struct tm));
   if (nowtm.tm_min != lastmin) {
     int i = 0;
 
@@ -791,7 +791,7 @@ printf("out: %s\n", out);
   simple_snprintf(ver, sizeof(ver), STR("[%s] Wraith %s"), settings.packname, egg_version);
   simple_snprintf(version, sizeof(version), STR("%s (%lu)"), ver, buildts);
 
-  egg_memcpy(&nowtm, gmtime(&now), sizeof(struct tm));
+  memcpy(&nowtm, gmtime(&now), sizeof(struct tm));
   lastmin = nowtm.tm_min;
 
   if (argc)

+ 2 - 2
src/match.c

@@ -293,8 +293,8 @@ match_cidr(const char *m, const char *a)
 #endif
 
   sockname_t ipaddr, maskaddr;
-  egg_bzero(&ipaddr, sizeof(ipaddr));
-  egg_bzero(&maskaddr, sizeof(maskaddr));
+  bzero(&ipaddr, sizeof(ipaddr));
+  bzero(&maskaddr, sizeof(maskaddr));
 
   if (!strchr(ip, ':') && !strchr(ipmask, ':'))
     aftype = ipaddr.family = maskaddr.family =  AF_INET;

+ 5 - 5
src/misc.c

@@ -307,7 +307,7 @@ void daysago(time_t mynow, time_t then, char *out, size_t outsiz)
     simple_snprintf(out, outsiz, "%d day%s ago", mydays, (mydays == 1) ? "" : "s");
     return;
   }
-  egg_strftime(out, 6, "%H:%M", gmtime(&then));
+  strftime(out, 6, "%H:%M", gmtime(&then));
 }
 
 /* Convert an interval (in seconds) to one of:
@@ -321,7 +321,7 @@ void days(time_t mynow, time_t then, char *out, size_t outsiz)
     simple_snprintf(out, outsiz, "in %d day%s", mydays, (mydays == 1) ? "" : "s");
     return;
   }
-  egg_strftime(out, 9, "at %H:%M", gmtime(&now));
+  strftime(out, 9, "at %H:%M", gmtime(&now));
 }
 
 /* Convert an interval (in seconds) to one of:
@@ -384,7 +384,7 @@ void show_motd(int idx)
     buf = buf_ptr = strdup(motd);
     who = newsplit(&buf);
     when = atoi(newsplit(&buf));
-    egg_strftime(date, sizeof date, "%c %Z", gmtime(&when));
+    strftime(date, sizeof date, "%c %Z", gmtime(&when));
     dprintf(idx, "Motd set by %s%s%s (%s)\n", BOLD(idx), who, BOLD_END(idx), date);
     dumplots(idx, "* ", replace(buf, "\\n", "\n"));
     dprintf(idx, " \n");
@@ -1040,7 +1040,7 @@ char *replace(const char *string, const char *oldie, const char *newbie)
   static char newstring_buf[REPLACES][1024];
   char *newstring = newstring_buf[n++];
 
-  egg_memset(newstring, 0, 1024);
+  memset(newstring, 0, 1024);
   if (n == REPLACES)
     n = 0;
 
@@ -1158,7 +1158,7 @@ void shuffle(char *string, char *delim, size_t str_len)
   char *array[501], *str = NULL, *work = NULL;
   size_t len = 0;
 
-  egg_bzero(&array, sizeof array);
+  bzero(&array, sizeof array);
   work = strdup(string);
 
   str = strtok(work, delim);

+ 1 - 1
src/mod/channels.mod/channels.c

@@ -161,7 +161,7 @@ parsebots(char *bots, char *botn) {
     char *list = strdup(bots), *bot = strtok(list, ",");
 
     while(bot && *bot) {
-      if (!egg_strcasecmp(bot, botn))
+      if (!strcasecmp(bot, botn))
         return 1;
       bot = strtok((char*) NULL, ",");
     }

+ 11 - 11
src/mod/channels.mod/cmdschan.c

@@ -319,10 +319,10 @@ static void cmd_masks(const char type, int idx, char *par)
 {
   const char *str_type = (type == 'b' ? "ban" : type == 'e' ? "exempt" : "invite");
 
-  if (!egg_strcasecmp(par, "all")) {
+  if (!strcasecmp(par, "all")) {
     putlog(LOG_CMDS, "*", "#%s# %ss all", dcc[idx].nick, str_type);
     tell_masks(type, idx, 1, "");
-  } else if (!egg_strcasecmp(par, "global")) {
+  } else if (!strcasecmp(par, "global")) {
     putlog(LOG_CMDS, "*", "#%s# %ss global", dcc[idx].nick, str_type);
     tell_masks(type, idx, 1, "", 1);
   } else {
@@ -389,7 +389,7 @@ static void cmd_info(int idx, char *par)
     dprintf(idx, "Your info line is locked.  Sorry.\n");
     return;
   }
-  if (!egg_strcasecmp(par, "none")) {
+  if (!strcasecmp(par, "none")) {
     if (chname) {
       par[0] = 0;
       set_handle_chaninfo(userlist, dcc[idx].nick, chname, NULL);
@@ -465,7 +465,7 @@ static void cmd_chinfo(int idx, char *par)
     }
   }
   putlog(LOG_CMDS, "*", "#%s# chinfo %s %s %s", dcc[idx].nick, handle, chname ? chname : par, chname ? par : "");
-  if (!egg_strcasecmp(par, "none"))
+  if (!strcasecmp(par, "none"))
     par[0] = 0;
   if (chname) {
     set_handle_chaninfo(userlist, handle, chname, par);
@@ -666,9 +666,9 @@ static void cmd_stick_yn(int idx, char *par, int yn)
   stick_type = newsplit(&par);
   strlcpy(s, newsplit(&par), sizeof s);
   strlcpy(chname, newsplit(&par), sizeof chname);
-  if (egg_strcasecmp(stick_type, "exempt") &&
-      egg_strcasecmp(stick_type, "invite") &&
-      egg_strcasecmp(stick_type, "ban")) {
+  if (strcasecmp(stick_type, "exempt") &&
+      strcasecmp(stick_type, "invite") &&
+      strcasecmp(stick_type, "ban")) {
     strlcpy(chname, s, sizeof chname);
     strlcpy(s, stick_type, sizeof s);
     stick_type = "ban";
@@ -678,13 +678,13 @@ static void cmd_stick_yn(int idx, char *par, int yn)
     return;
   }
   /* Now deal with exemptions */
-  if (!egg_strcasecmp(stick_type, "exempt")) {
+  if (!strcasecmp(stick_type, "exempt")) {
     type = 'e';
     str_type = "exempt";
-  } else if (!egg_strcasecmp(stick_type, "invite")) {
+  } else if (!strcasecmp(stick_type, "invite")) {
     type = 'I';
     str_type = "invite";
-  } else if (!egg_strcasecmp(stick_type, "ban")) {
+  } else if (!strcasecmp(stick_type, "ban")) {
     type = 'b';
     str_type = "ban";
   } else
@@ -1186,7 +1186,7 @@ static void cmd_chaninfo(int idx, char *par)
     int deflag = 0;
 
     if (chan->added_ts) {
-      egg_strftime(date, sizeof date, "%c %Z", gmtime(&(chan->added_ts)));
+      strftime(date, sizeof date, "%c %Z", gmtime(&(chan->added_ts)));
     } else
       date[0] = 0;
     if (chan->added_by && chan->added_by[0])

+ 5 - 5
src/mod/channels.mod/tclchan.c

@@ -284,13 +284,13 @@ int SplitList(char *resultBuf, const char *list, int *argcPtr, const char ***arg
         argv[i] = p;
 
         if (brace) {
-            egg_memcpy(p, element, elSize);
+            memcpy(p, element, elSize);
             p += elSize;
             *p = 0;
             p++;
         } else {
 /*            CopyAndCollapse(elSize, element, p); */
-            egg_memcpy(p, element, elSize);
+            memcpy(p, element, elSize);
             p += elSize + 1;
         }
     }
@@ -484,11 +484,11 @@ int channel_modify(char *result, struct chanset_t *chan, int items, char **item,
         return ERROR;
       }
       if (!str_isdigit(item[i])) {
-        if (!egg_strcasecmp("Op",  item[i]))
+        if (!strcasecmp("Op",  item[i]))
           chan->flood_exempt_mode = FLOOD_EXEMPT_OP;
-        else if (!egg_strcasecmp("Voice", item[i]))
+        else if (!strcasecmp("Voice", item[i]))
           chan->flood_exempt_mode = FLOOD_EXEMPT_VOICE;
-        else if (!egg_strcasecmp("None", item[i]))
+        else if (!strcasecmp("None", item[i]))
           chan->flood_exempt_mode = 0;
       } else
         chan->flood_exempt_mode = atoi(item[i]);

+ 1 - 1
src/mod/channels.mod/userchan.c

@@ -974,7 +974,7 @@ bool expired_mask(struct chanset_t *chan, char *who)
   m = ismember(chan, snick);
   if (!m)
     for (m2 = chan->channel.member; m2 && m2->nick[0]; m2 = m2->next)
-      if (!egg_strcasecmp(sfrom, m2->userhost)) {
+      if (!strcasecmp(sfrom, m2->userhost)) {
 	m = m2;
 	break;
       }

+ 25 - 25
src/mod/ctcp.mod/ctcp.c

@@ -511,7 +511,7 @@ static int ctcp_INVITE_UNBAN(char *nick, char *uhost, struct userrec *u, char *o
       *p = 0;
     while (chan) {
       if (chan->status & CHAN_ACTIVE) {
-        if (!egg_strcasecmp(chan->name, chname)) {
+        if (!strcasecmp(chan->name, chname)) {
           dprintf(DP_HELP, "NOTICE %s :\002BitchX\002: Access Denied\n", nick);
           return BIND_RET_LOG;
         }
@@ -544,51 +544,51 @@ static int ctcp_CLIENTINFO(char *nick, char *uhost, struct userrec *u, char *obj
 
   if (!text[0]) {
     strlcpy(buf, "SED UTC ACTION DCC CDCC BDCC XDCC VERSION CLIENTINFO USERINFO ERRMSG FINGER TIME PING ECHO INVITE WHOAMI OP OPS UNBAN IDENT XLINK UPTIME :Use CLIENTINFO <COMMAND> to get more specific information", sizeof(buf));
-  } else if (!egg_strcasecmp(text, "UNBAN"))
+  } else if (!strcasecmp(text, "UNBAN"))
     strlcpy(buf, "UNBAN unbans the person from channel", sizeof(buf));
-  else if (!egg_strcasecmp(text, "OPS"))
+  else if (!strcasecmp(text, "OPS"))
     strlcpy(buf, "OPS ops the person if on userlist", sizeof(buf));
-  else if (!egg_strcasecmp(text, "ECHO"))
+  else if (!strcasecmp(text, "ECHO"))
     strlcpy(buf, "ECHO returns the arguments it receives", sizeof(buf));
-  else if (!egg_strcasecmp(text, "WHOAMI"))
+  else if (!strcasecmp(text, "WHOAMI"))
     strlcpy(buf, "WHOAMI user list information", sizeof(buf));
-  else if (!egg_strcasecmp(text, "INVITE"))
+  else if (!strcasecmp(text, "INVITE"))
     strlcpy(buf, "INVITE invite to channel specified", sizeof(buf));
-  else if (!egg_strcasecmp(text, "PING"))
+  else if (!strcasecmp(text, "PING"))
     strlcpy(buf, "PING returns the arguments it receives", sizeof(buf));
-  else if (!egg_strcasecmp(text, "UTC"))
+  else if (!strcasecmp(text, "UTC"))
     strlcpy(buf, "UTC substitutes the local timezone", sizeof(buf));
-  else if (!egg_strcasecmp(text, "XDCC"))
+  else if (!strcasecmp(text, "XDCC"))
     strlcpy(buf, "XDCC checks cdcc info for you", sizeof(buf));
-  else if (!egg_strcasecmp(text, "BDCC"))
+  else if (!strcasecmp(text, "BDCC"))
     strlcpy(buf, "BDCC checks cdcc info for you", sizeof(buf));
-  else if (!egg_strcasecmp(text, "CDCC"))
+  else if (!strcasecmp(text, "CDCC"))
     strlcpy(buf, "CDCC checks cdcc info for you", sizeof(buf));
-  else if (!egg_strcasecmp(text, "DCC"))
+  else if (!strcasecmp(text, "DCC"))
     strlcpy(buf, "DCC requests a direct_client_connection", sizeof(buf));
-  else if (!egg_strcasecmp(text, "ACTION"))
+  else if (!strcasecmp(text, "ACTION"))
     strlcpy(buf, "ACTION contains action descriptions for atmosphere", sizeof(buf));
-  else if (!egg_strcasecmp(text, "FINGER"))
+  else if (!strcasecmp(text, "FINGER"))
     strlcpy(buf, "FINGER shows real name, login name and idle time of user", sizeof(buf));
-  else if (!egg_strcasecmp(text, "ERRMSG"))
+  else if (!strcasecmp(text, "ERRMSG"))
     strlcpy(buf, "ERRMSG returns error messages", sizeof(buf));
-  else if (!egg_strcasecmp(text, "USERINFO"))
+  else if (!strcasecmp(text, "USERINFO"))
     strlcpy(buf, "USERINFO returns user settable information", sizeof(buf));
-  else if (!egg_strcasecmp(text, "CLIENTINFO"))
+  else if (!strcasecmp(text, "CLIENTINFO"))
     strlcpy(buf, "CLIENTINFO gives information about available CTCP commands", sizeof(buf));
-  else if (!egg_strcasecmp(text, "SED"))
+  else if (!strcasecmp(text, "SED"))
     strlcpy(buf, "SED contains simple_encrypted_data", sizeof(buf));
-  else if (!egg_strcasecmp(text, "OP"))
+  else if (!strcasecmp(text, "OP"))
     strlcpy(buf, "OP ops the person if on userlist", sizeof(buf));
-  else if (!egg_strcasecmp(text, "VERSION"))
+  else if (!strcasecmp(text, "VERSION"))
     strlcpy(buf, "VERSION shows client type, version and environment", sizeof(buf));
-  else if (!egg_strcasecmp(text, "XLINK"))
+  else if (!strcasecmp(text, "XLINK"))
     strlcpy(buf, "XLINK x-filez rule", sizeof(buf));
-  else if (!egg_strcasecmp(text, "IDENT"))
+  else if (!strcasecmp(text, "IDENT"))
     strlcpy(buf, "IDENT change userhost of userlist", sizeof(buf));
-  else if (!egg_strcasecmp(text, "TIME"))
+  else if (!strcasecmp(text, "TIME"))
     strlcpy(buf, "TIME tells you the time on the user's host", sizeof(buf));
-  else if (!egg_strcasecmp(text, "UPTIME"))
+  else if (!strcasecmp(text, "UPTIME"))
     strlcpy(buf, "UPTIME my uptime", sizeof(buf));
   else {
     dprintf(DP_HELP, "NOTICE %s :\001ERRMSG %s is not a valid function\001\n", nick, text);
@@ -663,7 +663,7 @@ void ctcp_init()
 #ifndef CYGWIN_HACKS
   struct utsname un;
 
-  egg_bzero(&un, sizeof(un));
+  bzero(&un, sizeof(un));
   if (!uname(&un)) {
     strlcpy(cloak_os, un.sysname, sizeof(cloak_os));
     strlcpy(cloak_osver, un.release, sizeof(cloak_osver));

+ 6 - 6
src/mod/irc.mod/chan.c

@@ -432,7 +432,7 @@ static bool detect_chan_flood(char *floodnick, char *floodhost, char *from,
   /* Okay, make sure i'm not flood-checking myself */
   if (match_my_nick(floodnick))
     return 0;
-  if (!egg_strcasecmp(floodhost, botuserhost))
+  if (!strcasecmp(floodhost, botuserhost))
     return 0;
   /* My user@host (?) */
 
@@ -1081,7 +1081,7 @@ void check_this_user(char *hand, int del, char *host)
     for (m = chan->channel.member; m && m->nick[0]; m = m->next) {
       simple_snprintf(s, sizeof(s), "%s!%s", m->nick, m->userhost);
       u = m->user ? m->user : get_user_by_host(s);
-      if ((u && !egg_strcasecmp(u->handle, hand) && del < 2) ||
+      if ((u && !strcasecmp(u->handle, hand) && del < 2) ||
 	  (!u && del == 2 && wild_match(host, s))) {
 	u = del ? NULL : u;
 	get_user_flagrec(u, &fr, chan->dname, chan);
@@ -1122,7 +1122,7 @@ take_massopline(char *op, char **to_op)
   register bool useop = 0;
   static char ret[182] = "";
 
-  egg_memset(ret, 0, sizeof(ret));
+  memset(ret, 0, sizeof(ret));
   for (register unsigned int i = 0; i < modesperline; i++) {
     if (*to_op[0] || op) {
       /* if 'op' then use it, then move on to to_op */
@@ -1157,7 +1157,7 @@ take_makeline(char *op, char *deops, unsigned int deopn, size_t deops_len)
   unsigned int pos = randint(deopn), i;
   static char ret[151] = "";
 
-  egg_memset(ret, 0, sizeof(ret));
+  memset(ret, 0, sizeof(ret));
   for (i = 0; i < n; i++) {
     if (opn && i == pos)
       strlcat(ret, "+o", sizeof(ret));
@@ -2459,7 +2459,7 @@ static int gotjoin(char *from, char *chname)
       bool splitjoin = 0;
 
       /* Net-join */
-      if (m && m->split && !egg_strcasecmp(m->userhost, uhost)) {
+      if (m && m->split && !strcasecmp(m->userhost, uhost)) {
         splitjoin = 1;
 	m->split = 0;
 	m->last = now;
@@ -2584,7 +2584,7 @@ static int gotjoin(char *from, char *chname)
         if (cache) {
           cache_chan_t *cchan = NULL;
 
-          if (egg_strcasecmp(cache->uhost, m->userhost)) {
+          if (strcasecmp(cache->uhost, m->userhost)) {
 
 
           }

+ 12 - 12
src/mod/irc.mod/cmdsirc.c

@@ -74,7 +74,7 @@ char *getnick(const char *handle, struct chanset_t *chan)
 
   for (register memberlist *m = chan->channel.member; m && m->nick[0]; m = m->next) {
     simple_snprintf(s, sizeof s, "%s!%s", m->nick, m->userhost);
-    if ((u = get_user_by_host(s)) && !egg_strcasecmp(u->handle, handle))
+    if ((u = get_user_by_host(s)) && !strcasecmp(u->handle, handle))
       return m->nick;
   }
   return NULL;
@@ -721,7 +721,7 @@ static void cmd_mmode(int idx, char *par)
 
   while (par && par[0]) {
     char *p = newsplit(&par);
-    if (!egg_strncasecmp(p, "bots=", 5)) {
+    if (!strncasecmp(p, "bots=", 5)) {
       p += 5;
       force_bots = atoi(p);
       if ((force_bots < 1) || (force_bots > chanbotcount)) {
@@ -731,7 +731,7 @@ static void cmd_mmode(int idx, char *par)
 	free(chanbots);
 	return;
       }
-    } else if (!egg_strncasecmp(p, "alines=", 7)) {
+    } else if (!strncasecmp(p, "alines=", 7)) {
       p += 7;
       force_alines = atoi(p);
       if (force_alines > 5)
@@ -744,7 +744,7 @@ static void cmd_mmode(int idx, char *par)
 	free(chanbots);
 	return;
       }
-    } else if (!egg_strncasecmp(p, "slines=", 7)) {
+    } else if (!strncasecmp(p, "slines=", 7)) {
       p += 7;
       force_slines = atoi(p);
       if ((force_slines < 1) || (force_slines > 20)) {
@@ -755,7 +755,7 @@ static void cmd_mmode(int idx, char *par)
 	free(chanbots);
 	return;
       }
-    } else if (!egg_strncasecmp(p, "overlap=", 8)) {
+    } else if (!strncasecmp(p, "overlap=", 8)) {
       p += 8;
       force_overlap = atoi(p);
       if ((force_overlap < 1) || (force_overlap > 8)) {
@@ -765,11 +765,11 @@ static void cmd_mmode(int idx, char *par)
 	free(chanbots);
 	return;
       }
-    } else if (!egg_strncasecmp(p, "bitch", 5)) {
+    } else if (!strncasecmp(p, "bitch", 5)) {
       bitch = 1;
-    } else if (!egg_strncasecmp(p, "simul", 5)) {
+    } else if (!strncasecmp(p, "simul", 5)) {
       simul = 1;
-    } else if (!egg_strncasecmp(p, "local", 5)) {
+    } else if (!strncasecmp(p, "local", 5)) {
       local = 1;
     } else {
       dprintf(idx, "Unrecognized option %s\n", p);
@@ -1495,9 +1495,9 @@ static void cmd_channel(int idx, char *par)
     for (m = chan->channel.member; m && m->nick[0]; m = m->next) {
       if (m->joined > 0) {
 	if ((now - (m->joined)) > 86400)
-	  egg_strftime(s, 6, "%d%b", gmtime(&(m->joined)));
+	  strftime(s, 6, "%d%b", gmtime(&(m->joined)));
 	else
-	  egg_strftime(s, 6, "%H:%M", gmtime(&(m->joined)));
+	  strftime(s, 6, "%H:%M", gmtime(&(m->joined)));
       } else
 	strlcpy(s, " --- ", sizeof s);
       if (m->user == NULL) {
@@ -1757,7 +1757,7 @@ static void cmd_adduser(int idx, char *par)
   }
   u = get_user_by_handle(userlist, hand);
   if (u && (u->flags & (USER_OWNER | USER_MASTER)) &&
-      !(atr & USER_OWNER) && egg_strcasecmp(dcc[idx].nick, hand)) {
+      !(atr & USER_OWNER) && strcasecmp(dcc[idx].nick, hand)) {
     dprintf(idx, "You can't add hostmasks to the bot owner/master.\n");
     return;
   }
@@ -1841,7 +1841,7 @@ static void cmd_deluser(int idx, char *par)
     dprintf(idx, "You can't remove a channel master!\n");
   } else if (glob_bot(victim) && !glob_owner(user)) {
     dprintf(idx, "You can't remove a bot!\n");
-  } else if (!glob_master(user) && egg_strcasecmp(dcc[idx].nick, added)) {
+  } else if (!glob_master(user) && strcasecmp(dcc[idx].nick, added)) {
     dprintf(idx, "Sorry, you may not delete this user as you did not add them.\n");
   } else {
     char buf[HANDLEN + 1] = "";

+ 3 - 3
src/mod/irc.mod/irc.c

@@ -297,14 +297,14 @@ static void cache_invite(struct chanset_t *chan, char *nick, char *host, char *h
   cache->bot = bot;
 
   /* if we find they have a host but it doesnt match the new host, wipe it */
-  if (host && cache->uhost[0] && egg_strcasecmp(cache->uhost, host))
+  if (host && cache->uhost[0] && strcasecmp(cache->uhost, host))
     cache->uhost[0] = 0;
 
   if (host && !cache->uhost[0])
     strlcpy(cache->uhost, host, sizeof(cache->uhost));
 
   /* if we find they have a handle but it doesnt match the new handle, wipe it */
-  if (handle && cache->handle[0] && egg_strcasecmp(cache->handle, handle))
+  if (handle && cache->handle[0] && strcasecmp(cache->handle, handle))
     cache->handle[0] = 0;
 
   if (handle && !cache->handle[0])
@@ -963,7 +963,7 @@ punish_badguy(struct chanset_t *chan, char *whobad,
   get_user_flagrec(u, &fr, chan->dname, chan);
 
   /* Get current time into a string */
-  egg_strftime(ct, sizeof ct, "%d %b %Z", gmtime(&now));
+  strftime(ct, sizeof ct, "%d %b %Z", gmtime(&now));
 
   /* Put together log and kick messages */
   reason[0] = 0;

+ 4 - 4
src/mod/server.mod/cmdsserv.c

@@ -114,7 +114,7 @@ static void cmd_clearqueue(int idx, char *par)
     dprintf(idx, "Usage: clearqueue <mode|server|help|all>\n");
     return;
   }
-  if (!egg_strcasecmp(par, "all")) {
+  if (!strcasecmp(par, "all")) {
     msgs = modeq.tot + mq.tot + hq.tot;
     msgq_clear(&modeq);
     msgq_clear(&mq);
@@ -123,7 +123,7 @@ static void cmd_clearqueue(int idx, char *par)
     double_warned = 0;
     dprintf(idx, "Removed %d message%s from all queues.\n", msgs, 
         (msgs != 1) ? "s" : "");
-  } else if (!egg_strcasecmp(par, "mode")) {
+  } else if (!strcasecmp(par, "mode")) {
     msgs = modeq.tot;
     msgq_clear(&modeq);
     if (mq.tot == 0)
@@ -131,13 +131,13 @@ static void cmd_clearqueue(int idx, char *par)
     double_warned = 0;
     dprintf(idx, "Removed %d message%s from the mode queue.\n", msgs, 
         (msgs != 1) ? "s" : "");
-  } else if (!egg_strcasecmp(par, "help")) {
+  } else if (!strcasecmp(par, "help")) {
     msgs = hq.tot;
     msgq_clear(&hq);
     double_warned = 0;
     dprintf(idx, "Removed %d message%s from the help queue.\n", msgs,
         (msgs != 1) ? "s" : "");
-  } else if (!egg_strcasecmp(par, "server")) {
+  } else if (!strcasecmp(par, "server")) {
     msgs = mq.tot;
     msgq_clear(&mq);
     if (modeq.tot == 0)

+ 22 - 22
src/mod/server.mod/server.c

@@ -244,7 +244,7 @@ static int calc_penalty(char * msg)
     return 0;
   }
   penalty = (1 + i / 100);
-  if (!egg_strcasecmp(cmd, "KICK")) {
+  if (!strcasecmp(cmd, "KICK")) {
     par1 = newsplit(&msg); /* channel */
     par2 = newsplit(&msg); /* victim(s) */
     par3 = splitnicks(&par2);
@@ -259,7 +259,7 @@ static int calc_penalty(char * msg)
       par3 = splitnicks(&par1);
       penalty += ii;
     }
-  } else if (!egg_strcasecmp(cmd, "MODE")) {
+  } else if (!strcasecmp(cmd, "MODE")) {
     i = 0;
     par1 = newsplit(&msg); /* channel */
     par2 = newsplit(&msg); /* mode(s) */
@@ -282,7 +282,7 @@ static int calc_penalty(char * msg)
       ii++;
     }
     penalty += (ii * i);
-  } else if (!egg_strcasecmp(cmd, "TOPIC")) {
+  } else if (!strcasecmp(cmd, "TOPIC")) {
     penalty++;
     par1 = newsplit(&msg); /* channel */
     par2 = newsplit(&msg); /* topic */
@@ -294,15 +294,15 @@ static int calc_penalty(char * msg)
         penalty += 2;
       }
     }
-  } else if (!egg_strcasecmp(cmd, "PRIVMSG") ||
-	     !egg_strcasecmp(cmd, "NOTICE")) {
+  } else if (!strcasecmp(cmd, "PRIVMSG") ||
+	     !strcasecmp(cmd, "NOTICE")) {
     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")) {
+  } else if (!strcasecmp(cmd, "WHO")) {
     par1 = newsplit(&msg); /* masks */
     par2 = par1;
     while (strlen(par1) > 0) {
@@ -312,33 +312,33 @@ static int calc_penalty(char * msg)
       else
         penalty += 5;
     }
-  } else if (!egg_strcasecmp(cmd, "AWAY")) {
+  } else if (!strcasecmp(cmd, "AWAY")) {
     if (strlen(msg) > 0)
       penalty += 2;
     else
       penalty += 1;
-  } else if (!egg_strcasecmp(cmd, "INVITE")) {
+  } else if (!strcasecmp(cmd, "INVITE")) {
     /* Successful invite receives 2 or 3 penalty points. Let's go
      * with the maximum.
      */
     penalty += 3;
-  } else if (!egg_strcasecmp(cmd, "JOIN")) {
+  } else if (!strcasecmp(cmd, "JOIN")) {
     penalty += 2;
-  } else if (!egg_strcasecmp(cmd, "PART")) {
+  } else if (!strcasecmp(cmd, "PART")) {
     penalty += 4;
-  } else if (!egg_strcasecmp(cmd, "VERSION")) {
+  } else if (!strcasecmp(cmd, "VERSION")) {
     penalty += 2;
-  } else if (!egg_strcasecmp(cmd, "TIME")) {
+  } else if (!strcasecmp(cmd, "TIME")) {
     penalty += 2;
-  } else if (!egg_strcasecmp(cmd, "TRACE")) {
+  } else if (!strcasecmp(cmd, "TRACE")) {
     penalty += 2;
-  } else if (!egg_strcasecmp(cmd, "NICK")) {
+  } else if (!strcasecmp(cmd, "NICK")) {
     penalty += 3;
-  } else if (!egg_strcasecmp(cmd, "ISON")) {
+  } else if (!strcasecmp(cmd, "ISON")) {
     penalty += 1;
-  } else if (!egg_strcasecmp(cmd, "WHOIS")) {
+  } else if (!strcasecmp(cmd, "WHOIS")) {
     penalty += 2;
-  } else if (!egg_strcasecmp(cmd, "DNS")) {
+  } else if (!strcasecmp(cmd, "DNS")) {
     penalty += 2;
   } else
     penalty++; /* just add standard-penalty */
@@ -428,7 +428,7 @@ static bool fast_deq(int which)
     strlcpy(stackable, stackablecmds, sizeof stackable);
     stckbl = stackable;
     while (strlen(stckbl) > 0)
-      if (!egg_strcasecmp(newsplit(&stckbl), cmd)) {
+      if (!strcasecmp(newsplit(&stckbl), cmd)) {
         found = 1;
         break;
       }
@@ -444,7 +444,7 @@ static bool fast_deq(int which)
     strlcpy(stackable, stackable2cmds, sizeof stackable);
     stckbl = stackable;
     while (strlen(stckbl) > 0)
-      if (!egg_strcasecmp(newsplit(&stckbl), cmd)) {
+      if (!strcasecmp(newsplit(&stckbl), cmd)) {
         stack_method = 2;
         break;
       }    
@@ -586,7 +586,7 @@ void queue_server(int which, char *buf, int len)
 
       for (tq = tempq.head; tq; tq = tqq) {
 	tqq = tq->next;
-	if (!egg_strcasecmp(tq->msg, buf)) {
+	if (!strcasecmp(tq->msg, buf)) {
 	  if (!double_warned) {
 	    if (buf[len - 1] == '\n')
 	      buf[len - 1] = 0;
@@ -773,7 +773,7 @@ void next_server(int *ptr, char *servname, port_t *port, char *pass)
   if (*ptr == (-1)) {
     for (; x; x = x->next) {
       if (x->port == *port) {
-	if (!egg_strcasecmp(x->name, servname)) {
+	if (!strcasecmp(x->name, servname)) {
 	  *ptr = i;
 	  return;
 	}
@@ -892,7 +892,7 @@ static int ctcp_DCC_CHAT(char *nick, char *from, struct userrec *u, char *object
   ip = newsplit(&text);
   prt = newsplit(&text);
 
-  if (egg_strcasecmp(action, "CHAT") || egg_strcasecmp(object, botname) || !u)
+  if (strcasecmp(action, "CHAT") || strcasecmp(object, botname) || !u)
     return BIND_RET_LOG;
 
   int i;

+ 26 - 26
src/mod/server.mod/servmsg.c

@@ -216,7 +216,7 @@ static int got001(char *from, char *msg)
   join_chans();
 
 #ifdef no
-  if (egg_strcasecmp(from, dcc[servidx].host)) {
+  if (strcasecmp(from, dcc[servidx].host)) {
     struct server_list *x = serverlist;
 
     if (x == NULL)
@@ -253,32 +253,32 @@ got005(char *from, char *msg)
 
     if ((p = strchr(tmp, '=')))
       *p++ = 0;
-    if (!egg_strcasecmp(tmp, ":are"))
+    if (!strcasecmp(tmp, ":are"))
       break;
-    else if (!egg_strcasecmp(tmp, "MODES")) {
+    else if (!strcasecmp(tmp, "MODES")) {
       modesperline = atoi(p);
 
       if (modesperline > MODES_PER_LINE_MAX)
         modesperline = MODES_PER_LINE_MAX;
-    } else if (!egg_strcasecmp(tmp, "NICKLEN"))
+    } else if (!strcasecmp(tmp, "NICKLEN"))
       nick_len = atoi(p);
-    else if (!egg_strcasecmp(tmp, "NETWORK"))
+    else if (!strcasecmp(tmp, "NETWORK"))
       strlcpy(curnetwork, p, 120);
-    else if (!egg_strcasecmp(tmp, "PENALTY"))
+    else if (!strcasecmp(tmp, "PENALTY"))
       use_penalties = 1;
-    else if (!egg_strcasecmp(tmp, "WHOX"))
+    else if (!strcasecmp(tmp, "WHOX"))
       use_354 = 1;
-    else if (!egg_strcasecmp(tmp, "EXCEPTS"))
+    else if (!strcasecmp(tmp, "EXCEPTS"))
       use_exempts = 1;
-    else if (!egg_strcasecmp(tmp, "INVEX"))
+    else if (!strcasecmp(tmp, "INVEX"))
       use_invites = 1;
-    else if (!egg_strcasecmp(tmp, "MAXBANS")) {
+    else if (!strcasecmp(tmp, "MAXBANS")) {
       max_bans = atoi(p);
       max_modes = max_bans;
       max_exempts = max_bans;
       max_invites = max_bans;
     }
-    else if (!egg_strcasecmp(tmp, "MAXLIST")) {
+    else if (!strcasecmp(tmp, "MAXLIST")) {
       p2 = NULL;
       
       if ((p2 = strchr(p, ':'))) {
@@ -293,10 +293,10 @@ got005(char *from, char *msg)
       
       }
     }
-    else if (!egg_strcasecmp(tmp, "CASEMAPPING")) {
+    else if (!strcasecmp(tmp, "CASEMAPPING")) {
       /* we are default set to rfc1459, so only switch if NOT rfc1459 */
-      if (egg_strcasecmp(p, "rfc1459")) {
-        rfc_casecmp = egg_strcasecmp;
+      if (strcasecmp(p, "rfc1459")) {
+        rfc_casecmp = strcasecmp;
         rfc_toupper = toupper;
       }
     }
@@ -315,7 +315,7 @@ static int got442(char *from, char *msg)
 
   for (x = serverlist, i = 0; x; x = x->next, i++)
     if (i == curserv) {
-      if (egg_strcasecmp(from, x->name))
+      if (strcasecmp(from, x->name))
 	return 0;
       break;
     }
@@ -399,7 +399,7 @@ static bool detect_flood(char *floodnick, char *floodhost, char *from, int which
   /* Okay, make sure i'm not flood-checking myself */
   if (match_my_nick(floodnick))
     return 0;
-  if (!egg_strcasecmp(floodhost, botuserhost))
+  if (!strcasecmp(floodhost, botuserhost))
     return 0;			/* My user@host (?) */
 
   //FIXME: hack for +g 
@@ -429,7 +429,7 @@ static bool detect_flood(char *floodnick, char *floodhost, char *from, int which
   p = strchr(floodhost, '@');
   if (p) {
     p++;
-    if (egg_strcasecmp(lastmsghost[which], p)) {	/* New */
+    if (strcasecmp(lastmsghost[which], p)) {	/* New */
       strlcpy(lastmsghost[which], p, 128);
       lastmsgtime[which] = now;
       lastmsgs[which] = 0;
@@ -618,20 +618,20 @@ static int gotmsg(char *from, char *msg)
         struct userrec *my_u = get_user_by_host(from);
         bool doit = 1;
 
-        if (!egg_strcasecmp(my_code, "op") || !egg_strcasecmp(my_code, "pass") || !egg_strcasecmp(my_code, "invite") 
-            || !egg_strcasecmp(my_code, "ident")
-            || !egg_strcasecmp(my_code, msgop) || !egg_strcasecmp(my_code, msgpass) 
-            || !egg_strcasecmp(my_code, msginvite) || !egg_strcasecmp(my_code, msgident)) {
+        if (!strcasecmp(my_code, "op") || !strcasecmp(my_code, "pass") || !strcasecmp(my_code, "invite")
+            || !strcasecmp(my_code, "ident")
+            || !strcasecmp(my_code, msgop) || !strcasecmp(my_code, msgpass)
+            || !strcasecmp(my_code, msginvite) || !strcasecmp(my_code, msgident)) {
           const char *buf2 = NULL;
 
           doit = 0;
-          if (!egg_strcasecmp(my_code, msgop))
+          if (!strcasecmp(my_code, msgop))
             buf2 = "op";
-          else if (!egg_strcasecmp(my_code, msgpass))
+          else if (!strcasecmp(my_code, msgpass))
             buf2 = "pass";
-          else if (!egg_strcasecmp(my_code, msginvite))
+          else if (!strcasecmp(my_code, msginvite))
             buf2 = "invite";
-          else if (!egg_strcasecmp(my_code, msgident))
+          else if (!strcasecmp(my_code, msgident))
             buf2 = "ident";
 
           if (buf2)
@@ -1457,7 +1457,7 @@ static int got317(char *from, char *msg)
   signon = atol(newsplit(&msg));
   fixcolon(msg);
 
-  egg_strftime(date, sizeof date, "%c %Z", gmtime(&signon));
+  strftime(date, sizeof date, "%c %Z", gmtime(&signon));
 
   mydays = idle / 86400;
   idle = idle % 86400;

+ 9 - 9
src/mod/share.mod/share.c

@@ -139,7 +139,7 @@ static bool flush_tbuf(char *bot)
 
   for (t = tbuf; t; t = tnext) {
     tnext = t->next;
-    if (!egg_strcasecmp(t->bot, bot)) {
+    if (!strcasecmp(t->bot, bot)) {
       del_tbuf(t);
       return 1;
     }
@@ -185,7 +185,7 @@ static void q_tbuf(char *bot, char *s)
   tandbuf *t = NULL;
 
   for (t = tbuf; t && t->bot[0]; t = t->next)
-    if (!egg_strcasecmp(t->bot, bot)) {
+    if (!strcasecmp(t->bot, bot)) {
       if ((q = q_addmsg(t->q, s)))
         t->q = q;
       break;
@@ -211,7 +211,7 @@ static void q_resync_but(char *s, const char *bot)
   tandbuf *t = NULL;
 
   for (t = tbuf; t && t->bot[0]; t = t->next) {
-    if (egg_strcasecmp(t->bot, bot)) {
+    if (strcasecmp(t->bot, bot)) {
       if ((q = q_addmsg(t->q, s)))
         t->q = q;
     }
@@ -226,7 +226,7 @@ void dump_resync(int idx)
   tandbuf *t = NULL;
 
   for (t = tbuf; t && t->bot[0]; t = t->next)
-    if (!egg_strcasecmp(dcc[idx].nick, t->bot)) {
+    if (!strcasecmp(dcc[idx].nick, t->bot)) {
       for (q = t->q; q && q->msg[0]; q = q->next) {
         dprintf(idx, "%s", q->msg);
       }
@@ -1252,7 +1252,7 @@ finish_share(int idx)
   int i, j = -1;
 
   for (i = 0; i < dcc_total; i++)
-    if (dcc[i].type && !egg_strcasecmp(dcc[i].nick, dcc[idx].host) && (dcc[i].type->flags & DCT_BOT)) {
+    if (dcc[i].type && !strcasecmp(dcc[i].nick, dcc[idx].host) && (dcc[i].type->flags & DCT_BOT)) {
       j = i;
       break;
     }
@@ -1498,7 +1498,7 @@ cancel_user_xfer(int idx, void *x)
     /* look for any transfers from this bot and kill them */
     if (dcc[idx].status & STAT_GETTING) {
       for (i = 0; i < dcc_total; i++)
-        if (dcc[i].type && !egg_strcasecmp(dcc[i].host, dcc[idx].nick) &&
+        if (dcc[i].type && !strcasecmp(dcc[i].host, dcc[idx].nick) &&
             ((dcc[i].type->flags & (DCT_FILETRAN | DCT_FILESEND)) == (DCT_FILETRAN | DCT_FILESEND))) {
           j = i;
           break;
@@ -1513,7 +1513,7 @@ cancel_user_xfer(int idx, void *x)
     /* look for any transfers we were sending them */
     if (dcc[idx].status & STAT_SENDING) {
       for (i = 0; i < dcc_total; i++)
-        if (dcc[i].type && (!egg_strcasecmp(dcc[i].host, dcc[idx].nick)) &&
+        if (dcc[i].type && (!strcasecmp(dcc[i].host, dcc[idx].nick)) &&
             ((dcc[i].type->flags & (DCT_FILETRAN | DCT_FILESEND)) == DCT_FILETRAN)) {
           j = i;
           break;
@@ -1545,7 +1545,7 @@ share_report(int idx, int details)
 
           for (j = 0; j < dcc_total; j++)
             if (dcc[j].type && ((dcc[j].type->flags & (DCT_FILETRAN | DCT_FILESEND))
-                 == (DCT_FILETRAN | DCT_FILESEND)) && !egg_strcasecmp(dcc[j].host, dcc[i].nick)) {
+                 == (DCT_FILETRAN | DCT_FILESEND)) && !strcasecmp(dcc[j].host, dcc[i].nick)) {
               dprintf(idx, "Downloading userlist from %s (%d%% done)\n",
                       conf.bot->hub ? dcc[i].nick : "[botnet]", (int) (100.0 * ((float) dcc[j].status) / ((float) dcc[j].u.xfer->length)));
               ok = 1;
@@ -1557,7 +1557,7 @@ share_report(int idx, int details)
           for (j = 0; j < dcc_total; j++) {
             if (dcc[j].type && ((dcc[j].type->flags & (DCT_FILETRAN | DCT_FILESEND))
                  == DCT_FILETRAN)
-                && !egg_strcasecmp(dcc[j].host, dcc[i].nick)) {
+                && !strcasecmp(dcc[j].host, dcc[i].nick)) {
               if (dcc[j].type == &DCC_GET)
                 dprintf(idx, "Sending userlist to %s (%d%% done)\n",
                         dcc[i].nick,

+ 19 - 19
src/mod/transfer.mod/transfer.c

@@ -111,7 +111,7 @@ void eof_dcc_fork_send(int idx)
     int x, y = -1;
 
     for (x = 0; x < dcc_total; x++)
-      if (dcc[x].type && (!egg_strcasecmp(dcc[x].nick, dcc[idx].host)) && (dcc[x].type->flags & DCT_BOT)) {
+      if (dcc[x].type && (!strcasecmp(dcc[x].nick, dcc[idx].host)) && (dcc[x].type->flags & DCT_BOT)) {
 	y = x;
 	break;
       }
@@ -125,7 +125,7 @@ void eof_dcc_fork_send(int idx)
     int x, y = -1;
 
     for (x = 0; x < dcc_total; x++)
-      if (dcc[x].type && (!egg_strcasecmp(dcc[x].nick, dcc[idx].host)) && (dcc[x].type->flags & DCT_BOT)) {
+      if (dcc[x].type && (!strcasecmp(dcc[x].nick, dcc[idx].host)) && (dcc[x].type->flags & DCT_BOT)) {
 	y = x;
 	break;
       }
@@ -168,7 +168,7 @@ static void eof_dcc_send(int idx)
     int x, y = -1;
 
     for (x = 0; x < dcc_total; x++) {
-      if (dcc[x].type && (!egg_strcasecmp(dcc[x].nick, dcc[idx].host)) && (dcc[x].type->flags & DCT_BOT)) {
+      if (dcc[x].type && (!strcasecmp(dcc[x].nick, dcc[idx].host)) && (dcc[x].type->flags & DCT_BOT)) {
 	y = x;
         break;
       }
@@ -200,7 +200,7 @@ static void eof_dcc_send(int idx)
     int x, y = -1;
 
     for (x = 0; x < dcc_total; x++)
-      if (dcc[x].type && (!egg_strcasecmp(dcc[x].nick, dcc[idx].host)) && (dcc[x].type->flags & DCT_BOT)) {
+      if (dcc[x].type && (!strcasecmp(dcc[x].nick, dcc[idx].host)) && (dcc[x].type->flags & DCT_BOT)) {
 	y = x;
         break;
       }
@@ -278,7 +278,7 @@ void dcc_get(int idx, char *buf, int len)
    */
   if (w < 4 ||
       (w < 8 && dcc[idx].u.xfer->type == XFER_RESEND_PEND)) {
-    egg_memcpy(&(dcc[idx].u.xfer->buf[dcc[idx].u.xfer->sofar]), buf, len);
+    memcpy(&(dcc[idx].u.xfer->buf[dcc[idx].u.xfer->sofar]), buf, len);
     dcc[idx].u.xfer->sofar += len;
     return;
   /* Waiting for the 8 bit reget packet? */
@@ -287,8 +287,8 @@ void dcc_get(int idx, char *buf, int len)
     if (w == 8) {
       transfer_reget reget_data;
 
-      egg_memcpy(&reget_data, dcc[idx].u.xfer->buf, dcc[idx].u.xfer->sofar);
-      egg_memcpy(&reget_data + dcc[idx].u.xfer->sofar, buf, len);
+      memcpy(&reget_data, dcc[idx].u.xfer->buf, dcc[idx].u.xfer->sofar);
+      memcpy(&reget_data + dcc[idx].u.xfer->sofar, buf, len);
       handle_resend_packet(idx, &reget_data);
       cmp = dcc[idx].u.xfer->offset;
     } else
@@ -298,16 +298,16 @@ void dcc_get(int idx, char *buf, int len)
   } else {
     /* Complete packet? */
     if (w == 4) {
-      egg_memcpy(bbuf, dcc[idx].u.xfer->buf, dcc[idx].u.xfer->sofar);
-      egg_memcpy(&(bbuf[dcc[idx].u.xfer->sofar]), buf, len);
+      memcpy(bbuf, dcc[idx].u.xfer->buf, dcc[idx].u.xfer->sofar);
+      memcpy(&(bbuf[dcc[idx].u.xfer->sofar]), buf, len);
     } else {
       p = ((w - 1) & ~3) - dcc[idx].u.xfer->sofar;
       w = w - ((w - 1) & ~3);
       if (w < 4) {
-	egg_memcpy(dcc[idx].u.xfer->buf, &(buf[p]), w);
+	memcpy(dcc[idx].u.xfer->buf, &(buf[p]), w);
 	return;
       }
-      egg_memcpy(bbuf, &(buf[p]), w);
+      memcpy(bbuf, &(buf[p]), w);
     }
     /* This is more compatible than ntohl for machines where an int
      * is more than 4 bytes:
@@ -356,7 +356,7 @@ void dcc_get(int idx, char *buf, int len)
       int x, y = -1;
 
       for (x = 0; x < dcc_total; x++)
-	if (dcc[x].type && !egg_strcasecmp(dcc[x].nick, dcc[idx].host) && (dcc[x].type->flags & DCT_BOT)) {
+	if (dcc[x].type && !strcasecmp(dcc[x].nick, dcc[idx].host) && (dcc[x].type->flags & DCT_BOT)) {
 	  y = x;
           break;
         }
@@ -371,7 +371,7 @@ void dcc_get(int idx, char *buf, int len)
       int x, y = -1;
 
       for (x = 0; x < dcc_total; x++)
-	if (dcc[x].type && !egg_strcasecmp(dcc[x].nick, dcc[idx].host) && (dcc[x].type->flags & DCT_BOT)) {
+	if (dcc[x].type && !strcasecmp(dcc[x].nick, dcc[idx].host) && (dcc[x].type->flags & DCT_BOT)) {
 	  y = x;
           break;
         }
@@ -404,7 +404,7 @@ void eof_dcc_get(int idx)
     int x, y = -1;
 
     for (x = 0; x < dcc_total; x++)
-      if (dcc[x].type && !egg_strcasecmp(dcc[x].nick, dcc[idx].host) && (dcc[x].type->flags & DCT_BOT)) {
+      if (dcc[x].type && !strcasecmp(dcc[x].nick, dcc[idx].host) && (dcc[x].type->flags & DCT_BOT)) {
 	y = x;
         break;
       }
@@ -428,7 +428,7 @@ void eof_dcc_get(int idx)
     int x, y = -1;
 
     for (x = 0; x < dcc_total; x++)
-      if (dcc[x].type && !egg_strcasecmp(dcc[x].nick, dcc[idx].host) && (dcc[x].type->flags & DCT_BOT)) {
+      if (dcc[x].type && !strcasecmp(dcc[x].nick, dcc[idx].host) && (dcc[x].type->flags & DCT_BOT)) {
 	y = x;
         break;
       }
@@ -503,7 +503,7 @@ static void transfer_get_timeout(int i)
     int x, y = -1;
 
     for (x = 0; x < dcc_total; x++)
-      if (dcc[x].type && (!egg_strcasecmp(dcc[x].nick, dcc[i].host)) && (dcc[x].type->flags & DCT_BOT)) {
+      if (dcc[x].type && (!strcasecmp(dcc[x].nick, dcc[i].host)) && (dcc[x].type->flags & DCT_BOT)) {
 	y = x;
         break;
       }
@@ -533,7 +533,7 @@ static void transfer_get_timeout(int i)
     int x, y = -1;
 
     for (x = 0; x < dcc_total; x++)
-      if (dcc[x].type && (!egg_strcasecmp(dcc[x].nick, dcc[i].host)) && (dcc[x].type->flags & DCT_BOT)) {
+      if (dcc[x].type && (!strcasecmp(dcc[x].nick, dcc[i].host)) && (dcc[x].type->flags & DCT_BOT)) {
 	y = x;
         break;
       }
@@ -570,7 +570,7 @@ void tout_dcc_send(int idx)
     int x, y = -1;
 
     for (x = 0; x < dcc_total; x++)
-      if (dcc[x].type && !egg_strcasecmp(dcc[x].nick, dcc[idx].host) && (dcc[x].type->flags & DCT_BOT)) {
+      if (dcc[x].type && !strcasecmp(dcc[x].nick, dcc[idx].host) && (dcc[x].type->flags & DCT_BOT)) {
 	y = x;
         break;
       }
@@ -584,7 +584,7 @@ void tout_dcc_send(int idx)
     int x, y = -1;
 
     for (x = 0; x < dcc_total; x++)
-      if (dcc[x].type && !egg_strcasecmp(dcc[x].nick, dcc[idx].host) && (dcc[x].type->flags & DCT_BOT)) {
+      if (dcc[x].type && !strcasecmp(dcc[x].nick, dcc[idx].host) && (dcc[x].type->flags & DCT_BOT)) {
 	y = x;
         break;
       }

+ 3 - 3
src/mod/update.mod/update.c

@@ -378,7 +378,7 @@ void update_report(int idx, int details)
 	  for (j = 0; j < dcc_total; j++)
 	    if (dcc[j].type && ((dcc[j].type->flags & (DCT_FILETRAN | DCT_FILESEND))
 		 == (DCT_FILETRAN | DCT_FILESEND)) &&
-		!egg_strcasecmp(dcc[j].host, dcc[i].nick)) {
+		!strcasecmp(dcc[j].host, dcc[i].nick)) {
 	      dprintf(idx, "Downloading binary from %s (%d%% done)\n",
 		      dcc[i].nick,
 		      (int) (100.0 * ((float) dcc[j].status) /
@@ -393,7 +393,7 @@ void update_report(int idx, int details)
 	  for (j = 0; j < dcc_total; j++) {
 	    if (dcc[j].type && ((dcc[j].type->flags & (DCT_FILETRAN | DCT_FILESEND))
 		 == DCT_FILETRAN)
-		&& !egg_strcasecmp(dcc[j].host, dcc[i].nick)) {
+		&& !strcasecmp(dcc[j].host, dcc[i].nick)) {
 	      if (dcc[j].type == &DCC_GET)
 		dprintf(idx, "Sending binary to %s (%d%% done)\n",
 			dcc[i].nick,
@@ -413,7 +413,7 @@ void update_report(int idx, int details)
 static void cmd_bupdate(int idx, char *par)
 {
   for (int i = 0; i < dcc_total; i++) {
-    if (dcc[i].type && !egg_strcasecmp(dcc[i].nick, par)) {
+    if (dcc[i].type && !strcasecmp(dcc[i].nick, par)) {
       dprintf(i, "sb u?\n");
       dcc[i].status &= ~(STAT_SENDINGU | STAT_UPDATED);
       dcc[i].status |= STAT_OFFEREDU;

+ 28 - 28
src/net.c

@@ -106,7 +106,7 @@ int sockprotocol(int sock)
   struct sockaddr sa;
   socklen_t socklen = sizeof(sa);
 
-  egg_bzero(&sa, socklen);
+  bzero(&sa, socklen);
   if (getsockname(sock, &sa, &socklen))
     return -1;
   else
@@ -119,14 +119,14 @@ static int get_ip(char *hostname, union sockaddr_union *so)
   if (!hostname || (hostname && !hostname[0]))
     return 1;
 
-  egg_memset(so, 0, sizeof(union sockaddr_union));
+  memset(so, 0, sizeof(union sockaddr_union));
   debug1("get_ip(%s)", hostname);
 
 #ifdef USE_IPV6
   struct addrinfo hints, *ai = NULL, *res = NULL;
   int error = 0;
 
-  egg_memset(&hints, 0, sizeof(struct addrinfo));
+  memset(&hints, 0, sizeof(struct addrinfo));
   hints.ai_socktype = SOCK_STREAM;
 
   if ((error = getaddrinfo(hostname, NULL, &hints, &res))) {
@@ -204,7 +204,7 @@ void init_net()
     socklist = (sock_list *) my_calloc(1, sizeof(sock_list) * MAXSOCKS);
 
   for (int i = 0; i < MAXSOCKS; i++) {
-    egg_bzero(&socklist[i], sizeof(socklist[i]));
+    bzero(&socklist[i], sizeof(socklist[i]));
 #ifdef HAVE_SSL
     socklist[i].ssl = NULL;
 #endif /* HAVE_SSL */
@@ -248,7 +248,7 @@ char *myipstr(int af_type)
     if (af_type == AF_INET6) {
       static char s[UHOSTLEN + 1] = "";
 
-      egg_inet_ntop(AF_INET6, &cached_myip6_so.sin6.sin6_addr, s, 119);
+      inet_ntop(AF_INET6, &cached_myip6_so.sin6.sin6_addr, s, 119);
       s[120] = 0;
       return s;
     } else
@@ -256,7 +256,7 @@ char *myipstr(int af_type)
       if (af_type == AF_INET) {
         static char s[UHOSTLEN + 1] = "";
 
-        egg_inet_ntop(AF_INET, &cached_myip4_so.sin.sin_addr, s, 119);
+        inet_ntop(AF_INET, &cached_myip4_so.sin.sin_addr, s, 119);
         s[120] = 0;
         return s;
       }
@@ -284,12 +284,12 @@ void cache_my_ip()
   int error = 0;
 
   debug0("cache_my_ip()");
-  egg_memset(&cached_myip4_so, 0, sizeof(union sockaddr_union));
+  memset(&cached_myip4_so, 0, sizeof(union sockaddr_union));
 
 #ifdef USE_IPV6
   bool any = 0;
 
-  egg_memset(&cached_myip6_so, 0, sizeof(union sockaddr_union));
+  memset(&cached_myip6_so, 0, sizeof(union sockaddr_union));
 
   if (conf.bot->net.ip6) {
     if (get_ip(conf.bot->net.ip6, &cached_myip6_so))
@@ -434,8 +434,8 @@ int allocsock(int sock, int options)
       socklist[i].encstatus = 0;
       socklist[i].enclink = -1;
       socklist[i].gz = 0;
-      egg_bzero(&(socklist[i].okey), ENC_KEY_LEN + 1);
-      egg_bzero(&(socklist[i].ikey), ENC_KEY_LEN + 1);
+      bzero(&(socklist[i].okey), ENC_KEY_LEN + 1);
+      bzero(&(socklist[i].ikey), ENC_KEY_LEN + 1);
       socks_total++;
       sdprintf("allocsock(%d) = %d", i, sock);
       return i;
@@ -538,7 +538,7 @@ void real_killsock(register int sock, const char *file, int line)
       }
       if (socklist[i].host)
         free(socklist[i].host);
-      egg_bzero(&socklist[i], sizeof(socklist[i]));
+      bzero(&socklist[i], sizeof(socklist[i]));
       socklist[i].flags = SOCK_UNUSED;
       socks_total--;
       sdprintf("killsock(%d, %s, %d) (socklist: %d)", sock, file, line, i);
@@ -566,7 +566,7 @@ static int proxy_connect(int sock, const char *ip, port_t port, int proxy_type)
     /* numeric IP? */
     if (is_dotted_ip(ip)) {
       in_addr_t ipaddr = ((in_addr_t) inet_addr(ip));
-      egg_memcpy(x, &ipaddr, 4);
+      memcpy(x, &ipaddr, 4);
     } else {	/* if not resolved, resolve it with blocking calls.. (shouldn't happen ever) */
       return -1;
     }
@@ -599,7 +599,7 @@ static int proxy_connect(int sock, const char *ip, port_t port, int proxy_type)
 /* FIXME: REPLACE WITH SOCK_NAME() */
 void initialize_sockaddr(int af_type, const char *host, port_t port, union sockaddr_union *so)
 {
-    egg_bzero(so, sizeof(*so));
+    bzero(so, sizeof(*so));
 
     so->sa.sa_family = af_type;
 
@@ -769,7 +769,7 @@ int open_address_listen(in_addr_t addr, port_t *port)
       return -1;
 
     debug2("Opening listen socket on port %d with AF_INET6, sock: %d", *port, sock);
-    egg_bzero((char *) &name6, sizeof(name6));
+    bzero((char *) &name6, sizeof(name6));
     name6.sin6_family = af_def;
     name6.sin6_port = htons(*port); /* 0 = just assign us a port */
     /* memcpy(&name6.sin6_addr, &in6addr_any, 16); */ /* this is the only way to get ipv6+ipv4 in 1 socket */
@@ -804,7 +804,7 @@ int open_address_listen(in_addr_t addr, port_t *port)
       return -1;
 
     debug2("Opening listen socket on port %d with AF_INET, sock: %d", *port, sock);
-    egg_bzero((char *) &name, sizeof(struct sockaddr_in));
+    bzero((char *) &name, sizeof(struct sockaddr_in));
     name.sin_family = AF_INET;
     name.sin_port = htons(*port); /* 0 = just assign us a port */
     name.sin_addr.s_addr = addr;
@@ -939,7 +939,7 @@ char *iptostr(in_addr_t ip)
   struct in_addr a;
 
   a.s_addr = ip;
-  return (char *) egg_inet_ntop(AF_INET, &a, ipbuf, sizeof(ipbuf));
+  return (char *) inet_ntop(AF_INET, &a, ipbuf, sizeof(ipbuf));
 }
 
 /* Short routine to answer a connect received on a socket made previously
@@ -955,7 +955,7 @@ int answer(int sock, char *caller, in_addr_t *ip, port_t *port, int binary)
   int af_ty = sockprotocol(sock);
   struct sockaddr_in6 from6;
 
-  egg_bzero(&from6, sizeof(struct sockaddr_in6));
+  bzero(&from6, sizeof(struct sockaddr_in6));
   if (af_ty == AF_INET6) {
     addrlen = sizeof(from6);
     new_sock = accept(sock, (struct sockaddr *) &from6, &addrlen);
@@ -973,7 +973,7 @@ int answer(int sock, char *caller, in_addr_t *ip, port_t *port, int binary)
 #ifdef USE_IPV6
     /* Detect IPv4 in IPv6 mapped address .... */
     if (af_ty == AF_INET6 && (!IN6_IS_ADDR_V4MAPPED(&from6.sin6_addr))) {
-      egg_inet_ntop(AF_INET6, &from6.sin6_addr, caller, 119);
+      inet_ntop(AF_INET6, &from6.sin6_addr, caller, 119);
       caller[120] = 0;
       *ip = 0L;
     } else if (IN6_IS_ADDR_V4MAPPED(&from6.sin6_addr)) {    /* ...and convert it to plain (AF_INET) IPv4 address (openssh) */
@@ -981,7 +981,7 @@ int answer(int sock, char *caller, in_addr_t *ip, port_t *port, int binary)
       struct in_addr addr;
 
       memcpy(&addr, ((char *)&from6.sin6_addr) + 12, sizeof(addr));
-      egg_memset(&from, 0, sizeof(from));
+      memset(&from, 0, sizeof(from));
 
       from4->sin_family = AF_INET;
       addrlen = sizeof(*from4);
@@ -1276,15 +1276,15 @@ int sockgets(char *s, int *len)
 	/* Handling buffered binary data (must have been SOCK_BUFFER before). */
 	if (socklist[i].inbuflen <= SGRAB) {
 	  *len = socklist[i].inbuflen;
-	  egg_memcpy(s, socklist[i].inbuf, socklist[i].inbuflen);
+	  memcpy(s, socklist[i].inbuf, socklist[i].inbuflen);
 	  free(socklist[i].inbuf);
           socklist[i].inbuf = NULL;
 	  socklist[i].inbuflen = 0;
 	} else {
 	  /* Split up into chunks of SGRAB bytes. */
 	  *len = SGRAB;
-	  egg_memcpy(s, socklist[i].inbuf, *len);
-	  egg_memcpy(socklist[i].inbuf, socklist[i].inbuf + *len, *len);
+	  memcpy(s, socklist[i].inbuf, *len);
+	  memcpy(socklist[i].inbuf, socklist[i].inbuf + *len, *len);
 	  socklist[i].inbuflen -= *len;
 	  socklist[i].inbuf = (char *) my_realloc(socklist[i].inbuf, socklist[i].inbuflen);
 	}
@@ -1314,7 +1314,7 @@ int sockgets(char *s, int *len)
       socklist[ret].inbuflen = *len;
       socklist[ret].inbuf = (char *) my_calloc(1, *len + 1);
       /* It might be binary data. You never know. */
-      egg_memcpy(socklist[ret].inbuf, xx, *len);
+      memcpy(socklist[ret].inbuf, xx, *len);
       socklist[ret].inbuf[*len] = 0;
     }
     socklist[ret].flags &= ~SOCK_CONNECT;
@@ -1322,7 +1322,7 @@ int sockgets(char *s, int *len)
     return socklist[ret].sock;
   }
   if (socklist[ret].flags & SOCK_BINARY) {
-    egg_memcpy(s, xx, *len);
+    memcpy(s, xx, *len);
     return socklist[ret].sock;
   }
   if ((socklist[ret].flags & SOCK_LISTEN) || (socklist[ret].flags & SOCK_PASS))
@@ -1330,7 +1330,7 @@ int sockgets(char *s, int *len)
   if (socklist[ret].flags & SOCK_BUFFER) {
     socklist[ret].inbuf = (char *) my_realloc(socklist[ret].inbuf,
 		    			    socklist[ret].inbuflen + *len + 1);
-    egg_memcpy(socklist[ret].inbuf + socklist[ret].inbuflen, xx, *len);
+    memcpy(socklist[ret].inbuf + socklist[ret].inbuflen, xx, *len);
     socklist[ret].inbuflen += *len;
     /* We don't know whether it's binary data. Make sure normal strings
        will be handled properly later on too. */
@@ -1466,7 +1466,7 @@ void tputs(register int z, char *s, size_t len)
       if (socklist[i].outbuf != NULL) {
 	/* Already queueing: just add it */
 	p = (char *) my_realloc(socklist[i].outbuf, socklist[i].outbuflen + len);
-	egg_memcpy(p + socklist[i].outbuflen, s, len);
+	memcpy(p + socklist[i].outbuflen, s, len);
 	socklist[i].outbuf = p;
 	socklist[i].outbuflen += len;
         if (socklist[i].encstatus && s)
@@ -1510,7 +1510,7 @@ void tputs(register int z, char *s, size_t len)
       if ((size_t) x < len) {
 	/* Socket is full, queue it */
 	socklist[i].outbuf = (char *) my_calloc(1, len - x);
-	egg_memcpy(socklist[i].outbuf, &s[x], len - x);
+	memcpy(socklist[i].outbuf, &s[x], len - x);
 	socklist[i].outbuflen = len - x;
       }
       if (socklist[i].encstatus && s)
@@ -1640,7 +1640,7 @@ void dequeue_sockets()
 
 	/* This removes any sent bytes from the beginning of the buffer */
 	socklist[i].outbuf = (char *) my_calloc(1, socklist[i].outbuflen - x);
-	egg_memcpy(socklist[i].outbuf, p + x, socklist[i].outbuflen - x);
+	memcpy(socklist[i].outbuf, p + x, socklist[i].outbuflen - x);
 	socklist[i].outbuflen -= x;
 	free(p);
       } else {

+ 18 - 18
src/set.c

@@ -154,9 +154,9 @@ char *var_sanitize(variable_t *var, const char *data)
       if (str_isdigit(data)) {
         int number = atoi(data);
         dataout = strdup(det_translate_num(number));
-      } else if (!egg_strcasecmp(data, "ignore") || !egg_strcasecmp(data, "warn") ||
-                 !egg_strcasecmp(data, "die") || !egg_strcasecmp(data, "reject") ||
-                 !egg_strcasecmp(data, "suicide")) {
+      } else if (!strcasecmp(data, "ignore") || !strcasecmp(data, "warn") ||
+                 !strcasecmp(data, "die") || !strcasecmp(data, "reject") ||
+                 !strcasecmp(data, "suicide")) {
         dataout = strdup(data);
       }
     } else
@@ -165,16 +165,16 @@ char *var_sanitize(variable_t *var, const char *data)
     int num = 0;
 
     if (data && (str_isdigit(data) || 
-                 !egg_strcasecmp(data, "true") || 
-                 !egg_strcasecmp(data, "on") || 
-                 !egg_strcasecmp(data, "off") || 
-                 !egg_strcasecmp(data, "false"))) {
+                 !strcasecmp(data, "true") ||
+                 !strcasecmp(data, "on") ||
+                 !strcasecmp(data, "off") ||
+                 !strcasecmp(data, "false"))) {
       if (str_isdigit(data))
         num = atoi(data);
 
-      if (num > 0 || !egg_strcasecmp(data, "true") || !egg_strcasecmp(data, "on"))
+      if (num > 0 || !strcasecmp(data, "true") || !strcasecmp(data, "on"))
         num = 1;
-      else if (num < 0 || !egg_strcasecmp(data, "false") || !egg_strcasecmp(data, "off"))
+      else if (num < 0 || !strcasecmp(data, "false") || !strcasecmp(data, "off"))
         num = 0;
     }
     dataout = (char*) my_calloc(1, 2);
@@ -253,7 +253,7 @@ sdprintf("var (mem): %s -> %s", var->name, datain ? datain : "(NULL)");
   } else if (var->flags & VAR_DETECTED) {
     int number = data ? det_translate(data) : DET_IGNORE;
 #ifndef DEBUG
-    if (number < 2 && !egg_strcasecmp(var->name, "trace"))
+    if (number < 2 && !strcasecmp(var->name, "trace"))
       number = DET_DIE;
 #endif
     *(int *) (var->mem) = number;
@@ -448,7 +448,7 @@ const char *var_string(variable_t *var)
 static int comp_variable_t(const void *m1, const void *m2) {
   const variable_t *mi1 = (const variable_t *) m1;
   const variable_t *mi2 = (const variable_t *) m2;
-  return egg_strcasecmp(mi1->name, mi2->name);
+  return strcasecmp(mi1->name, mi2->name);
 }
 
 static inline variable_t *var_get_var_by_name(const char *name)
@@ -504,7 +504,7 @@ void var_set(variable_t *var, const char *target, const char *datain)
   if (target) {
     bool me = 0;
 
-    if (!egg_strcasecmp(conf.bot->nick, target)) {
+    if (!strcasecmp(conf.bot->nick, target)) {
       me = 1;
       domem = 1;				/* always set the mem if it's local */
       if (var->ldata)
@@ -560,7 +560,7 @@ void var_set_userentry(const char *target, const char *name, const char *data)
   struct userrec *u = NULL;
   bool me = 0;
 
-  if (!egg_strcasecmp(conf.bot->nick, target))
+  if (!strcasecmp(conf.bot->nick, target))
     me = 1;
 
   if (me && conf.bot)
@@ -724,7 +724,7 @@ static bool var_find_list(const char *botnick, variable_t *var, const char *elem
     slen = strlen(element);
   
   while ((item = strsep(&data, delim)))
-    if (!egg_strncasecmp(item, element, slen)) {
+    if (!strncasecmp(item, element, slen)) {
       free(datap);
       return true;
     }
@@ -800,7 +800,7 @@ static char *var_rem_list(const char *botnick, variable_t *var, const char *elem
   while ((word = strsep(&olddata, delim))) {
     ++i;
 
-    if ((num && num != i) || (!num && egg_strncasecmp(word, element, elen))) {
+    if ((num && num != i) || (!num && strncasecmp(word, element, elen))) {
       /* Reconstruct the left and right part of the list...*/
       if (data && data[0] && word && word[0]) {
         strlcat(data, ",", tsiz);
@@ -856,7 +856,7 @@ int cmd_set_real(const char *botnick, int idx, char *par)
   int list = 0, i = 0;
   bool notyes = 1, wildcard = 0;
 
-  if (par[0] && !egg_strncasecmp(par, "-yes", 4)) {
+  if (par[0] && !strncasecmp(par, "-yes", 4)) {
     notyes = 0;
     newsplit(&par);
   }
@@ -874,12 +874,12 @@ int cmd_set_real(const char *botnick, int idx, char *par)
       list = LIST_ADD; 
     else if (name[0] == '-')
       list = LIST_RM;
-    else if (!egg_strcasecmp(name, "list"))
+    else if (!strcasecmp(name, "list"))
       list = LIST_SHOW;
   }
 
   if (list) {
-    if (list != LIST_SHOW && name[1] && egg_strcasecmp(&name[1], "list"))
+    if (list != LIST_SHOW && name[1] && strcasecmp(&name[1], "list"))
       name = &name[1];
     else {
       if (!par[0]) {

+ 5 - 5
src/shell.c

@@ -1005,15 +1005,15 @@ void crontab_create(int interval) {
 int det_translate(const char *word)
 {
   if (word && word[0]) {
-    if (!egg_strcasecmp(word, STR("ignore")))
+    if (!strcasecmp(word, STR("ignore")))
       return DET_IGNORE;
-    else if (!egg_strcasecmp(word, STR("warn")))
+    else if (!strcasecmp(word, STR("warn")))
       return DET_WARN;
-    else if (!egg_strcasecmp(word, STR("reject")))
+    else if (!strcasecmp(word, STR("reject")))
       return DET_REJECT;
-    else if (!egg_strcasecmp(word, STR("die")))
+    else if (!strcasecmp(word, STR("die")))
       return DET_DIE;
-    else if (!egg_strcasecmp(word, STR("suicide")))
+    else if (!strcasecmp(word, STR("suicide")))
       return DET_SUICIDE;
   }
   return DET_IGNORE;

+ 1 - 1
src/socket.c

@@ -129,7 +129,7 @@ int egg_client(int idx, const char *host, int port, const char *vip, int vport,
 
 int socket_name(sockname_t *name, const char *ipaddr, int port)
 {
-        egg_bzero(name, sizeof(*name));
+        bzero(name, sizeof(*name));
 
         if (inet_pton(AF_INET, ipaddr, &name->u.ipv4.sin_addr) > 0) {
                 name->len = sizeof(name->u.ipv4);

+ 8 - 8
src/userent.c

@@ -220,7 +220,7 @@ static void added_display(int idx, struct user_entry *e, struct userrec *u)
       *hnd++ = 0;
     tm = atoi(tmp);
 
-    egg_strftime(tmp2, sizeof(tmp2), "%a, %d %b %Y %H:%M:%S %Z", gmtime(&tm));
+    strftime(tmp2, sizeof(tmp2), "%a, %d %b %Y %H:%M:%S %Z", gmtime(&tm));
     if (hnd)
       dprintf(idx, "  -- Added %s by %s\n", tmp2, hnd);
     else
@@ -248,7 +248,7 @@ static bool set_set(struct userrec *u, struct user_entry *e, void *buf)
 
   /* find the curr key if it exists */
   for (; curr; curr = curr->next) {
-    if (curr->key && !egg_strcasecmp(curr->key, newxk->key)) {
+    if (curr->key && !strcasecmp(curr->key, newxk->key)) {
       old = curr;
       break;
     }
@@ -299,7 +299,7 @@ static bool set_unpack(struct userrec *u, struct user_entry *e)
   head = curr = e->u.list;
   e->u.extra = NULL;
 
-  if (conf.bot->hub || !egg_strcasecmp(conf.bot->nick, u->handle)) {
+  if (conf.bot->hub || !strcasecmp(conf.bot->nick, u->handle)) {
     struct xtra_key *t = NULL;
     char *key = NULL, *data = NULL;
 
@@ -344,7 +344,7 @@ static bool set_gotshare(struct userrec *u, struct user_entry *e, char *buf, int
   if (!name || !name[0])
     return 1;
 
-  if (!egg_strcasecmp(u->handle, conf.bot->nick)) {
+  if (!strcasecmp(u->handle, conf.bot->nick)) {
     set_noshare = 1;
     var_set_by_name(conf.bot->nick, name, buf[0] ? buf : NULL);
     set_noshare = 0;
@@ -544,7 +544,7 @@ static void modified_display(int idx, struct user_entry *e, struct userrec *u)
     if (hnd)
       *hnd++ = 0;
     tm = atoi(tmp);
-    egg_strftime(tmp2, sizeof(tmp2), "%a, %d %b %Y %H:%M:%S %Z", gmtime(&tm));
+    strftime(tmp2, sizeof(tmp2), "%a, %d %b %Y %H:%M:%S %Z", gmtime(&tm));
     if (hnd)
       dprintf(idx, "  -- Modified %s by %s\n", tmp2, hnd);
     else
@@ -973,7 +973,7 @@ static void hosts_display(int idx, struct user_entry *e, struct userrec *u)
 
 static bool hosts_set(struct userrec *u, struct user_entry *e, void *buf)
 {
-  if (!buf || !egg_strcasecmp((const char *) buf, "none")) {
+  if (!buf || !strcasecmp((const char *) buf, "none")) {
     /* When the bot crashes, it's in this part, not in the 'else' part */
     list_type_kill(e->u.list);
     e->u.list = NULL;
@@ -1079,7 +1079,7 @@ struct user_entry_type *find_entry_type(char *name)
   struct user_entry_type *p = NULL;
 
   for (p = entry_type_list; p; p = p->next) {
-    if (!egg_strcasecmp(name, p->name))
+    if (!strcasecmp(name, p->name))
       return p;
   }
   return NULL;
@@ -1090,7 +1090,7 @@ struct user_entry *find_user_entry(struct user_entry_type *et, struct userrec *u
   struct user_entry **e = NULL, *t = NULL;
 
   for (e = &(u->entries); *e; e = &((*e)->next)) {
-    if (((*e)->type == et) || ((*e)->name && !egg_strcasecmp((*e)->name, et->name))) {
+    if (((*e)->type == et) || ((*e)->name && !strcasecmp((*e)->name, et->name))) {
       t = *e;
       *e = t->next;
       t->next = u->entries;

+ 8 - 8
src/userrec.c

@@ -78,7 +78,7 @@ int count_users(struct userrec *bu)
 static struct userrec *check_dcclist_hand(char *handle)
 {
   for (int i = 0; i < dcc_total; i++)
-    if (dcc[i].type && !egg_strcasecmp(dcc[i].nick, handle))
+    if (dcc[i].type && !strcasecmp(dcc[i].nick, handle))
       return dcc[i].user;
   return NULL;
 }
@@ -111,7 +111,7 @@ struct userrec *get_user_by_handle(struct userrec *bu, char *handle)
   struct userrec *ret = NULL;
 
   if (bu == userlist) {
-    if (lastuser && !egg_strcasecmp(lastuser->handle, handle)) {
+    if (lastuser && !strcasecmp(lastuser->handle, handle)) {
       cache_hit++;
       return lastuser;
     }
@@ -128,7 +128,7 @@ struct userrec *get_user_by_handle(struct userrec *bu, char *handle)
     cache_miss++;
   }
   for (struct userrec *u = bu; u; u = u->next)
-    if (!egg_strcasecmp(u->handle, handle)) {
+    if (!strcasecmp(u->handle, handle)) {
       if (bu == userlist)
 	lastuser = u;
       return u;
@@ -283,7 +283,7 @@ bool user_has_host(const char *handle, struct userrec *u, char *host)
   struct list_type *q = NULL;
 
   for (q = (struct list_type *) get_user(&USERENTRY_HOSTS, u); q; q = q->next)
-    if (!egg_strcasecmp(q->extra, host))
+    if (!strcasecmp(q->extra, host))
       return 1;
 
   return 0;
@@ -432,7 +432,7 @@ static int sort_compare(struct userrec *a, struct userrec *b)
     if (a->flags & ~b->flags & USER_OP)
       return 0;
   }
-  return (egg_strcasecmp(a->handle, b->handle) > 0);
+  return (strcasecmp(a->handle, b->handle) > 0);
 }
 
 static void sort_userlist()
@@ -551,7 +551,7 @@ int change_handle(struct userrec *u, char *newh)
   strlcpy(u->handle, newh, sizeof u->handle);
 
   for (int i = 0; i < dcc_total; i++)
-    if (dcc[i].type && dcc[i].type != &DCC_BOT && !egg_strcasecmp(dcc[i].nick, s)) {
+    if (dcc[i].type && dcc[i].type != &DCC_BOT && !strcasecmp(dcc[i].nick, s)) {
       strlcpy(dcc[i].nick, newh, sizeof dcc[i].nick);
       if (dcc[i].type == &DCC_CHAT && dcc[i].u.chat->channel >= 0) {
 	chanout_but(-1, dcc[i].u.chat->channel, "*** Handle change: %s -> %s\n", s, newh);
@@ -663,7 +663,7 @@ int deluser(char *handle)
   int fnd = 0;
 
   while ((u != NULL) && (!fnd)) {
-    if (!egg_strcasecmp(u->handle, handle))
+    if (!strcasecmp(u->handle, handle))
       fnd = 1;
     else {
       prev = u;
@@ -683,7 +683,7 @@ int deluser(char *handle)
       if (u->bot) {
         int i = nextbot(handle);
 
-        if (i != -1 && !egg_strcasecmp(dcc[i].nick, handle))
+        if (i != -1 && !strcasecmp(dcc[i].nick, handle))
           botunlink(-1, handle, "Bot removed.");
         else { /* This will probably never be called -- but just in case */
           /* Kill link in attempt/progress */

+ 10 - 10
src/users.c

@@ -390,9 +390,9 @@ tell_user(int idx, struct userrec *u)
   else {
     now2 = now - li->laston;
     if (now2 > 86400)
-      egg_strftime(s1, 7, "%d %b", gmtime(&li->laston));
+      strftime(s1, 7, "%d %b", gmtime(&li->laston));
     else
-      egg_strftime(s1, 6, "%H:%M", gmtime(&li->laston));
+      strftime(s1, 6, "%H:%M", gmtime(&li->laston));
   }
   if (!u->bot) {
     simple_snprintf(format, sizeof format, "%%-%us %%-5s %%-15s %%s (%%-10.10s)\n", HANDLEN);
@@ -413,9 +413,9 @@ tell_user(int idx, struct userrec *u)
         else {
   	  now2 = now - (ch->laston);
 	  if (now2 > 86400)
-	    egg_strftime(s1, 7, "%d %b", gmtime(&ch->laston));
+	    strftime(s1, 7, "%d %b", gmtime(&ch->laston));
 	  else
-	    egg_strftime(s1, 6, "%H:%M", gmtime(&ch->laston));
+	    strftime(s1, 6, "%H:%M", gmtime(&ch->laston));
         }
         fr.match = FR_CHAN;
         fr.chan = ch->flags;
@@ -809,7 +809,7 @@ int readuserfile(const char *file, struct userrec **ret)
 	    int ok = 0;
 
 	    for (ue = u->entries; ue && !ok; ue = ue->next)
-	      if (ue->name && !egg_strcasecmp(code + 2, ue->name)) {
+	      if (ue->name && !strcasecmp(code + 2, ue->name)) {
 		struct list_type *list = NULL;
 
 		list = (struct list_type *) my_calloc(1, sizeof(struct list_type));
@@ -897,10 +897,10 @@ int readuserfile(const char *file, struct userrec **ret)
 
 	      u = get_user_by_handle(bu, code);
 	      for (i = 0; i < dcc_total; i++)
-		if (dcc[i].type && !egg_strcasecmp(code, dcc[i].nick))
+		if (dcc[i].type && !strcasecmp(code, dcc[i].nick))
 		  dcc[i].user = u;
         
-              if (!egg_strcasecmp(code, conf.bot->nick))
+              if (!strcasecmp(code, conf.bot->nick))
                 conf.bot->u = u;
 
 	      /* if s starts with '/' it's got file info */
@@ -919,7 +919,7 @@ int readuserfile(const char *file, struct userrec **ret)
   for (u = bu; u; u = u->next) {
     struct user_entry *e = NULL;
 
-    if (!u->bot && !egg_strcasecmp (u->handle, conf.bot->nick)) {
+    if (!u->bot && !strcasecmp (u->handle, conf.bot->nick)) {
       putlog(LOG_MISC, "*", "(!) I have a user record, but am not classified as a BOT!");
       u->bot = 1;
     }
@@ -988,7 +988,7 @@ struct userrec *next_hub(struct userrec *current, char *lowval, char *highval)
       cur = userlist;
     if (cur == current)
       break;
-    if (cur->bot && (egg_strcasecmp(cur->handle, conf.bot->nick))) {
+    if (cur->bot && (strcasecmp(cur->handle, conf.bot->nick))) {
       link_pref_val(cur, thisval);
       if ((strcmp(thisval, lowval) < 0) && (strcmp(thisval, highval) > 0) &&(strcmp(thisval, bestmatchval) < 0)) {
         strlcpy(bestmatchval, thisval, sizeof(bestmatchval));
@@ -1097,7 +1097,7 @@ void autolink_random_hub(char *avoidbot) {
 
   for (struct userrec *u = userlist; u; u = u->next) {
     get_user_flagrec(u, &fr, NULL);
-    if (glob_bot(fr) && egg_strcasecmp(u->handle, conf.bot->nick) && (bot_hublevel(u) < 999)) {
+    if (glob_bot(fr) && strcasecmp(u->handle, conf.bot->nick) && (bot_hublevel(u) < 999)) {
       if (strcmp(u->handle, avoidbot)) {
         hl2 = hl;
         hl = (struct hublist_entry *) my_calloc(1, sizeof(struct hublist_entry));