Ver Fonte

* Some STR() additions
Still have 18 million more to check :/


svn: 822

Bryan Drewery há 22 anos atrás
pai
commit
80e085ed47
7 ficheiros alterados com 81 adições e 118 exclusões
  1. 2 2
      src/auth.c
  2. 21 44
      src/botcmd.c
  3. 36 43
      src/botmsg.c
  4. 11 17
      src/botnet.c
  5. 0 1
      src/botnet.h
  6. 9 9
      src/cfg.c
  7. 2 2
      src/mod/share.mod/share.c

+ 2 - 2
src/auth.c

@@ -84,7 +84,8 @@ char *makehash(struct userrec *u, char *randstring)
     secpass = strdup(get_user(&USERENTRY_SECPASS, u));
     secpass[strlen(secpass)] = 0;
   }
-  egg_snprintf(hash, sizeof hash, "%s%s%s", randstring, (secpass && secpass[0]) ? secpass : "" , (authkey && authkey[0]) ? authkey : "");
+  egg_snprintf(hash, sizeof hash, "%s%s%s", randstring, (secpass && secpass[0]) ? secpass : "" , 
+                                                        (authkey && authkey[0]) ? authkey : "");
   if (secpass)
     free(secpass);
 
@@ -116,7 +117,6 @@ int findauth(char *host)
       putlog(LOG_MISC, "*", "AUTH ENTRY: %d HAS NO HOST??", i);
       continue;
     }
-    putlog(LOG_DEBUG, "*", STR("Debug for findauth: checking: %s i: %d :: %s"), host, i, auth[i].host);
     if (auth[i].host && !strcmp(auth[i].host, host)) {
       return i;
     }

+ 21 - 44
src/botcmd.c

@@ -71,10 +71,8 @@ static void fake_alert(int idx, char *item, char *extra)
 
   if (now - lastfake > 10) {	
     /* Don't fake_alert more than once every 10secs */
-    dprintf(idx, "ct %s NOTICE: %s (%s != %s).\n",
-	    conf.bot->nick, NET_FAKEREJECT, item, extra);
-    putlog(LOG_BOTS, "*", "%s %s (%s != %s).", dcc[idx].nick, NET_FAKEREJECT,
-	 item, extra);
+    dprintf(idx, STR("ct %s NOTICE: %s (%s != %s).\n"), conf.bot->nick, NET_FAKEREJECT, item, extra);
+    putlog(LOG_BOTS, "*", "%s %s (%s != %s).", dcc[idx].nick, NET_FAKEREJECT, item, extra);
     lastfake = now;
   }
 }
@@ -392,8 +390,7 @@ static void remote_tell_who(int idx, char *nick, int chan)
   for (i = 0; i < dcc_total; i++) {
     if (dcc[i].type->flags & DCT_REMOTEWHO)
       if (dcc[i].u.chat->channel == chan) {
-	k = sprintf(s, "  %c%-15s %s",
-		    (geticon(i) == '-' ? ' ' : geticon(i)),
+	k = sprintf(s, "  %c%-15s %s", (geticon(i) == '-' ? ' ' : geticon(i)),
 		    dcc[i].nick, dcc[i].host);
 	if (now - dcc[i].timeval > 300) {
 	  unsigned long days, hrs, mins;
@@ -402,27 +399,22 @@ static void remote_tell_who(int idx, char *nick, int chan)
 	  hrs = ((now - dcc[i].timeval) - (days * 86400)) / 3600;
 	  mins = ((now - dcc[i].timeval) - (hrs * 3600)) / 60;
 	  if (days > 0)
-	    sprintf(s + k, " (%s %lud%luh)",
-		    MISC_IDLE, days, hrs);
+	    sprintf(s + k, " (%s %lud%luh)", MISC_IDLE, days, hrs);
 	  else if (hrs > 0)
-	    sprintf(s + k, " (%s %luh%lum)",
-		    MISC_IDLE, hrs, mins);
+	    sprintf(s + k, " (%s %luh%lum)", MISC_IDLE, hrs, mins);
 	  else
-	    sprintf(s + k, " (%s %lum)",
-		    MISC_IDLE, mins);
+	    sprintf(s + k, " (%s %lum)", MISC_IDLE, mins);
 	}
 	botnet_send_priv(idx, conf.bot->nick, nick, NULL, "%s", s);
 	if (dcc[i].u.chat->away != NULL)
-	  botnet_send_priv(idx, conf.bot->nick, nick, NULL, "      %s: %s",
-			   MISC_AWAY, dcc[i].u.chat->away);
+	  botnet_send_priv(idx, conf.bot->nick, nick, NULL, "      %s: %s", MISC_AWAY, dcc[i].u.chat->away);
       }
   }
   for (i = 0; i < dcc_total; i++) {
     if (dcc[i].type == &DCC_BOT) {
       if (!ok) {
 	ok = 1;
-	botnet_send_priv(idx, conf.bot->nick, nick, NULL,
-			 "%s:", BOT_BOTSCONNECTED);
+	botnet_send_priv(idx, conf.bot->nick, nick, NULL, "%s:", BOT_BOTSCONNECTED);
       }
       sprintf(s, "  %s%c%-15s %s",
 	      dcc[i].status & STAT_CALLED ? "<-" : "->",
@@ -437,11 +429,9 @@ static void remote_tell_who(int idx, char *nick, int chan)
       if (dcc[i].u.chat->channel != chan) {
 	if (!ok) {
 	  ok = 1;
-	  botnet_send_priv(idx, conf.bot->nick, nick, NULL, "%s:",
-			   BOT_OTHERPEOPLE);
+	  botnet_send_priv(idx, conf.bot->nick, nick, NULL, "%s:", BOT_OTHERPEOPLE);
 	}
-	l = sprintf(s, "  %c%-15s %s", (geticon(i) == '-' ? ' ' : geticon(i)),
-		    dcc[i].nick, dcc[i].host);
+	l = sprintf(s, "  %c%-15s %s", (geticon(i) == '-' ? ' ' : geticon(i)), dcc[i].nick, dcc[i].host);
 	if (now - dcc[i].timeval > 300) {
 	  k = (now - dcc[i].timeval) / 60;
 	  if (k < 60)
@@ -451,9 +441,7 @@ static void remote_tell_who(int idx, char *nick, int chan)
 	}
 	botnet_send_priv(idx, conf.bot->nick, nick, NULL, "%s", s);
 	if (dcc[i].u.chat->away != NULL)
-	  botnet_send_priv(idx, conf.bot->nick, nick, NULL,
-			   "      %s: %s", MISC_AWAY,
-			   dcc[i].u.chat->away);
+	  botnet_send_priv(idx, conf.bot->nick, nick, NULL, "      %s: %s", MISC_AWAY, dcc[i].u.chat->away);
       }
     }
   }
@@ -461,7 +449,6 @@ static void remote_tell_who(int idx, char *nick, int chan)
 
 static void bot_sysname(int idx, char *par)
 {
-  putlog(LOG_DEBUG, "@", "%s is using %s", dcc[idx].nick, par);
   dcc[idx].u.bot->sysname[0] = 0;
   strcpy(dcc[idx].u.bot->sysname, par);
 }
@@ -588,11 +575,9 @@ static void bot_link(int idx, char *par)
       rfrom = from;
     putlog(LOG_CMDS, "*", "#%s# link %s", rfrom, par);
     if (botlink(from, -1, par))
-      botnet_send_priv(idx, conf.bot->nick, from, NULL, "%s %s ...",
-		       BOT_LINKATTEMPT, par);
+      botnet_send_priv(idx, conf.bot->nick, from, NULL, "%s %s ...", BOT_LINKATTEMPT, par);
     else
-      botnet_send_priv(idx, conf.bot->nick, from, NULL, "%s.",
-		       BOT_CANTLINKTHERE);
+      botnet_send_priv(idx, conf.bot->nick, from, NULL, "%s.", BOT_CANTLINKTHERE);
   } else {
     i = nextbot(bot);
     if (i >= 0)
@@ -615,8 +600,7 @@ static void bot_unlink(int idx, char *par)
       rfrom++;
     else
       rfrom = from;
-    putlog(LOG_CMDS, "*", "#%s# unlink %s (%s)", rfrom, undes, par[0] ? par :
-	   "No reason");
+    putlog(LOG_CMDS, "*", "#%s# unlink %s (%s)", rfrom, undes, par[0] ? par : "No reason");
     i = botunlink(-3, undes, par[0] ? par : NULL);
     if (i == 1) {
       p = strchr(from, '@');
@@ -628,8 +612,7 @@ static void bot_unlink(int idx, char *par)
 	 */
 	i = nextbot(p + 1);
 	if (i >= 0)
-	  botnet_send_priv(i, conf.bot->nick, from, NULL,
-			   "Unlinked from %s.", undes);
+	  botnet_send_priv(i, conf.bot->nick, from, NULL, "Unlinked from %s.", undes);
       }
     } else if (i == 0) {
       botnet_send_unlinked(-1, undes, "");
@@ -638,16 +621,14 @@ static void bot_unlink(int idx, char *par)
 	/* Ditto above, about idx */
 	i = nextbot(p + 1);
 	if (i >= 0)
-	  botnet_send_priv(i, conf.bot->nick, from, NULL,
-			   "%s %s.", BOT_CANTUNLINK, undes);
+	  botnet_send_priv(i, conf.bot->nick, from, NULL, "%s %s.", BOT_CANTUNLINK, undes);
       }
     } else {
       p = strchr(from, '@');
       if (p) {
 	i = nextbot(p + 1);
 	if (i >= 0)
-	  botnet_send_priv(i, conf.bot->nick, from, NULL,
-			   "Can't remotely unlink sharebots.");
+	  botnet_send_priv(i, conf.bot->nick, from, NULL, "Can't remotely unlink sharebots.");
       }
     }
   } else {
@@ -685,17 +666,13 @@ static void bot_nlinked(int idx, char *par)
   next = newsplit(&par);
   s[0] = 0;
   if (!next[0]) {
-    putlog(LOG_BOTS, "*", "Invalid eggnet protocol from %s (zapfing)",
-	   dcc[idx].nick);
-    simple_sprintf(s, "%s %s (%s)", MISC_DISCONNECTED, dcc[idx].nick,
-		   MISC_INVALIDBOT);
+    putlog(LOG_BOTS, "*", "Invalid eggnet protocol from %s (zapfing)", dcc[idx].nick);
+    simple_sprintf(s, "%s %s (%s)", MISC_DISCONNECTED, dcc[idx].nick, MISC_INVALIDBOT);
     dprintf(idx, "error invalid eggnet protocol for 'nlinked'\n");
   } else if ((in_chain(newbot)) || (!egg_strcasecmp(newbot, conf.bot->nick))) {
     /* Loop! */
-    putlog(LOG_BOTS, "*", "%s %s (mutual: %s)",
-	   BOT_LOOPDETECT, dcc[idx].nick, newbot);
-    simple_sprintf(s, "%s %s: disconnecting %s", MISC_LOOP, newbot,
-        dcc[idx].nick);
+    putlog(LOG_BOTS, "*", "%s %s (mutual: %s)", BOT_LOOPDETECT, dcc[idx].nick, newbot);
+    simple_sprintf(s, "%s %s: disconnecting %s", MISC_LOOP, newbot, dcc[idx].nick);
     dprintf(idx, "error Loop (%s)\n", newbot);
   }
   if (!s[0]) {

+ 36 - 43
src/botmsg.c

@@ -175,7 +175,7 @@ void botnet_send_cmdpass(int idx, char *cmd, char *pass)
     char *buf = NULL;
 
     buf = malloc(strlen(cmd) + strlen(pass) + 5 + 1);
-    sprintf(buf, "cp %s %s\n", cmd, pass);
+    sprintf(buf, STR("cp %s %s\n"), cmd, pass);
     send_tand_but(idx, buf, strlen(buf));
     free(buf);
   }
@@ -231,7 +231,7 @@ void botnet_send_cmdreply(char * fbot, char * bot, char * to, char * toidx, char
 void botnet_send_bye()
 {
   if (tands > 0)
-    send_tand_but(-1, "bye\n", 4);
+    send_tand_but(-1, STR("bye\n"), 4);
 }
 
 void botnet_send_chan(int idx, char *botnick, char *user, int chan, char *data)
@@ -240,9 +240,9 @@ void botnet_send_chan(int idx, char *botnick, char *user, int chan, char *data)
 
   if ((tands > 0) && (chan < GLOBAL_CHANS)) {
     if (user) {
-      i = simple_sprintf(OBUF, "c %s@%s %D %s\n", user, botnick, chan, data);
+      i = simple_sprintf(OBUF, STR("c %s@%s %D %s\n"), user, botnick, chan, data);
     } else {
-      i = simple_sprintf(OBUF, "c %s %D %s\n", botnick, chan, data);
+      i = simple_sprintf(OBUF, STR("c %s %D %s\n"), botnick, chan, data);
     }
     send_tand_but(idx, OBUF, -i);
   }
@@ -254,9 +254,9 @@ void botnet_send_act(int idx, char *botnick, char *user, int chan, char *data)
 
   if ((tands > 0) && (chan < GLOBAL_CHANS)) {
     if (user) {
-      i = simple_sprintf(OBUF, "a %s@%s %D %s\n", user, botnick, chan, data);
+      i = simple_sprintf(OBUF, STR("a %s@%s %D %s\n"), user, botnick, chan, data);
     } else {
-      i = simple_sprintf(OBUF, "a %s %D %s\n", botnick, chan, data);
+      i = simple_sprintf(OBUF, STR("a %s %D %s\n"), botnick, chan, data);
     }
     send_tand_but(idx, OBUF, -i);
   }
@@ -267,20 +267,20 @@ void botnet_send_chat(int idx, char *botnick, char *data)
   int i;
 
   if (tands > 0) {
-    i = simple_sprintf(OBUF, "ct %s %s\n", botnick, data);
+    i = simple_sprintf(OBUF, STR("ct %s %s\n"), botnick, data);
     send_tand_but(idx, OBUF, -i);
   }
 }
 
 void botnet_send_ping(int idx)
 {
-  tputs(dcc[idx].sock, "pi\n", 3);
+  tputs(dcc[idx].sock, STR("pi\n"), 3);
   dcc[idx].pingtime = now;
 }
 
 void botnet_send_pong(int idx)
 {
-  tputs(dcc[idx].sock, "po\n", 3);
+  tputs(dcc[idx].sock, STR("po\n"), 3);
 }
 
 void botnet_send_priv (int idx, ...)
@@ -300,9 +300,9 @@ void botnet_send_priv (int idx, ...)
   tbuf[sizeof(tbuf)-1] = 0;
 
   if (tobot) {
-    l = simple_sprintf(OBUF, "p %s %s@%s %s\n", from, to, tobot, tbuf);
+    l = simple_sprintf(OBUF, STR("p %s %s@%s %s\n"), from, to, tobot, tbuf);
   } else {
-    l = simple_sprintf(OBUF, "p %s %s %s\n", from, to, tbuf);
+    l = simple_sprintf(OBUF, STR("p %s %s %s\n"), from, to, tbuf);
   }
   tputs(dcc[idx].sock, OBUF, l);
 }
@@ -311,23 +311,22 @@ void botnet_send_who(int idx, char *from, char *to, int chan)
 {
   int l;
 
-  l = simple_sprintf(OBUF, "w %s %s %D\n", from, to, chan);
+  l = simple_sprintf(OBUF, STR("w %s %s %D\n"), from, to, chan);
   tputs(dcc[idx].sock, OBUF, l);
 }
 
 void botnet_send_infoq(int idx, char *par)
 {
-  int i = simple_sprintf(OBUF, "i? %s\n", par);
+  int i = simple_sprintf(OBUF, STR("i? %s\n"), par);
 
   send_tand_but(idx, OBUF, i);
 }
 
-void botnet_send_unlink(int idx, char *who, char *via,
-			char *bot, char *reason)
+void botnet_send_unlink(int idx, char *who, char *via, char *bot, char *reason)
 {
   int l;
 
-  l = simple_sprintf(OBUF, "ul %s %s %s %s\n", who, via, bot, reason);
+  l = simple_sprintf(OBUF, STR("ul %s %s %s %s\n"), who, via, bot, reason);
   tputs(dcc[idx].sock, OBUF, l);
 }
 
@@ -335,7 +334,7 @@ void botnet_send_link(int idx, char *who, char *via, char *bot)
 {
   int l;
 
-  l = simple_sprintf(OBUF, "l %s %s %s\n", who, via, bot);
+  l = simple_sprintf(OBUF, STR("l %s %s %s\n"), who, via, bot);
   tputs(dcc[idx].sock, OBUF, l);
 }
 
@@ -344,18 +343,17 @@ void botnet_send_unlinked(int idx, char *bot, char *args)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, "un %s %s\n", bot, args ? args : "");
+    l = simple_sprintf(OBUF, STR("un %s %s\n"), bot, args ? args : "");
     send_tand_but(idx, OBUF, l);
   }
 }
 
-void botnet_send_nlinked(int idx, char *bot, char *next, char flag,
-			 int vernum)
+void botnet_send_nlinked(int idx, char *bot, char *next, char flag, int vernum)
 {
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, "n %s %s %c%D\n", bot, next, flag, vernum);
+    l = simple_sprintf(OBUF, STR("n %s %s %c%D\n"), bot, next, flag, vernum);
     send_tand_but(idx, OBUF, l);
   }
 }
@@ -364,7 +362,7 @@ void botnet_send_traced(int idx, char *bot, char *buf)
 {
   int l;
 
-  l = simple_sprintf(OBUF, "td %s %s\n", bot, buf);
+  l = simple_sprintf(OBUF, STR("td %s %s\n"), bot, buf);
   tputs(dcc[idx].sock, OBUF, l);
 }
 
@@ -372,7 +370,7 @@ void botnet_send_trace(int idx, char *to, char *from, char *buf)
 {
   int l;
 
-  l = simple_sprintf(OBUF, "t %s %s %s:%s\n", to, from, buf, conf.bot->nick);
+  l = simple_sprintf(OBUF, STR("t %s %s %s:%s\n"), to, from, buf, conf.bot->nick);
   tputs(dcc[idx].sock, OBUF, l);
 }
 
@@ -381,7 +379,7 @@ void botnet_send_update(int idx, tand_t * ptr)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, "u %s %c%D\n", ptr->bot, ptr->share, ptr->ver);
+    l = simple_sprintf(OBUF, STR("u %s %c%D\n"), ptr->bot, ptr->share, ptr->ver);
     send_tand_but(idx, OBUF, l);
   }
 }
@@ -402,7 +400,7 @@ void botnet_send_reject(int idx, char *fromp, char *frombot, char *top, char *to
     }
     if (!reason)
       reason = "";
-    l = simple_sprintf(OBUF, "r %s %s %s\n", fromp, top, reason);
+    l = simple_sprintf(OBUF, STR("r %s %s %s\n"), fromp, top, reason);
     tputs(dcc[idx].sock, OBUF, l);
   }
 }
@@ -430,7 +428,7 @@ void botnet_send_zapf(int idx, char *a, char *b, char *c)
 {
   int l;
 
-  l = simple_sprintf(OBUF, "z %s %s %s\n", a, b, c);
+  l = simple_sprintf(OBUF, STR("z %s %s %s\n"), a, b, c);
   tputs(dcc[idx].sock, OBUF, l);
 }
 
@@ -439,7 +437,7 @@ void botnet_send_zapf_broad(int idx, char *a, char *b, char *c)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, "zb %s %s%s%s\n", a, b ? b : "", b ? " " : "", c);
+    l = simple_sprintf(OBUF, STR("zb %s %s%s%s\n"), a, b ? b : "", b ? " " : "", c);
     send_tand_but(idx, OBUF, l);
   }
 }
@@ -464,20 +462,18 @@ void botnet_send_idle(int idx, char *bot, int sock, int idle, char *away)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, "i %s %D %D %s\n", bot, sock, idle, away ? away : "");
+    l = simple_sprintf(OBUF, STR("i %s %D %D %s\n"), bot, sock, idle, away ? away : "");
     send_tand_but(idx, OBUF, -l);
   }
 }
 
-void botnet_send_away(int idx, char *bot, int sock,
-		      char *msg, int linking)
+void botnet_send_away(int idx, char *bot, int sock, char *msg, int linking)
 {
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, "aw %s%s %D %s\n",
-		       ((idx >= 0) && linking) ? "!" : "",
-		       bot, sock, msg ? msg : "");
+    l = simple_sprintf(OBUF, STR("aw %s%s %D %s\n"), ((idx >= 0) && linking) ? "!" : "",
+                                                      bot, sock, msg ? msg : "");
     send_tand_but(idx, OBUF, -l);
   }
 }
@@ -487,7 +483,7 @@ void botnet_send_join_idx(int useridx, int oldchan)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, "j %s %s %D %c%D %s\n",
+    l = simple_sprintf(OBUF, STR("j %s %s %D %c%D %s\n"),
 		       conf.bot->nick, dcc[useridx].nick,
 		       dcc[useridx].u.chat->channel, geticon(useridx),
 		       dcc[useridx].sock, dcc[useridx].host);
@@ -500,7 +496,7 @@ void botnet_send_join_party(int idx, int linking, int useridx, int oldchan)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, "j %s%s %s %D %c%D %s\n", linking ? "!" : "",
+    l = simple_sprintf(OBUF, STR("j %s%s %s %D %c%D %s\n"), linking ? "!" : "",
 		       party[useridx].bot, party[useridx].nick,
 		       party[useridx].chan, party[useridx].flag,
 		       party[useridx].sock,
@@ -511,7 +507,7 @@ void botnet_send_join_party(int idx, int linking, int useridx, int oldchan)
 
 void botnet_send_part_idx(int useridx, char *reason)
 {
-  int l = simple_sprintf(OBUF, "pt %s %s %D %s\n", conf.bot->nick,
+  int l = simple_sprintf(OBUF, STR("pt %s %s %D %s\n"), conf.bot->nick,
 			 dcc[useridx].nick, dcc[useridx].sock,
 			 reason ? reason : "");
 
@@ -520,13 +516,12 @@ void botnet_send_part_idx(int useridx, char *reason)
   }
 }
 
-void botnet_send_part_party(int idx, int partyidx, char *reason,
-			    int silent)
+void botnet_send_part_party(int idx, int partyidx, char *reason, int silent)
 {
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, "pt %s%s %s %D %s\n",
+    l = simple_sprintf(OBUF, STR("pt %s%s %s %D %s\n"),
 		       silent ? "!" : "", party[partyidx].bot,
 		       party[partyidx].nick, party[partyidx].sock,
 		       reason ? reason : "");
@@ -539,8 +534,7 @@ void botnet_send_nkch(int useridx, char *oldnick)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, "nc %s %D %s\n", conf.bot->nick,
-		       dcc[useridx].sock, dcc[useridx].nick);
+    l = simple_sprintf(OBUF, STR("nc %s %D %s\n"), conf.bot->nick, dcc[useridx].sock, dcc[useridx].nick);
     send_tand_but(-1, OBUF, -l);
   }
 }
@@ -550,8 +544,7 @@ void botnet_send_nkch_part(int butidx, int useridx, char *oldnick)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, "nc %s %D %s\n", party[useridx].bot,
-		       party[useridx].sock, party[useridx].nick);
+    l = simple_sprintf(OBUF, STR("nc %s %D %s\n"), party[useridx].bot, party[useridx].sock, party[useridx].nick);
     send_tand_but(butidx, OBUF, -l);
   }
 }

+ 11 - 17
src/botnet.c

@@ -551,7 +551,7 @@ void tell_bots(int idx)
   tand_t *bot = NULL;
 
   if (!tands) {
-    dprintf(idx, STR("No bots linked\n"));
+    dprintf(idx, "No bots linked\n");
     return;
   }
   strcpy(s, conf.bot->nick);
@@ -559,7 +559,7 @@ void tell_bots(int idx)
 
   for (bot = tandbot; bot; bot = bot->next) {
     if (i > (500 - HANDLEN)) {
-      dprintf(idx, STR("Bots: %s\n"), s);
+      dprintf(idx, "Bots: %s\n", s);
       s[0] = 0;
       i = 0;
     }
@@ -571,8 +571,8 @@ void tell_bots(int idx)
     i += strlen(bot->bot);
   }
   if (s[0])
-    dprintf(idx, STR("Bots: %s\n"), s);
-  dprintf(idx, STR("(Total up: %d)\n"), tands + 1);
+    dprintf(idx, "Bots: %s\n", s);
+  dprintf(idx, "(Total up: %d)\n", tands + 1);
 
 }
 
@@ -725,8 +725,7 @@ void tell_bottree(int idx, int showver)
     }
   }
   /* Hop information: (9d) */
-  dprintf(idx, "Average hops: %3.1f, total bots: %d\n",
-	  ((float) tothops) / ((float) tands), tands + 1);
+  dprintf(idx, "Average hops: %3.1f, total bots: %d\n", ((float) tothops) / ((float) tands), tands + 1);
 }
 
 /* Dump list of links to a new bot
@@ -744,8 +743,7 @@ void dump_links(int z)
       p = conf.bot->nick;
     else
       p = bot->uplink->bot;
-    l = simple_sprintf(x, "n %s %s %c%D\n", bot->bot, p,
-			 bot->share, bot->ver);
+    l = simple_sprintf(x, STR("n %s %s %c%D\n"), bot->bot, p, bot->share, bot->ver);
     tputs(dcc[z].sock, x, l);
   }
   if (!(bot_flags(dcc[z].user) & BOT_ISOLATE)) {
@@ -754,12 +752,12 @@ void dump_links(int z)
       if (dcc[i].type == &DCC_CHAT) {
 	if ((dcc[i].u.chat->channel >= 0) &&
 	    (dcc[i].u.chat->channel < GLOBAL_CHANS)) {
-          l = simple_sprintf(x, "j !%s %s %D %c%D %s\n",
+          l = simple_sprintf(x, STR("j !%s %s %D %c%D %s\n"),
 			       conf.bot->nick, dcc[i].nick,
 			       dcc[i].u.chat->channel, geticon(i),
 			       dcc[i].sock, dcc[i].host);
 	  tputs(dcc[z].sock, x, l);
-          l = simple_sprintf(x, "i %s %D %D %s\n", conf.bot->nick,
+          l = simple_sprintf(x, STR("i %s %D %D %s\n"), conf.bot->nick,
 			       dcc[i].sock, now - dcc[i].timeval,
 			 dcc[i].u.chat->away ? dcc[i].u.chat->away : "");
 	  tputs(dcc[z].sock, x, l);
@@ -767,13 +765,13 @@ void dump_links(int z)
       }
     }
     for (i = 0; i < parties; i++) {
-      l = simple_sprintf(x, "j %s %s %D %c%D %s\n",
+      l = simple_sprintf(x, STR("j %s %s %D %c%D %s\n"),
 			   party[i].bot, party[i].nick,
 			   party[i].chan, party[i].flag,
 			   party[i].sock, party[i].from);
       tputs(dcc[z].sock, x, l);
       if ((party[i].status & PLSTAT_AWAY) || (party[i].timer != 0)) {
-        l = simple_sprintf(x, "i %s %D %D %s\n", party[i].bot,
+        l = simple_sprintf(x, STR("i %s %D %D %s\n"), party[i].bot,
 			     party[i].sock, now - party[i].timer,
 			     party[i].away ? party[i].away : "");
 	tputs(dcc[z].sock, x, l);
@@ -1733,11 +1731,7 @@ void lower_bot_linked(int idx)
 {
   char tmp[6] = "";
 
-  sprintf(tmp, "rl %d", get_role(dcc[idx].nick));
+  sprintf(tmp, STR("rl %d"), get_role(dcc[idx].nick));
   botnet_send_zapf(nextbot(dcc[idx].nick), conf.bot->nick, dcc[idx].nick, tmp);
 }
 
-void higher_bot_linked(int idx)
-{
-
-}

+ 0 - 1
src/botnet.h

@@ -13,7 +13,6 @@ extern int		tands;
 
 void restart_chons();
 void lower_bot_linked(int idx);
-void higher_bot_linked(int idx);
 void answer_local_whom(int, int);
 char *lastbot(char *);
 int nextbot(char *);

+ 9 - 9
src/cfg.c

@@ -226,28 +226,28 @@ void deflag_user(struct userrec *u, int why, char *msg, struct chanset_t *chan)
     ent = NULL;
     sprintf(tmp, STR("Reason #%i"), why);
   }
-  if (ent && ent->gdata && !strcmp(ent->gdata, STR("deop"))) {
-    putlog(LOG_WARN, "*",  STR("Setting %s +d (%s): %s"), u->handle, tmp, msg);
+  if (ent && ent->gdata && !strcmp(ent->gdata, "deop")) {
+    putlog(LOG_WARN, "*",  "Setting %s +d (%s): %s", u->handle, tmp, msg);
     sprintf(tmp2, STR("+d: %s (%s)"), tmp, msg);
     set_user(&USERENTRY_COMMENT, u, tmp2);
     get_user_flagrec(u, &fr, chan->dname);
     fr.global = USER_DEOP;
     fr.chan = USER_DEOP;
     set_user_flagrec(u, &fr, chan->dname);
-  } else if (ent && ent->gdata && !strcmp(ent->gdata, STR("kick"))) {
-    putlog(LOG_WARN, "*",  STR("Setting %s +dk (%s): %s"), u->handle, tmp, msg);
-    sprintf(tmp2, STR("+dk: %s (%s)"), tmp, msg);
+  } else if (ent && ent->gdata && !strcmp(ent->gdata, "kick")) {
+    putlog(LOG_WARN, "*",  "Setting %s +dk (%s): %s", u->handle, tmp, msg);
+    sprintf(tmp2, "+dk: %s (%s)", tmp, msg);
     set_user(&USERENTRY_COMMENT, u, tmp2);
     get_user_flagrec(u, &fr, chan->dname);
     fr.global = USER_DEOP | USER_KICK;
     fr.chan = USER_DEOP | USER_KICK;
     set_user_flagrec(u, &fr, chan->dname);
-  } else if (ent && ent->gdata && !strcmp(ent->gdata, STR("delete"))) {
-    putlog(LOG_WARN, "*",  STR("Deleting %s (%s): %s"), u->handle, tmp, msg);
+  } else if (ent && ent->gdata && !strcmp(ent->gdata, "delete")) {
+    putlog(LOG_WARN, "*",  "Deleting %s (%s): %s", u->handle, tmp, msg);
     deluser(u->handle);
   } else {
-    putlog(LOG_WARN, "*",  STR("No user flag effects for %s (%s): %s"), u->handle, tmp, msg);
-    sprintf(tmp2, STR("Warning: %s (%s)"), tmp, msg);
+    putlog(LOG_WARN, "*",  "No user flag effects for %s (%s): %s", u->handle, tmp, msg);
+    sprintf(tmp2, "Warning: %s (%s)", tmp, msg);
     set_user(&USERENTRY_COMMENT, u, tmp2);
   }
 }

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

@@ -1200,8 +1200,8 @@ static void share_version(int idx, char *par)
     else
       dprintf(idx, "s u?\n");
     dcc[idx].status |= STAT_OFFERED;
-  } else
-    higher_bot_linked(idx);
+  } /*else
+    higher_bot_linked(idx);*/
 }
 
 static void hook_read_userfile()