Browse Source

* Removed majority of garblestrings.

svn: 871
Bryan Drewery 22 years ago
parent
commit
2627a9aecb
27 changed files with 874 additions and 880 deletions
  1. 1 0
      doc/UPDATES
  2. 1 1
      src/binary.c
  3. 1 1
      src/binary.h
  4. 1 1
      src/botcmd.c
  5. 39 45
      src/botmsg.c
  6. 5 5
      src/botnet.c
  7. 41 41
      src/cfg.c
  8. 1 1
      src/chanprog.c
  9. 163 162
      src/cmds.c
  10. 3 3
      src/conf.c
  11. 28 28
      src/dcc.c
  12. 13 13
      src/dccutil.c
  13. 12 12
      src/debug.c
  14. 27 27
      src/main.c
  15. 113 113
      src/misc.c
  16. 8 8
      src/mod/channels.mod/channels.c
  17. 173 173
      src/mod/ctcp.mod/ctcp.c
  18. 15 15
      src/mod/irc.mod/chan.c
  19. 6 6
      src/mod/irc.mod/cmdsirc.c
  20. 65 65
      src/mod/irc.mod/irc.c
  21. 17 17
      src/mod/irc.mod/mode.c
  22. 1 1
      src/mod/server.mod/server.c
  23. 8 8
      src/mod/share.mod/share.c
  24. 25 25
      src/net.c
  25. 51 51
      src/shell.c
  26. 20 20
      src/userent.c
  27. 36 38
      src/users.c

+ 1 - 0
doc/UPDATES

@@ -25,6 +25,7 @@ This is a summary of ChangeLog basically.
 22.Added config setting "chanset". Change to what flags new channels will have. 
    Original default list will apply for options you leave out.
 23.Bot now saves/checks it's binary md5 checksum.
+24.Removed the majority of the garblestrings. Was slowing the bot down.
 
 1.1.3
 1.Fixed a very fatal bug with channel ctcps.

+ 1 - 1
src/binary.c

@@ -60,7 +60,7 @@ bin_md5(const char *fname, int todo)
 
   p += 16;
   size_p += 16;
-  /* now we have 4096 for data :D */
+  /* now we have 512 for data :D */
 
   MD5_Update(&ctx, buf, size_p);
   MD5_Final(md5out, &ctx);

+ 1 - 1
src/binary.h

@@ -3,7 +3,7 @@
 
 typedef struct encdata_struct {
   char prefix[16];
-  char data[4096];
+  char data[512];
 } encdata_t;
 
 

+ 1 - 1
src/botcmd.c

@@ -71,7 +71,7 @@ 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, STR("ct %s NOTICE: %s (%s != %s).\n"), conf.bot->nick, NET_FAKEREJECT, item, extra);
+    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);
     lastfake = now;
   }

+ 39 - 45
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, STR("cp %s %s\n"), cmd, pass);
+    sprintf(buf, "cp %s %s\n", cmd, pass);
     send_tand_but(idx, buf, strlen(buf));
     free(buf);
   }
@@ -186,10 +186,8 @@ int botnet_send_cmd(char * fbot, char * bot, char * from, int fromidx, char * cm
   int i = nextbot(bot);
 
   if (i >= 0) {
-    char buf[2048] = "";
-
-    sprintf(buf, STR("rc %s %s %s %i %s\n"), bot, fbot, from, fromidx, cmd);
-    tputs(dcc[i].sock, buf, strlen(buf));
+    simple_sprintf(OBUF, "rc %s %s %s %i %s\n", bot, fbot, from, fromidx, cmd);
+    tputs(dcc[i].sock, OBUF, strlen(OBUF));
     return 1;
   } else if (!strcmp(bot, conf.bot->nick)) {
     char tmp[24] = "";
@@ -202,10 +200,8 @@ int botnet_send_cmd(char * fbot, char * bot, char * from, int fromidx, char * cm
 
 void botnet_send_cmd_broad(int idx, char * fbot, char * from, int fromidx, char * cmd) {
   if (tands > 0) {
-    char buf[2048] = "";
-
-    egg_snprintf(buf, sizeof buf, STR("rc * %s %s %i %s\n"), fbot, from, fromidx, cmd);
-    send_tand_but(idx, buf, strlen(buf));
+    egg_snprintf(OBUF, sizeof OBUF, "rc * %s %s %i %s\n", fbot, from, fromidx, cmd);
+    send_tand_but(idx, OBUF, strlen(OBUF));
   }
   if (idx<0) {
     char tmp[24] = "";
@@ -218,10 +214,8 @@ void botnet_send_cmd_broad(int idx, char * fbot, char * from, int fromidx, char
 void botnet_send_cmdreply(char * fbot, char * bot, char * to, char * toidx, char * ln) {
   int i = nextbot(bot);
   if (i>=0) {
-    char buf[2048] = "";
-
-    egg_snprintf(buf, sizeof buf, STR("rr %s %s %s %s %s\n"), bot, fbot, to, toidx, ln);
-    tputs(dcc[i].sock, buf, strlen(buf));
+    egg_snprintf(OBUF, sizeof OBUF, "rr %s %s %s %s %s\n", bot, fbot, to, toidx, ln);
+    tputs(dcc[i].sock, OBUF, strlen(OBUF));
   } else if (!strcmp(bot, conf.bot->nick)) {
     gotremotereply(conf.bot->nick, to, toidx, ln);
   }
@@ -231,7 +225,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, STR("bye\n"), 4);
+    send_tand_but(-1, "bye\n", 4);
 }
 
 void botnet_send_chan(int idx, char *botnick, char *user, int chan, char *data)
@@ -240,9 +234,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, STR("c %s@%s %D %s\n"), user, botnick, chan, data);
+      i = simple_sprintf(OBUF, "c %s@%s %D %s\n", user, botnick, chan, data);
     } else {
-      i = simple_sprintf(OBUF, STR("c %s %D %s\n"), botnick, chan, data);
+      i = simple_sprintf(OBUF, "c %s %D %s\n", botnick, chan, data);
     }
     send_tand_but(idx, OBUF, -i);
   }
@@ -254,9 +248,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, STR("a %s@%s %D %s\n"), user, botnick, chan, data);
+      i = simple_sprintf(OBUF, "a %s@%s %D %s\n", user, botnick, chan, data);
     } else {
-      i = simple_sprintf(OBUF, STR("a %s %D %s\n"), botnick, chan, data);
+      i = simple_sprintf(OBUF, "a %s %D %s\n", botnick, chan, data);
     }
     send_tand_but(idx, OBUF, -i);
   }
@@ -267,20 +261,20 @@ void botnet_send_chat(int idx, char *botnick, char *data)
   int i;
 
   if (tands > 0) {
-    i = simple_sprintf(OBUF, STR("ct %s %s\n"), botnick, data);
+    i = simple_sprintf(OBUF, "ct %s %s\n", botnick, data);
     send_tand_but(idx, OBUF, -i);
   }
 }
 
 void botnet_send_ping(int idx)
 {
-  tputs(dcc[idx].sock, STR("pi\n"), 3);
+  tputs(dcc[idx].sock, "pi\n", 3);
   dcc[idx].pingtime = now;
 }
 
 void botnet_send_pong(int idx)
 {
-  tputs(dcc[idx].sock, STR("po\n"), 3);
+  tputs(dcc[idx].sock, "po\n", 3);
 }
 
 void botnet_send_priv (int idx, ...)
@@ -300,9 +294,9 @@ void botnet_send_priv (int idx, ...)
   tbuf[sizeof(tbuf)-1] = 0;
 
   if (tobot) {
-    l = simple_sprintf(OBUF, STR("p %s %s@%s %s\n"), from, to, tobot, tbuf);
+    l = simple_sprintf(OBUF, "p %s %s@%s %s\n", from, to, tobot, tbuf);
   } else {
-    l = simple_sprintf(OBUF, STR("p %s %s %s\n"), from, to, tbuf);
+    l = simple_sprintf(OBUF, "p %s %s %s\n", from, to, tbuf);
   }
   tputs(dcc[idx].sock, OBUF, l);
 }
@@ -311,13 +305,13 @@ void botnet_send_who(int idx, char *from, char *to, int chan)
 {
   int l;
 
-  l = simple_sprintf(OBUF, STR("w %s %s %D\n"), from, to, chan);
+  l = simple_sprintf(OBUF, "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, STR("i? %s\n"), par);
+  int i = simple_sprintf(OBUF, "i? %s\n", par);
 
   send_tand_but(idx, OBUF, i);
 }
@@ -326,7 +320,7 @@ void botnet_send_unlink(int idx, char *who, char *via, char *bot, char *reason)
 {
   int l;
 
-  l = simple_sprintf(OBUF, STR("ul %s %s %s %s\n"), who, via, bot, reason);
+  l = simple_sprintf(OBUF, "ul %s %s %s %s\n", who, via, bot, reason);
   tputs(dcc[idx].sock, OBUF, l);
 }
 
@@ -334,7 +328,7 @@ void botnet_send_link(int idx, char *who, char *via, char *bot)
 {
   int l;
 
-  l = simple_sprintf(OBUF, STR("l %s %s %s\n"), who, via, bot);
+  l = simple_sprintf(OBUF, "l %s %s %s\n", who, via, bot);
   tputs(dcc[idx].sock, OBUF, l);
 }
 
@@ -343,7 +337,7 @@ void botnet_send_unlinked(int idx, char *bot, char *args)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, STR("un %s %s\n"), bot, args ? args : "");
+    l = simple_sprintf(OBUF, "un %s %s\n", bot, args ? args : "");
     send_tand_but(idx, OBUF, l);
   }
 }
@@ -353,7 +347,7 @@ void botnet_send_nlinked(int idx, char *bot, char *next, char flag, int vernum)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, STR("n %s %s %c%D\n"), bot, next, flag, vernum);
+    l = simple_sprintf(OBUF, "n %s %s %c%D\n", bot, next, flag, vernum);
     send_tand_but(idx, OBUF, l);
   }
 }
@@ -362,7 +356,7 @@ void botnet_send_traced(int idx, char *bot, char *buf)
 {
   int l;
 
-  l = simple_sprintf(OBUF, STR("td %s %s\n"), bot, buf);
+  l = simple_sprintf(OBUF, "td %s %s\n", bot, buf);
   tputs(dcc[idx].sock, OBUF, l);
 }
 
@@ -370,7 +364,7 @@ void botnet_send_trace(int idx, char *to, char *from, char *buf)
 {
   int l;
 
-  l = simple_sprintf(OBUF, STR("t %s %s %s:%s\n"), to, from, buf, conf.bot->nick);
+  l = simple_sprintf(OBUF, "t %s %s %s:%s\n", to, from, buf, conf.bot->nick);
   tputs(dcc[idx].sock, OBUF, l);
 }
 
@@ -379,7 +373,7 @@ void botnet_send_update(int idx, tand_t * ptr)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, STR("u %s %c%D\n"), ptr->bot, ptr->share, ptr->ver);
+    l = simple_sprintf(OBUF, "u %s %c%D\n", ptr->bot, ptr->share, ptr->ver);
     send_tand_but(idx, OBUF, l);
   }
 }
@@ -400,7 +394,7 @@ void botnet_send_reject(int idx, char *fromp, char *frombot, char *top, char *to
     }
     if (!reason)
       reason = "";
-    l = simple_sprintf(OBUF, STR("r %s %s %s\n"), fromp, top, reason);
+    l = simple_sprintf(OBUF, "r %s %s %s\n", fromp, top, reason);
     tputs(dcc[idx].sock, OBUF, l);
   }
 }
@@ -428,7 +422,7 @@ void botnet_send_zapf(int idx, char *a, char *b, char *c)
 {
   int l;
 
-  l = simple_sprintf(OBUF, STR("z %s %s %s\n"), a, b, c);
+  l = simple_sprintf(OBUF, "z %s %s %s\n", a, b, c);
   tputs(dcc[idx].sock, OBUF, l);
 }
 
@@ -437,7 +431,7 @@ void botnet_send_zapf_broad(int idx, char *a, char *b, char *c)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, STR("zb %s %s%s%s\n"), a, b ? b : "", b ? " " : "", c);
+    l = simple_sprintf(OBUF, "zb %s %s%s%s\n", a, b ? b : "", b ? " " : "", c);
     send_tand_but(idx, OBUF, l);
   }
 }
@@ -445,14 +439,14 @@ void botnet_send_zapf_broad(int idx, char *a, char *b, char *c)
 void botnet_send_cfg(int idx, struct cfg_entry * entry) {
   int l;
 
-  l = simple_sprintf(OBUF, STR("cg %s %s\n"), entry->name, entry->gdata ? entry->gdata : "");
+  l = simple_sprintf(OBUF, "cg %s %s\n", entry->name, entry->gdata ? entry->gdata : "");
   tputs(dcc[idx].sock, OBUF, l);
 }
 
 void botnet_send_cfg_broad(int idx, struct cfg_entry * entry) {
   int l;
   if (tands > 0) {
-      l = simple_sprintf(OBUF, STR("cgb %s %s\n"), entry->name, entry->gdata ? entry->gdata : "");
+      l = simple_sprintf(OBUF, "cgb %s %s\n", entry->name, entry->gdata ? entry->gdata : "");
     send_tand_but(idx, OBUF, l);
   }
 }
@@ -462,7 +456,7 @@ void botnet_send_idle(int idx, char *bot, int sock, int idle, char *away)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, STR("i %s %D %D %s\n"), bot, sock, idle, away ? away : "");
+    l = simple_sprintf(OBUF, "i %s %D %D %s\n", bot, sock, idle, away ? away : "");
     send_tand_but(idx, OBUF, -l);
   }
 }
@@ -472,7 +466,7 @@ void botnet_send_away(int idx, char *bot, int sock, char *msg, int linking)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, STR("aw %s%s %D %s\n"), ((idx >= 0) && linking) ? "!" : "",
+    l = simple_sprintf(OBUF, "aw %s%s %D %s\n", ((idx >= 0) && linking) ? "!" : "",
                                                       bot, sock, msg ? msg : "");
     send_tand_but(idx, OBUF, -l);
   }
@@ -483,7 +477,7 @@ void botnet_send_join_idx(int useridx, int oldchan)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, STR("j %s %s %D %c%D %s\n"),
+    l = simple_sprintf(OBUF, "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);
@@ -496,7 +490,7 @@ void botnet_send_join_party(int idx, int linking, int useridx, int oldchan)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, STR("j %s%s %s %D %c%D %s\n"), linking ? "!" : "",
+    l = simple_sprintf(OBUF, "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,
@@ -507,7 +501,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, STR("pt %s %s %D %s\n"), conf.bot->nick,
+  int l = simple_sprintf(OBUF, "pt %s %s %D %s\n", conf.bot->nick,
 			 dcc[useridx].nick, dcc[useridx].sock,
 			 reason ? reason : "");
 
@@ -521,7 +515,7 @@ void botnet_send_part_party(int idx, int partyidx, char *reason, int silent)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, STR("pt %s%s %s %D %s\n"),
+    l = simple_sprintf(OBUF, "pt %s%s %s %D %s\n",
 		       silent ? "!" : "", party[partyidx].bot,
 		       party[partyidx].nick, party[partyidx].sock,
 		       reason ? reason : "");
@@ -534,7 +528,7 @@ void botnet_send_nkch(int useridx, char *oldnick)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, STR("nc %s %D %s\n"), conf.bot->nick, dcc[useridx].sock, dcc[useridx].nick);
+    l = simple_sprintf(OBUF, "nc %s %D %s\n", conf.bot->nick, dcc[useridx].sock, dcc[useridx].nick);
     send_tand_but(-1, OBUF, -l);
   }
 }
@@ -544,7 +538,7 @@ void botnet_send_nkch_part(int butidx, int useridx, char *oldnick)
   int l;
 
   if (tands > 0) {
-    l = simple_sprintf(OBUF, STR("nc %s %D %s\n"), party[useridx].bot, party[useridx].sock, party[useridx].nick);
+    l = simple_sprintf(OBUF, "nc %s %D %s\n", party[useridx].bot, party[useridx].sock, party[useridx].nick);
     send_tand_but(butidx, OBUF, -l);
   }
 }

+ 5 - 5
src/botnet.c

@@ -743,7 +743,7 @@ void dump_links(int z)
       p = conf.bot->nick;
     else
       p = bot->uplink->bot;
-    l = simple_sprintf(x, STR("n %s %s %c%D\n"), bot->bot, p, bot->share, bot->ver);
+    l = simple_sprintf(x, "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)) {
@@ -752,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, STR("j !%s %s %D %c%D %s\n"),
+          l = simple_sprintf(x, "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, STR("i %s %D %D %s\n"), conf.bot->nick,
+          l = simple_sprintf(x, "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);
@@ -765,13 +765,13 @@ void dump_links(int z)
       }
     }
     for (i = 0; i < parties; i++) {
-      l = simple_sprintf(x, STR("j %s %s %D %c%D %s\n"),
+      l = simple_sprintf(x, "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, STR("i %s %D %D %s\n"), party[i].bot,
+        l = simple_sprintf(x, "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);

+ 41 - 41
src/cfg.c

@@ -165,7 +165,7 @@ void deflag_changed(struct cfg_entry *entry, char *oldval, int *valid)
   if (!(p = (char *) entry->gdata))
     return;
 
-  if (strcmp(p, STR("ignore")) && strcmp(p, STR("deop")) && strcmp(p, STR("kick")) && strcmp(p, STR("delete")))
+  if (strcmp(p, "ignore") && strcmp(p, "deop") && strcmp(p, "kick") && strcmp(p, "delete"))
     *valid=0;
 }
 
@@ -218,7 +218,7 @@ void deflag_user(struct userrec *u, int why, char *msg, struct chanset_t *chan)
 
   switch (why) {
   case DEFLAG_BADCOOKIE:
-    strcpy(tmp, STR("Bad op cookie"));
+    strcpy(tmp, "Bad op cookie");
     ent = &CFG_BADCOOKIE;
     break;
   case DEFLAG_MANUALOP:
@@ -240,20 +240,20 @@ void deflag_user(struct userrec *u, int why, char *msg, struct chanset_t *chan)
     break;
 #endif /* G_MEAN */
   case DEFLAG_MDOP:
-    strcpy(tmp, STR("Mass deop"));
+    strcpy(tmp, "Mass deop");
     ent = &CFG_MDOP;
     break;
   case DEFLAG_MOP:
-    strcpy(tmp, STR("Mass op"));
+    strcpy(tmp, "Mass op");
     ent = &CFG_MOP;
     break;
   default:
     ent = NULL;
-    sprintf(tmp, STR("Reason #%i"), why);
+    sprintf(tmp, "Reason #%i", why);
   }
   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);
+    sprintf(tmp2, "+d: %s (%s)", tmp, msg);
     set_user(&USERENTRY_COMMENT, u, tmp2);
     get_user_flagrec(u, &fr, chan->dname);
     fr.global = USER_DEOP;
@@ -282,35 +282,35 @@ void misc_describe(struct cfg_entry *cfgent, int idx)
 #ifdef HUB
   int i = 0;
 
-  if (!strcmp(cfgent->name, STR("fork-interval"))) {
+  if (!strcmp(cfgent->name, "fork-interval")) {
     dprintf(idx, STR("fork-interval is number of seconds in between each fork() call made by the bot, to change process ID and reset cpu usage counters.\n"));
     i = 1;
 #ifdef S_LASTCHECK
-  } else if (!strcmp(cfgent->name, STR("login"))) {
+  } else if (!strcmp(cfgent->name, "login")) {
     dprintf(idx, STR("login sets how to handle someone logging in to the shell\n"));
 #endif /* S_LASTCHECK */
 #ifdef S_ANTITRACE
-  } else if (!strcmp(cfgent->name, STR("trace"))) {
+  } else if (!strcmp(cfgent->name, "trace")) {
     dprintf(idx, STR("trace sets how to handle someone tracing/debugging the bot\n"));
 #endif /* S_ANTITRACE */
 #ifdef S_PROMISC
-  } else if (!strcmp(cfgent->name, STR("promisc"))) {
+  } else if (!strcmp(cfgent->name, "promisc")) {
     dprintf(idx, STR("promisc sets how to handle when a interface is set to promiscuous mode\n"));
 #endif /* S_PROMISC */
 #ifdef S_PROCESSCHECK
-  } else if (!strcmp(cfgent->name, STR("bad-process"))) {
+  } else if (!strcmp(cfgent->name, "bad-process")) {
     dprintf(idx, STR("bad-process sets how to handle when a running process not listed in process-list is detected\n"));
-  } else if (!strcmp(cfgent->name, STR("process-list"))) {
+  } else if (!strcmp(cfgent->name, "process-list")) {
     dprintf(idx, STR("process-list is a comma-separated list of \"expected processes\" running on the bots uid\n"));
     i = 1;
 #endif /* S_PROCESSCHECK */
 #ifdef S_HIJACKCHECK
-  } else if (!strcmp(cfgent->name, STR("hijack"))) {
+  } else if (!strcmp(cfgent->name, "hijack")) {
     dprintf(idx, STR("hijack sets how to handle when a commonly used hijack method attempt is detected. (recommended: die)\n"));
 #endif /* S_HIJACKCHECK */
   }
   if (!i)
-    dprintf(idx, STR("Valid settings are: ignore, warn, die, reject, suicide\n"));
+    dprintf(idx, "Valid settings are: ignore, warn, die, reject, suicide\n");
 #endif /* HUB */
 }
 
@@ -344,8 +344,8 @@ void detect_lchanged(struct cfg_entry * cfgent, char * oldval, int * valid) {
 
   if (!(p = (char *) cfgent->ldata))
     *valid = 1;
-  else if (strcmp(p, STR("ignore")) && strcmp(p, STR("die")) && strcmp(p, STR("reject"))
-           && strcmp(p, STR("suicide")) && strcmp(p, STR("warn")))
+  else if (strcmp(p, "ignore") && strcmp(p, "die") && strcmp(p, "reject")
+           && strcmp(p, "suicide") && strcmp(p, "warn"))
     *valid = 0;
 }
 
@@ -353,8 +353,8 @@ void detect_gchanged(struct cfg_entry * cfgent, char * oldval, int * valid) {
   char *p = (char *) cfgent->ldata;
   if (!p)
     *valid=1;
-  else if (strcmp(p, STR("ignore")) && strcmp(p, STR("die")) && strcmp(p, STR("reject"))
-           && strcmp(p, STR("suicide")) && strcmp(p, STR("warn")))
+  else if (strcmp(p, "ignore") && strcmp(p, "die") && strcmp(p, "reject")
+           && strcmp(p, "suicide") && strcmp(p, "warn"))
     *valid=0;
 }
 
@@ -445,21 +445,21 @@ struct cfg_entry CFG_REALNAME = {
 void getin_describe(struct cfg_entry *cfgent, int idx)
 {
 #ifdef HUB
-  if (!strcmp(cfgent->name, STR("op-bots")))
+  if (!strcmp(cfgent->name, "op-bots"))
     dprintf(idx, STR("op-bots is number of bots to ask every time a oprequest is to be made\n"));
-  else if (!strcmp(cfgent->name, STR("in-bots")))
+  else if (!strcmp(cfgent->name, "in-bots"))
     dprintf(idx, STR("in-bots is number of bots to ask every time a inrequest is to be made\n"));
-  else if (!strcmp(cfgent->name, STR("op-requests")))
+  else if (!strcmp(cfgent->name, "op-requests"))
     dprintf(idx, STR("op-requests (requests:seconds) limits how often the bot will ask for ops\n"));
-  else if (!strcmp(cfgent->name, STR("lag-threshold")))
+  else if (!strcmp(cfgent->name, "lag-threshold"))
     dprintf(idx, STR("lag-threshold is maximum acceptable server lag for the bot to send/honor requests\n"));
-  else if (!strcmp(cfgent->name, STR("op-time-slack")))
+  else if (!strcmp(cfgent->name, "op-time-slack"))
     dprintf(idx, STR("op-time-slack is number of seconds a opcookies encoded time value can be off from the bots current time\n"));
-  else if (!strcmp(cfgent->name, STR("close-threshold")))
+  else if (!strcmp(cfgent->name, "close-threshold"))
     dprintf(idx, STR("Format H:L. When at least H hubs but L or less leafs are linked, close all channels\n"));
-  else if (!strcmp(cfgent->name, STR("kill-threshold")))
+  else if (!strcmp(cfgent->name, "kill-threshold"))
     dprintf(idx, STR("When more than kill-threshold bots have been killed/k-lined the last minute, channels are locked\n"));
-  else if (!strcmp(cfgent->name, STR("fight-threshold")))
+  else if (!strcmp(cfgent->name, "fight-threshold"))
     dprintf(idx, STR("When more than fight-threshold ops/deops/kicks/bans/unbans altogether have happened on a channel in one minute, the channel is locked\n"));
   else {
     dprintf(idx, STR("No description for %s ???\n"), cfgent->name);
@@ -475,7 +475,7 @@ void getin_changed(struct cfg_entry *cfgent, char *oldval, int *valid)
   if (!cfgent->gdata)
     return;
   *valid = 0;
-  if (!strcmp(cfgent->name, STR("op-requests"))) {
+  if (!strcmp(cfgent->name, "op-requests")) {
     int L,
       R;
     char *value = cfgent->gdata;
@@ -491,7 +491,7 @@ void getin_changed(struct cfg_entry *cfgent, char *oldval, int *valid)
     *valid = 1;
     return;
   }
-  if (!strcmp(cfgent->name, STR("close-threshold"))) {
+  if (!strcmp(cfgent->name, "close-threshold")) {
     int L, R;
     char *value = NULL;
 
@@ -509,31 +509,31 @@ void getin_changed(struct cfg_entry *cfgent, char *oldval, int *valid)
     return;
   }
   i = atoi(cfgent->gdata);
-  if (!strcmp(cfgent->name, STR("op-bots"))) {
+  if (!strcmp(cfgent->name, "op-bots")) {
     if ((i < 1) || (i > 10))
       return;
-  } else if (!strcmp(cfgent->name, STR("invite-bots"))) {
+  } else if (!strcmp(cfgent->name, "invite-bots")) {
     if ((i < 1) || (i > 10))
       return;
-  } else if (!strcmp(cfgent->name, STR("key-bots"))) {
+  } else if (!strcmp(cfgent->name, "key-bots")) {
     if ((i < 1) || (i > 10))
       return;
-  } else if (!strcmp(cfgent->name, STR("limit-bots"))) {
+  } else if (!strcmp(cfgent->name, "limit-bots")) {
     if ((i < 1) || (i > 10))
       return;
-  } else if (!strcmp(cfgent->name, STR("unban-bots"))) {
+  } else if (!strcmp(cfgent->name, "unban-bots")) {
     if ((i < 1) || (i > 10))
       return;
-  } else if (!strcmp(cfgent->name, STR("lag-threshold"))) {
+  } else if (!strcmp(cfgent->name, "lag-threshold")) {
     if ((i < 3) || (i > 60))
       return;
-  } else if (!strcmp(cfgent->name, STR("fight-threshold"))) {
+  } else if (!strcmp(cfgent->name, "fight-threshold")) {
     if (i && ((i < 50) || (i > 1000)))
       return;
-  } else if (!strcmp(cfgent->name, STR("kill-threshold"))) {
+  } else if (!strcmp(cfgent->name, "kill-threshold")) {
     if ((i < 0) || (i >= 200))
       return;
-  } else if (!strcmp(cfgent->name, STR("op-time-slack"))) {
+  } else if (!strcmp(cfgent->name, "op-time-slack")) {
     if ((i < 30) || (i > 1200))
       return;
   }
@@ -728,7 +728,7 @@ void init_config()
   add_cfg(&CFG_REALNAME);
   add_cfg(&CFG_CMDPREFIX);
   cfg_noshare = 1;
-  set_cfg_str(NULL, STR("realname"), "A deranged product of evil coders");
+  set_cfg_str(NULL, "realname", "A deranged product of evil coders");
   cfg_noshare = 0;
   add_cfg(&CFG_OPBOTS);
   add_cfg(&CFG_INBOTS);
@@ -829,7 +829,7 @@ void userfile_cfg_line(char *ln)
     /* regardless of leaf/hub it is safe to set this to 0 */
     cfg_noshare = 0;
   } else
-    putlog(LOG_ERRORS, "*", STR("Unrecognized config entry %s in userfile"), name);
+    putlog(LOG_ERRORS, "*", "Unrecognized config entry %s in userfile", name);
 
 }
 
@@ -849,7 +849,7 @@ void got_config_share(int idx, char *ln, int broad)
     if (broad)
       botnet_send_cfg_broad(idx, cfgent);
   } else
-    putlog(LOG_ERRORS, "*", STR("Unrecognized config entry %s in userfile"), name);
+    putlog(LOG_ERRORS, "*", "Unrecognized config entry %s in userfile", name);
   cfg_noshare = 0;
 }
 
@@ -864,7 +864,7 @@ void trigger_cfg_changed()
       while (xk && strcmp(xk->key, cfg[i]->name))
 	xk = xk->next;
       if (xk) {
-	putlog(LOG_DEBUG, "*", STR("trigger_cfg_changed for %s"), cfg[i]->name ? cfg[i]->name : "(null)");
+	putlog(LOG_DEBUG, "*", "trigger_cfg_changed for %s", cfg[i]->name ? cfg[i]->name : "(null)");
 	if (!strcmp(cfg[i]->name, xk->key ? xk->key : "")) {
 	  set_cfg_str(conf.bot->nick, cfg[i]->name, xk->data);
 	}

+ 1 - 1
src/chanprog.c

@@ -560,7 +560,7 @@ void chanprog()
 
   bi = get_user(&USERENTRY_BOTADDR, get_user_by_handle(userlist, conf.bot->nick));
   if (!bi)
-    fatal(STR("I'm added to userlist but without a bot record!"), 0);
+    fatal("I'm added to userlist but without a bot record!", 0);
   if (bi->telnet_port != 3333) {
 #ifdef HUB
     listen_all(bi->telnet_port, 0);

File diff suppressed because it is too large
+ 163 - 162
src/cmds.c


+ 3 - 3
src/conf.c

@@ -93,11 +93,11 @@ void confedit(char *cfile) {
     int waiter;
     pid_t pid, xpid;
 
-    egg_snprintf(s, sizeof s, STR("%s.conf-XXXXXX"), tempdir);
+    egg_snprintf(s, sizeof s, "%s.conf-XXXXXX", tempdir);
     um = umask(077);
 
     if ((fd = mkstemp(s)) == -1 || (f = fdopen(fd, "w")) == NULL) {
-      fatal(STR("Can't create temp conffile!"), 0);
+      fatal("Can't create temp conffile!", 0);
     }
 
     writeconf(NULL, f, CONF_COMMENT);
@@ -447,7 +447,7 @@ int readconf(char *cfile, int bits)
 
     sdprintf("CONF LINE: %s", line);
     if (enc && !strchr("*/#-+!abcdefghijklmnopqrstuvwxyzABDEFGHIJKLMNOPWRSTUVWXYZ", line[0])) {
-      sdprintf(STR("line %d, char %c "), i, line[0]);
+      sdprintf("line %d, char %c ", i, line[0]);
       werr(ERR_CONFBADENC);
     } else {                    /* line is good to parse */
       /* - uid */

+ 28 - 28
src/dcc.c

@@ -66,25 +66,25 @@ char *rand_dccresp()
 {
   switch (randint(10)) { /* 0-5: random response, 6-9: none */
   case 0:
-    return STR("sup\n");
+    return "sup\n";
   case 1:
-    return STR("a/s/l?\ni'm 17/f/ca ;)\n");
+    return "a/s/l?\ni'm 17/f/ca ;)\n";
   case 2:
-    return STR("who are you?\n");
+    return "who are you?\n";
   case 3:
-    return STR("uhhh do i know you?\n");
+    return "uhhh do i know you?\n";
   case 4:
-    return STR("what?\n");
+    return "what?\n";
   case 5:
-    return STR("wtf do you want?\n");
+    return "wtf do you want?\n";
   case 6:
-    return STR("hold on a second, I am sort of busy..\n");
+    return "hold on a second, I am sort of busy..\n";
   case 7:
-    return STR("mIRC v6.03 File Server\n\nUse: cd dir ls get read help exit\n[\\]\n");
+    return "mIRC v6.03 File Server\n\nUse: cd dir ls get read help exit\n[\\]\n";
   case 8:
-    return STR("got any porn?\n");
+    return "got any porn?\n";
   case 9:
-    return STR("?\n");
+    return "?\n";
   default:
     return "";
     /* there's intentionally no newline in this response. You go figure out why :) */
@@ -95,21 +95,21 @@ char *rand_dccresppass()
 {
   switch (randint(10)) { /* 0-5: random response, 6-9: none */
   case 0:
-    return STR("what?\n");
+    return "what?\n";
   case 1:
-    return STR("huh?\n");
+    return "huh?\n";
   case 2:
-    return STR("no.\n");
+    return "no.\n";
   case 3:
-    return STR("thats great..\n");
+    return "thats great..\n";
   case 4:
-    return STR("hmm, ok..I've got a better idea, check this out: http://peeldmonkeys.8k.com/images/keza-_middle_finger.jpg\n");
+    return "hmm, ok..I've got a better idea, check this out: http://peeldmonkeys.8k.com/images/keza-_middle_finger.jpg\n";
   case 5:
-    return STR("I don't remember caring..\n");
+    return "I don't remember caring..\n";
   case 6:
-    return STR("good for you.\n");
+    return "good for you.\n";
   case 7:
-    return STR("I'm going to report you to the RIAA!!!\n");
+    return "I'm going to report you to the RIAA!!!\n";
   default:
     return "";
   }
@@ -118,21 +118,21 @@ char *rand_dccrespbye()
 {
   switch (randint(10)) { /* 0-5: random response, 6-9: none */
   case 0:
-    return STR("stop wasting my time.\n");
+    return "stop wasting my time.\n";
   case 1:
-    return STR("gtg\n");
+    return "gtg\n";
   case 2:
-    return STR("go away\n");
+    return "go away\n";
   case 3:
-    return STR("fuck off already\n");
+    return "fuck off already\n";
   case 4:
-    return STR("ehh..no, bye.\n");
+    return "ehh..no, bye.\n";
   case 5:
-    return STR("hey I'm late for a date with your mom, cya..\n");
+    return "hey I'm late for a date with your mom, cya..\n";
   case 6:
-    return STR("you're still here?\n");
+    return "you're still here?\n";
   case 7:
-    return STR("jesus loves you, but I ain't jesus. \002FUCK OFF\002\n");
+    return "jesus loves you, but I ain't jesus. \002FUCK OFF\002\n";
   default:
     return "";
   }
@@ -340,8 +340,8 @@ static void cont_link(int idx, char *buf, int ii)
     /* If we're already connected somewhere, unlink and idle a sec */
     for (i = 0; i < dcc_total; i++) {
       if ((dcc[i].type == &DCC_BOT) && (!bot_aggressive_to(dcc[i].user))) {
-        putlog(LOG_BOTS, "*", STR("Unlinking %s - restructure"), dcc[i].nick);
-        botnet_send_unlinked(i, dcc[i].nick, STR("Restructure"));
+        putlog(LOG_BOTS, "*", "Unlinking %s - restructure", dcc[i].nick);
+        botnet_send_unlinked(i, dcc[i].nick, "Restructure");
         killsock(dcc[i].sock);
         lostdcc(i);
         usleep(1000 * 500);

+ 13 - 13
src/dccutil.c

@@ -234,9 +234,9 @@ void dcc_chatter(int idx)
   show_motd(idx);
   if (glob_master(fr)) {
     if ((tands+1) > 1)
-      dprintf(idx, STR("There are \002-%d- bots\002 currently linked.\n"), tands + 1);
+      dprintf(idx, "There are %s-%d- bots%s currently linked.\n", BOLD(idx), tands + 1, BOLD_END(idx));
     else
-      dprintf(idx, STR("There is \002-%d- bot\002 currently linked.\n"), tands + 1);
+      dprintf(idx, "There is %s-%d- bot%s currently linked.\n", BOLD(idx), tands + 1, BOLD_END(idx));
   }
   show_channels(idx, NULL);
 
@@ -608,17 +608,17 @@ int listen_all(int lport, int off)
   }
   if (idx < 0) {
     if (off) {
-      putlog(LOG_ERRORS, "*", STR("No such listening port open - %d"), lport);
+      putlog(LOG_ERRORS, "*", "No such listening port open - %d", lport);
       return idx;
     }
     /* make new one */
     if (dcc_total >= max_dcc) {
-      putlog(LOG_ERRORS, "*", STR("Can't open listening port - no more DCC Slots"));
+      putlog(LOG_ERRORS, "*", "Can't open listening port - no more DCC Slots");
     } else {
 #ifdef USE_IPV6
       i6 = open_listen_by_af(&port, AF_INET6);
       if (i6 < 0) {
-        putlog(LOG_ERRORS, "*", STR("Can't open IPv6 listening port %d - %s"), port, 
+        putlog(LOG_ERRORS, "*", "Can't open IPv6 listening port %d - %s", port, 
                i6 == -1 ? "it's taken." : "couldn't assign ip.");
       } else {
         idx = new_dcc(&DCC_TELNET, 0);
@@ -627,16 +627,16 @@ int listen_all(int lport, int off)
         dcc[idx].port = port;
         dcc[idx].sock = i6;
         dcc[idx].timeval = now;
-        strcpy(dcc[idx].nick, STR("(telnet6)"));
+        strcpy(dcc[idx].nick, "(telnet6)");
         strcpy(dcc[idx].host, "*");
-        putlog(LOG_DEBUG, "*", STR("Listening on IPv6 at telnet port %d"), port);
+        putlog(LOG_DEBUG, "*", "Listening on IPv6 at telnet port %d", port);
       }
       i = open_listen_by_af(&port, AF_INET);
 #else
       i = open_listen(&port);
 #endif /* USE_IPV6 */
       if (i < 0) {
-        putlog(LOG_ERRORS, "*", STR("Can't open IPv4 listening port %d - %s"), port,
+        putlog(LOG_ERRORS, "*", "Can't open IPv4 listening port %d - %s", port,
                i == -1 ? "it's taken." : "couldn't assign ip.");
       } else {
 	idx = (-1); /* now setup ipv4 listening port */
@@ -645,9 +645,9 @@ int listen_all(int lport, int off)
         dcc[idx].port = port;
         dcc[idx].sock = i;
         dcc[idx].timeval = now;
-        strcpy(dcc[idx].nick, STR("(telnet)"));
+        strcpy(dcc[idx].nick, "(telnet)");
         strcpy(dcc[idx].host, "*");
-        putlog(LOG_DEBUG, "*", STR("Listening on IPv4 at telnet port %d"), port);
+        putlog(LOG_DEBUG, "*", "Listening on IPv4 at telnet port %d", port);
       }
 #ifdef USE_IPV6
       if (i > 0 || i6 > 0) {
@@ -697,9 +697,9 @@ void identd_open()
       dcc[idx].port = port;
       dcc[idx].sock = i;
       dcc[idx].timeval = now;
-      strcpy(dcc[idx].nick, STR("(identd)"));
+      strcpy(dcc[idx].nick, "(identd)");
       strcpy(dcc[idx].host, "*");
-      putlog(LOG_DEBUG, "*", STR("Identd daemon started."));
+      putlog(LOG_DEBUG, "*", "Identd daemon started.");
       howlong.sec = 15;
       howlong.usec = 0;
       timer_create(&howlong, "identd_close()", (Function) identd_close);
@@ -715,7 +715,7 @@ void identd_close()
     if (dcc[idx].type == &DCC_IDENTD_CONNECT) {
       killsock(dcc[idx].sock);
       lostdcc(idx);
-      putlog(LOG_DEBUG, "*", STR("Identd daemon stopped."));
+      putlog(LOG_DEBUG, "*", "Identd daemon stopped.");
       break;
     }
   }

+ 12 - 12
src/debug.c

@@ -120,8 +120,8 @@ void write_debug()
     setsock(x, SOCK_NONSOCK);
     if (x >= 0) {
       strncpyz(s, ctime(&now), sizeof s);
-      dprintf(-x, STR("Debug (%s) written %s\n"), ver, s);
-      dprintf(-x, STR("Context: "));
+      dprintf(-x, "Debug (%s) written %s\n", ver, s);
+      dprintf(-x, "Context: ");
       cx_ptr = cx_ptr & 15;
       for (y = ((cx_ptr + 1) & 15); y != cx_ptr; y = ((y + 1) & 15))
         dprintf(-x, "%s/%d,\n         ", cx_file[y], cx_line[y]);
@@ -214,7 +214,7 @@ static void got_bus(int z)
 #ifdef DEBUG_CONTEXT
   write_debug();
 #endif
-  fatal(STR("BUS ERROR -- CRASHING!"), 1);
+  fatal("BUS ERROR -- CRASHING!", 1);
   kill(getpid(), SIGBUS);
 }
 
@@ -225,7 +225,7 @@ static void got_segv(int z)
 #ifdef DEBUG_CONTEXT
   write_debug();
 #endif
-  fatal(STR("SEGMENT VIOLATION -- CRASHING!"), 1);
+  fatal("SEGMENT VIOLATION -- CRASHING!", 1);
   kill(getpid(), SIGSEGV);
 }
 
@@ -234,7 +234,7 @@ static void got_fpe(int z)
 #ifdef DEBUG_CONTEXT
   write_debug();
 #endif
-  fatal(STR("FLOATING POINT ERROR -- CRASHING!"), 0);
+  fatal("FLOATING POINT ERROR -- CRASHING!", 0);
 }
 
 static void got_term(int z)
@@ -242,7 +242,7 @@ static void got_term(int z)
 #ifdef HUB
   write_userfile(-1);
 #endif
-  putlog(LOG_MISC, "*", STR("RECEIVED TERMINATE SIGNAL (IGNORING)"));
+  putlog(LOG_MISC, "*", "RECEIVED TERMINATE SIGNAL (IGNORING)");
 }
 
 static void got_abort(int z)
@@ -251,14 +251,14 @@ static void got_abort(int z)
 #ifdef DEBUG_CONTEXT
   write_debug();
 #endif
-  fatal(STR("GOT SIGABRT -- CRASHING!"), 1);
+  fatal("GOT SIGABRT -- CRASHING!", 1);
   kill(getpid(), SIGSEGV);
 }
 
 #ifdef S_HIJACKCHECK
 static void got_cont(int z)
 {
-  detected(DETECT_SIGCONT, STR("POSSIBLE HIJACK DETECTED"));
+  detected(DETECT_SIGCONT, "POSSIBLE HIJACK DETECTED");
 }
 #endif
 
@@ -276,7 +276,7 @@ static void got_alarm(int z)
 static void got_ill(int z)
 {
 #ifdef DEBUG_CONTEXT
-  putlog(LOG_MISC, "*", STR("* Context: %s/%d [%s]"), cx_file[cx_ptr], cx_line[cx_ptr],
+  putlog(LOG_MISC, "*", "* Context: %s/%d [%s]", cx_file[cx_ptr], cx_line[cx_ptr],
                          (cx_note[cx_ptr][0]) ? cx_note[cx_ptr] : "");
 #endif
 }
@@ -339,12 +339,12 @@ void eggContextNote(const char *file, int line, const char *module, const char *
 void eggAssert(const char *file, int line, const char *module)
 {
   if (!module)
-    putlog(LOG_MISC, "*", STR("* In file %s, line %u"), file, line);
+    putlog(LOG_MISC, "*", "* In file %s, line %u", file, line);
   else
-    putlog(LOG_MISC, "*", STR("* In file %s:%s, line %u"), module, file, line);
+    putlog(LOG_MISC, "*", "* In file %s:%s, line %u", module, file, line);
 #ifdef DEBUG_CONTEXT
   write_debug();
 #endif /* DEBUG_CONTEXT */
-  fatal(STR("ASSERT FAILED -- CRASHING!"), 1);
+  fatal("ASSERT FAILED -- CRASHING!", 1);
 }
 #endif /* DEBUG_ASSERT */

+ 27 - 27
src/main.c

@@ -210,17 +210,17 @@ static void checkpass()
 
 static void got_ed(char *which, char *in, char *out)
 {
-  sdprintf(STR("got_Ed called: -%s i: %s o: %s"), which, in, out);
+  sdprintf("got_Ed called: -%s i: %s o: %s", which, in, out);
   if (!in || !out)
     fatal(STR("Wrong number of arguments: -e/-d <infile> <outfile/STDOUT>"),0);
   if (!strcmp(in, out))
-    fatal(STR("<infile> should NOT be the same name as <outfile>"), 0);
+    fatal("<infile> should NOT be the same name as <outfile>", 0);
   if (!strcmp(which, "e")) {
     Encrypt_File(in, out);
-    fatal(STR("File Encryption complete"),3);
+    fatal("File Encryption complete",3);
   } else if (!strcmp(which, "d")) {
     Decrypt_File(in, out);
-    fatal(STR("File Decryption complete"),3);
+    fatal("File Decryption complete",3);
   }
   exit(0);
 }
@@ -232,8 +232,8 @@ static void show_help()
   egg_snprintf(format, sizeof format, "%%-30s %%-30s\n");
 
   printf(STR("Wraith %s\n\n"), egg_version);
-  printf(format, STR("Option"), STR("Description"));
-  printf(format, STR("------"), STR("-----------"));
+  printf(format, "Option", "Description");
+  printf(format, "------", "-----------");
   printf(format, STR("-B <botnick>"), STR("Starts the specified bot"));
   printf(format, STR("-C"), STR("Config file menu system"));
   printf(format, STR("-e <infile> <outfile>"), STR("Encrypt infile to outfile"));
@@ -243,12 +243,12 @@ static void show_help()
 /*  printf(format, STR("-g <file>"), STR("Generates a template config file"));
   printf(format, STR("-G <file>"), STR("Generates a custom config for the box"));
 */
-  printf(format, STR("-h"), STR("Display this help listing"));
+  printf(format, "-h", "Display this help listing");
   printf(format, STR("-k <botname>"), STR("Terminates (botname) with kill -9"));
   printf(format, STR("-n"), STR("Disables backgrounding first bot in conf"));
   printf(format, STR("-s"), STR("Disables checking for ptrace/strace during startup (no pass needed)"));
   printf(format, STR("-t"), STR("Enables \"Partyline\" emulation (requires -n)"));
-  printf(format, STR("-v"), STR("Displays bot version"));
+  printf(format, "-v", "Displays bot version");
   exit(0);
 }
 
@@ -302,18 +302,18 @@ static void dtx_arg(int argc, char *argv[])
         break;
       case 'D':
         sdebug = 1;
-        sdprintf(STR("debug enabled"));
+        sdprintf("debug enabled");
         break;
       case 'E':
         p = argv[optind];
         if (p && p[0]) {
           if (!strcmp(p, "all")) {
             int n;
-            putlog(LOG_MISC, "*", STR("Listing all errors"));
+            putlog(LOG_MISC, "*", "Listing all errors");
             for (n = 1; n < ERR_MAX; n++)
-            putlog(LOG_MISC, "*", STR("Error #%d: %s"), n, werr_tostr(n));
+            putlog(LOG_MISC, "*", "Error #%d: %s", n, werr_tostr(n));
           } else if (egg_isdigit(p[0])) {
-            putlog(LOG_MISC, "*", STR("Error #%d: %s"), atoi(p), werr_tostr(atoi(p)));
+            putlog(LOG_MISC, "*", "Error #%d: %s", atoi(p), werr_tostr(atoi(p)));
           }
           exit(0);
         } else {
@@ -347,7 +347,7 @@ static void dtx_arg(int argc, char *argv[])
         if (atoi(optarg) && (atoi(optarg) != localhub_pid))
           exit(2);
         else
-          sdprintf(STR("Updating..."));
+          sdprintf("Updating...");
         localhub = 1;
         updating = 1;
         break;
@@ -419,12 +419,12 @@ static void core_secondly()
     /* In case for some reason more than 1 min has passed: */
     while (nowtm.tm_min != lastmin) {
       /* Timer drift, dammit */
-      debug2(STR("timer: drift (lastmin=%d, now=%d)"), lastmin, nowtm.tm_min);
+      debug2("timer: drift (lastmin=%d, now=%d)", lastmin, nowtm.tm_min);
       i++;
       lastmin = (lastmin + 1) % 60;
     }
     if (i > 1)
-      putlog(LOG_MISC, "*", STR("(!) timer drift -- spun %d minutes"), i);
+      putlog(LOG_MISC, "*", "(!) timer drift -- spun %d minutes", i);
     miltime = (nowtm.tm_hour * 100) + (nowtm.tm_min);
     if (((int) (nowtm.tm_min / 5) * 5) == (nowtm.tm_min)) {	/* 5 min */
 /* 	flushlogs(); */
@@ -433,7 +433,7 @@ static void core_secondly()
 
 	strncpyz(s, ctime(&now), sizeof s);
 #ifdef HUB
-	putlog(LOG_ALL, "*", STR("--- %.11s%s"), s, s + 20);
+	putlog(LOG_ALL, "*", "--- %.11s%s", s, s + 20);
         backup_userfile();
 #endif /* HUB */
       }
@@ -542,13 +542,13 @@ static void startup_checks() {
     char s[DIRMAX] = "";
     int fd;
 
-    egg_snprintf(s, sizeof s, STR("%s.test-XXXXXX"), tempdir);
+    egg_snprintf(s, sizeof s, "%s.test-XXXXXX", tempdir);
     if ((fd = mkstemp(s)) == -1 || (f = fdopen(fd, "w")) == NULL) {
       if (fd != -1) {
         unlink(s);
         close(fd);
       }
-      fatal(STR("Can't write to tempdir!"), 0);
+      fatal("Can't write to tempdir!", 0);
     }
     fprintf(f, "\n");
     if (fflush(f))
@@ -587,11 +587,11 @@ static void startup_checks() {
   {
     char newbin[DIRMAX] = "", real[DIRMAX] = "";
 
-    sdprintf(STR("my euid: %d my uuid: %d, my ppid: %d my pid: %d"), geteuid(), myuid, getppid(), getpid());
-    egg_snprintf(newbin, sizeof newbin, STR("%s%s%s"), conffile.binpath, 
+    sdprintf("my euid: %d my uuid: %d, my ppid: %d my pid: %d", geteuid(), myuid, getppid(), getpid());
+    egg_snprintf(newbin, sizeof newbin, "%s%s%s", conffile.binpath, 
                  conffile.binpath[strlen(conffile.binpath) - 1] == '/' ? "" : "/",
                  conffile.binname);
-    sdprintf(STR("newbin at: %s"), newbin);
+    sdprintf("newbin at: %s", newbin);
     
     ContextNote("realpath()");
     realpath(binname, real);		/* get the realpath of binname */
@@ -622,7 +622,7 @@ static void startup_checks() {
       } else {
         unlink(binname);
         system(newbin);
-        sdprintf(STR("exiting to let new binary run..."));
+        sdprintf("exiting to let new binary run...");
         exit(0);
       }
     }
@@ -746,7 +746,7 @@ int main(int argc, char **argv)
   init_conf();
 
   if (argc) {
-    sdprintf(STR("Calling dtx_arg with %d params."), argc);
+    sdprintf("Calling dtx_arg with %d params.", argc);
     dtx_arg(argc, argv);
   }
 
@@ -759,7 +759,7 @@ int main(int argc, char **argv)
 
   if ((localhub && !updating) || !localhub) {
     if ((conf.bot->pid > 0) && conf.bot->pid_file) {
-      sdprintf(STR("%s is already running, pid: %d"), conf.bot->nick, conf.bot->pid);
+      sdprintf("%s is already running, pid: %d", conf.bot->nick, conf.bot->pid);
       exit(1);
     }
   }
@@ -783,7 +783,7 @@ int main(int argc, char **argv)
 
 #ifdef LEAF
   if (localhub) {
-    sdprintf(STR("I am localhub (%s)"), conf.bot->nick);
+    sdprintf("I am localhub (%s)", conf.bot->nick);
 #endif /* LEAF */
     if (conffile.autocron)
       check_crontab();
@@ -948,7 +948,7 @@ int main(int argc, char **argv)
       int idx;
 
       if (i == STDOUT && !backgrd)
-	fatal(STR("END OF FILE ON TERMINAL"), 0);
+	fatal("END OF FILE ON TERMINAL", 0);
       for (idx = 0; idx < dcc_total; idx++)
 	if (dcc[idx].sock == i) {
 	  if (dcc[idx].type && dcc[idx].type->eof)
@@ -968,7 +968,7 @@ int main(int argc, char **argv)
 	killsock(i);
       }
     } else if (xx == -2 && errno != EINTR) {	/* select() error */
-      putlog(LOG_MISC, "*", STR("* Socket error #%d; recovering."), errno);
+      putlog(LOG_MISC, "*", "* Socket error #%d; recovering.", errno);
       for (i = 0; i < dcc_total; i++) {
 	if ((fcntl(dcc[i].sock, F_GETFD, 0) == -1) && (errno = EBADF)) {
 	  putlog(LOG_MISC, "*",

+ 113 - 113
src/misc.c

@@ -437,7 +437,7 @@ void show_banner(int idx)
 {
   dumplots(-dcc[idx].sock, "", wbanner()); /* we use sock so that colors aren't applied to banner */
   dprintf(idx, "\n \n");
-  dprintf(idx, STR("%sConributions welcomed by paypal: root@shatow.net%s\n"), BOLD(idx), BOLD_END(idx));
+  dprintf(idx, STR("%sConributions welcomed by paypal: bryan@shatow.net%s\n"), BOLD(idx), BOLD_END(idx));
   dprintf(idx, STR("info, bugs, suggestions, comments:\n- http://wraith.shatow.net/ -\n \n"));
 }
 
@@ -462,7 +462,7 @@ void show_motd(int idx)
     dprintf(idx, " \n");
     free(buf_ptr);
   } else
-    dprintf(idx, STR("Motd: none\n"));
+    dprintf(idx, "Motd: none\n");
 }
 
 void show_channels(int idx, char *handle)
@@ -498,7 +498,7 @@ void show_channels(int idx, char *handle)
     get_user_flagrec(u, &fr, chan->dname);
     if (chk_op(fr, chan)) {
         if (!first) { 
-          dprintf(idx, STR("%s %s access to %d channel%s:\n"), handle ? u->handle : "You", handle ? "has" : "have", total, (total > 1) ? "s" : "");
+          dprintf(idx, "%s %s access to %d channel%s:\n", handle ? u->handle : "You", handle ? "has" : "have", total, (total > 1) ? "s" : "");
           
           first = 1;
         }
@@ -508,7 +508,7 @@ void show_channels(int idx, char *handle)
     }
   }
   if (!first)
-    dprintf(idx, STR("%s %s not have access to any channels.\n"), handle ? u->handle : "You", handle ? "does" : "do");
+    dprintf(idx, "%s %s not have access to any channels.\n", handle ? u->handle : "You", handle ? "does" : "do");
 }
 
 int getting_users()
@@ -713,7 +713,7 @@ int updatebin(int idx, char *par, int autoi)
   path = newsplit(&par);
   par = path;
   if (!par[0]) {
-    logidx(idx, STR("Not enough parameters."));
+    logidx(idx, "Not enough parameters.");
     return 1;
   }
   path = calloc(1, strlen(binname) + strlen(par) + 2);
@@ -721,29 +721,29 @@ int updatebin(int idx, char *par, int autoi)
   newbin = strrchr(path, '/');
   if (!newbin) {
     free(path);
-    logidx(idx, STR("Don't know current binary name"));
+    logidx(idx, "Don't know current binary name");
     return 1;
   }
   newbin++;
   if (strchr(par, '/')) {
     *newbin = 0;
-    logidx(idx, STR("New binary must be in %s and name must be specified without path information"), path);
+    logidx(idx, "New binary must be in %s and name must be specified without path information", path);
     free(path);
     return 1;
   }
   strcpy(newbin, par);
   if (!strcmp(path, binname)) {
     free(path);
-    logidx(idx, STR("Can't update with the current binary"));
+    logidx(idx, "Can't update with the current binary");
     return 1;
   }
   if (stat(path, &sb)) {
-    logidx(idx, STR("%s can't be accessed"), path);
+    logidx(idx, "%s can't be accessed", path);
     free(path);
     return 1;
   }
   if (chmod(path, S_IRUSR | S_IWUSR | S_IXUSR)) {
-    logidx(idx, STR("Can't set mode 0600 on %s"), path);
+    logidx(idx, "Can't set mode 0600 on %s", path);
     free(path);
     return 1;
   }
@@ -757,13 +757,13 @@ int updatebin(int idx, char *par, int autoi)
   egg_snprintf(testbuf, sizeof testbuf, "%s -2", path);
   i = system(testbuf);
   if (i == -1 || WEXITSTATUS(i) != 2) {
-    dprintf(idx, STR("Couldn't restart new binary (error %d)\n"), i);
-    putlog(LOG_MISC, "*", STR("Couldn't restart new binary (error %d)"), i);
+    dprintf(idx, "Couldn't restart new binary (error %d)\n", i);
+    putlog(LOG_MISC, "*", "Couldn't restart new binary (error %d)", i);
     return i;
   }
 
   if (movefile(path, binname)) {
-    logidx(idx, STR("Can't rename %s to %s"), path, binname);
+    logidx(idx, "Can't rename %s to %s", path, binname);
     free(path);
     return 1;
   }
@@ -782,8 +782,8 @@ int updatebin(int idx, char *par, int autoi)
     /* let's drop the server connection ASAP */
     nuke_server("Updating...");
 #endif /* LEAF */
-    logidx(idx, STR("Updating...bye"));
-    putlog(LOG_MISC, "*", STR("Updating..."));
+    logidx(idx, "Updating...bye");
+    putlog(LOG_MISC, "*", "Updating...");
     botnet_send_chat(-1, conf.bot->nick, "Updating...");
     botnet_send_bye();
     fatal("Updating...", 1);
@@ -829,142 +829,142 @@ char *kickreason(int kind) {
   switch (kind) {
   case KICK_BANNED:
     switch (randint(6)) {
-    case 0: return STR("bye");
-    case 1: return STR("banned");
-    case 2: return STR("see you in hell");
-    case 3: return STR("go away");
-    case 4: return STR("cya around lewser");
-    case 5: return STR("unwanted!");
+    case 0: return "bye";
+    case 1: return "banned";
+    case 2: return "see you in hell";
+    case 3: return "go away";
+    case 4: return "cya around lewser";
+    case 5: return "unwanted!";
     }
   case KICK_KUSER:
     switch (randint(4)) {
-    case 0: return STR("not wanted");
-    case 1: return STR("something tells me you're annoying");
-    case 2: return STR("don't bug me lewser");
-    case 3: return STR("creep");
+    case 0: return "not wanted";
+    case 1: return "something tells me you're annoying";
+    case 2: return "don't bug me lewser";
+    case 3: return "creep";
     }
   case KICK_KICKBAN:
     switch (randint(4)) {
-    case 0: return STR("gone");
-    case 1: return STR("stupid");
-    case 2: return STR("lewser");
-    case 3: return STR("...");
+    case 0: return "gone";
+    case 1: return "stupid";
+    case 2: return "lewser";
+    case 3: return "...";
     }     
   case KICK_MASSDEOP:
     switch (randint(8)) {
-    case 0: return STR("spammer!");
-    case 1: return STR("easy on the modes now");
-    case 2: return STR("mode this");
-    case 3: return STR("nice try");
-    case 4: return STR("really?");
-    case 5: return STR("you lose");
-    case 6: return STR("scary... really scary...");
-    case 7: return STR("i win kthx");
+    case 0: return "spammer!";
+    case 1: return "easy on the modes now";
+    case 2: return "mode this";
+    case 3: return "nice try";
+    case 4: return "really?";
+    case 5: return "you lose";
+    case 6: return "scary... really scary...";
+    case 7: return "i win kthx";
     }
   case KICK_BADOP:
     switch (randint(5)) {
-    case 0: return STR("neat...");
-    case 1: return STR("oh, no you don't. go away.");
-    case 2: return STR("didn't you forget something now?");
-    case 3: return STR("no");
-    case 4: return STR("hijack this");
+    case 0: return "neat...";
+    case 1: return "oh, no you don't. go away.";
+    case 2: return "didn't you forget something now?";
+    case 3: return "no";
+    case 4: return "hijack this";
     }
   case KICK_BADOPPED:
     switch (randint(5)) {
-    case 0: return STR("fuck off kid");
-    case 1: return STR("asl?");
-    case 2: return STR("whoa... what a hacker... skills!");
-    case 3: return STR("yes! yes! yes! hit me baby one more time!");
-    case 4: return STR("with your skills, you're better off jacking off than hijacking");
+    case 0: return "fuck off kid";
+    case 1: return "asl?";
+    case 2: return "whoa... what a hacker... skills!";
+    case 3: return "yes! yes! yes! hit me baby one more time!";
+    case 4: return "with your skills, you're better off jacking off than hijacking";
     }
   case KICK_MANUALOP:
     switch (randint(6)) {
-    case 0: return STR("naughty kid");
-    case 1: return STR("didn't someone tell you that is bad?");
-    case 2: return STR("want perm?");
-    case 3: return STR("see how much good that did you?");
-    case 4: return STR("not a smart move...");
-    case 5: return STR("jackass!");
+    case 0: return "naughty kid";
+    case 1: return "didn't someone tell you that is bad?";
+    case 2: return "want perm?";
+    case 3: return "see how much good that did you?";
+    case 4: return "not a smart move...";
+    case 5: return "jackass!";
     }
   case KICK_MANUALOPPED:
     switch (randint(8)) {
-    case 0: return STR("your pal got mean friends. like me.");
-    case 1: return STR("uhh now.. don't wake me up...");
-    case 2: return STR("hi hun. missed me?");
-    case 3: return STR("spammer! die!");
-    case 4: return STR("boo!");
-    case 5: return STR("that @ was useful, don't ya think?");
-    case 6: return STR("not in my book");
-    case 7: return STR("lol, really?");
+    case 0: return "your pal got mean friends. like me.";
+    case 1: return "uhh now.. don't wake me up...";
+    case 2: return "hi hun. missed me?";
+    case 3: return "spammer! die!";
+    case 4: return "boo!";
+    case 5: return "that @ was useful, don't ya think?";
+    case 6: return "not in my book";
+    case 7: return "lol, really?";
     }
   case KICK_CLOSED:
     switch (randint(17)) {
-    case 0: return STR("locked");
-    case 1: return STR("later");
-    case 2: return STR("closed for now");
-    case 3: return STR("come back later");
-    case 4: return STR("better safe than sorry");
-    case 5: return STR("cleanup, come back later");
-    case 6: return STR("this channel is closed");
-    case 7: return STR("shutting down for now");
-    case 8: return STR("lockdown");
-    case 9: return STR("reopening later");
-    case 10: return STR("not for the public atm");
-    case 11: return STR("private channel for now");
-    case 12: return STR("might reopen soon, might reopen later");
-    case 13: return STR("you're not supposed to be here right now");
-    case 14: return STR("sorry, closed");
-    case 15: return STR("try us later, atm we're locked down");
-    case 16: return STR("closed. try tomorrow");
+    case 0: return "locked";
+    case 1: return "later";
+    case 2: return "closed for now";
+    case 3: return "come back later";
+    case 4: return "better safe than sorry";
+    case 5: return "cleanup, come back later";
+    case 6: return "this channel is closed";
+    case 7: return "shutting down for now";
+    case 8: return "lockdown";
+    case 9: return "reopening later";
+    case 10: return "not for the public atm";
+    case 11: return "private channel for now";
+    case 12: return "might reopen soon, might reopen later";
+    case 13: return "you're not supposed to be here right now";
+    case 14: return "sorry, closed";
+    case 15: return "try us later, atm we're locked down";
+    case 16: return "closed. try tomorrow";
     }
   case KICK_FLOOD:
     switch (randint(7)) {
-    case 0: return STR("so much bullshit in such a short time. amazing.");
-    case 1: return STR("slow down. i'm trying to read here.");
-    case 2: return STR("uhm... you actually think irc is for talking?");
-    case 3: return STR("talk talk talk");
-    case 4: return STR("blabbering are we?");
-    case 5: return STR("... and i don't even like you!");
-    case 6: return STR("and you're outa here...");
+    case 0: return "so much bullshit in such a short time. amazing.";
+    case 1: return "slow down. i'm trying to read here.";
+    case 2: return "uhm... you actually think irc is for talking?";
+    case 3: return "talk talk talk";
+    case 4: return "blabbering are we?";
+    case 5: return "... and i don't even like you!";
+    case 6: return "and you're outa here...";
 
     }
   case KICK_NICKFLOOD:
     switch (randint(7)) {
-    case 0: return STR("make up your mind?");
-    case 1: return STR("be schizofrenic elsewhere");
-    case 2: return STR("I'm loosing track of you... not!");
-    case 3: return STR("that is REALLY annoying");
-    case 4: return STR("try this: /NICK n00b");
-    case 5: return STR("playing hide 'n' seek?");
-    case 6: return STR("gotcha!");
+    case 0: return "make up your mind?";
+    case 1: return "be schizofrenic elsewhere";
+    case 2: return "I'm loosing track of you... not!";
+    case 3: return "that is REALLY annoying";
+    case 4: return "try this: /NICK n00b";
+    case 5: return "playing hide 'n' seek?";
+    case 6: return "gotcha!";
     }
   case KICK_KICKFLOOD:
     switch (randint(6)) {
-    case 0: return STR("easier to just leave if you wan't to be alone");
-    case 1: return STR("cool down");
-    case 2: return STR("don't be so damned aggressive. that's my job.");
-    case 3: return STR("kicking's fun, isn't it?");
-    case 4: return STR("what's the rush?");
-    case 5: return STR("next time you do that, i'll kick you again");
+    case 0: return "easier to just leave if you wan't to be alone";
+    case 1: return "cool down";
+    case 2: return "don't be so damned aggressive. that's my job.";
+    case 3: return "kicking's fun, isn't it?";
+    case 4: return "what's the rush?";
+    case 5: return "next time you do that, i'll kick you again";
     }
   case KICK_BOGUSUSERNAME:
-    return STR("bogus username");
+    return "bogus username";
   case KICK_MEAN:
     switch (randint(11)) {
-    case 0: return STR("hey! that wasn't very nice!");
-    case 1: return STR("don't fuck with my pals");
-    case 2: return STR("meanie!");
-    case 3: return STR("I can be a bitch too...");
-    case 4: return STR("leave the bots alone, will ya?");
-    case 5: return STR("not very clever");
-    case 6: return STR("watch it");
-    case 7: return STR("fuck off");
-    case 8: return STR("easy now. that's a friend.");
-    case 9: return STR("abuse of power. leave that to me, will ya?");      
-    case 10: return STR("there as some things you cannot do, and that was one of them...");
+    case 0: return "hey! that wasn't very nice!";
+    case 1: return "don't fuck with my pals";
+    case 2: return "meanie!";
+    case 3: return "I can be a bitch too...";
+    case 4: return "leave the bots alone, will ya?";
+    case 5: return "not very clever";
+    case 6: return "watch it";
+    case 7: return "fuck off";
+    case 8: return "easy now. that's a friend.";
+    case 9: return "abuse of power. leave that to me, will ya?";      
+    case 10: return "there as some things you cannot do, and that was one of them...";
     }
   case KICK_BOGUSKEY:
-    return STR("I have a really hard time reading that key");
+    return "I have a really hard time reading that key";
   default:
     return "OMFG@YUO";    
   }
@@ -981,7 +981,7 @@ void makeplaincookie(char *chname, char *nick, char *buf)
   char work[256] = "", work2[256] = "";
   int i, n;
 
-  sprintf(work, STR("%010li"), (now + timesync));
+  sprintf(work, "%010li", (now + timesync));
   strcpy(buf, (char *) &work[4]);
   work[0] = 0;
   if (strlen(nick) < 5)
@@ -1063,7 +1063,7 @@ int goodpass(char *pass, int idx, char *nick)
     if (idx)
       dprintf(idx, "%s\n", tell);
     else if (nick[0])
-      dprintf(DP_HELP, STR("NOTICE %s :%s\n"), nick, tell);
+      dprintf(DP_HELP, "NOTICE %s :%s\n", nick, tell);
     return 0;
   }
   return 1;

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

@@ -113,7 +113,7 @@ void check_should_lock()
   if ((hc >= H) && (lc <= L)) {
     for (chan = chanset; chan; chan = chan->next) {
       if (!channel_closed(chan)) {
-        do_chanset(NULL, chan, STR("+closed chanmode +stni"), DO_LOCAL | DO_NET);
+        do_chanset(NULL, chan, "+closed chanmode +stni", DO_LOCAL | DO_NET);
 #ifdef G_BACKUP
         chan->channel.backup_time = now + 30;
 #endif /* G_BACKUP */
@@ -262,7 +262,7 @@ void got_kl(char *botnick, char *code, char *par)
     struct chanset_t *ch = NULL;
 
     for (ch = chanset; ch; ch = ch->next)
-      do_chanset(NULL, ch, STR("+closed +backup +bitch"), DO_LOCAL | DO_NET);
+      do_chanset(NULL, ch, "+closed +backup +bitch", DO_LOCAL | DO_NET);
   /* FIXME: we should randomize nick here ... */
   }
 #endif /* S_AUTOLOCK */
@@ -827,13 +827,13 @@ cmd_t channels_bot[] = {
 void channels_describe(struct cfg_entry *cfgent, int idx)
 {
 #ifdef HUB
-  if (!strcmp(cfgent->name, STR("close-threshold"))) {
+  if (!strcmp(cfgent->name, "close-threshold")) {
     dprintf(idx, STR("Format H:L. When at least H hubs but L or less leafs are linked, close all channels\n"));
-  } else if (!strcmp(cfgent->name, STR("kill-threshold"))) {
+  } else if (!strcmp(cfgent->name, "kill-threshold")) {
     dprintf(idx, STR("When more than kill-threshold bots have been killed/k-lined the last minute, channels are locked\n"));
   } else {
-    dprintf(idx, STR("No description for %s ???\n"), cfgent->name);
-    putlog(LOG_ERRORS, "*", STR("channels_describe() called with unknown config entry %s"), cfgent->name);
+    dprintf(idx, "No description for %s ???\n", cfgent->name);
+    putlog(LOG_ERRORS, "*", "channels_describe() called with unknown config entry %s", cfgent->name);
   }
 #endif /* HUB */
 }
@@ -845,7 +845,7 @@ void channels_changed(struct cfg_entry *cfgent, char *oldval, int *valid)
   if (!cfgent->gdata)
     return;
   *valid = 0;
-  if (!strcmp(cfgent->name, STR("close-threshold"))) {
+  if (!strcmp(cfgent->name, "close-threshold")) {
     int L, R;
     char *value = cfgent->gdata;
 
@@ -861,7 +861,7 @@ void channels_changed(struct cfg_entry *cfgent, char *oldval, int *valid)
     return;
   }
   i = atoi(cfgent->gdata);
-  if (!strcmp(cfgent->name, STR("kill-threshold"))) {
+  if (!strcmp(cfgent->name, "kill-threshold")) {
     if ((i < 0) || (i >= 200))
       return;
   } 

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

@@ -61,27 +61,27 @@ void scriptchanged()
 
   switch (cloak_script) {
   case CLOAK_PLAIN:
-    sprintf(ctcpversion, STR("\002BitchX-%s\002 by panasync - %s %s : \002Keep it to yourself!\002"), cloak_bxver, cloak_os, cloak_osver);
+    sprintf(ctcpversion, "\002BitchX-%s\002 by panasync - %s %s : \002Keep it to yourself!\002", cloak_bxver, cloak_os, cloak_osver);
     strcpy(ctcpuserinfo, "");
-    strcpy(autoaway, STR("Auto-Away after 10 mins"));
+    strcpy(autoaway, "Auto-Away after 10 mins");
     strcpy(kickprefix, "");
     strcpy(bankickprefix, "");
     break;
   case CLOAK_CRACKROCK:
-    sprintf(ctcpversion, STR("BitchX-%s\002/\002%s %s:(\002c\002)\037rackrock\037/\002b\002X \037[\0373.0.1á9\037]\037 :\002 Keep it to yourself!\002"), cloak_bxver, cloak_os, cloak_osver);
-    strcpy(ctcpuserinfo, STR("crack addict, help me."));
-    strcpy(autoaway, STR("automatically dead"));
-    strcpy(kickprefix, STR("\002c\002/\037k\037: "));
-    strcpy(bankickprefix, STR("\002c\002/\037kb\037: "));
+    sprintf(ctcpversion, "BitchX-%s\002/\002%s %s:(\002c\002)\037rackrock\037/\002b\002X \037[\0373.0.1á9\037]\037 :\002 Keep it to yourself!\002", cloak_bxver, cloak_os, cloak_osver);
+    strcpy(ctcpuserinfo, "crack addict, help me.");
+    strcpy(autoaway, "automatically dead");
+    strcpy(kickprefix, "\002c\002/\037k\037: ");
+    strcpy(bankickprefix, "\002c\002/\037kb\037: ");
     break;
   case CLOAK_NEONAPPLE:
-    sprintf(tmp, STR("%s %s"), cloak_os, cloak_osver);
+    sprintf(tmp, "%s %s", cloak_os, cloak_osver);
     p = strtolower(tmp);
-    sprintf(ctcpversion, STR("bitchx-%s\037(\037%s\037):\037 \002n\002eon\037a\037ppl\002e\002\037/\037\002v\0020\037.\03714i : \002d\002ont you wish you had it\037?\037"), cloak_bxver, p);
+    sprintf(ctcpversion, "bitchx-%s\037(\037%s\037):\037 \002n\002eon\037a\037ppl\002e\002\037/\037\002v\0020\037.\03714i : \002d\002ont you wish you had it\037?\037", cloak_bxver, p);
     free(p);
-    strcpy(ctcpuserinfo, STR("neon apple"));
-    strcpy(autoaway, STR("automatically away after 10 mins \037(\037\002n\002/\037a)\037"));
-    strcpy(kickprefix, STR("\037[na\002(\037k\037)\002]\037 "));
+    strcpy(ctcpuserinfo, "neon apple");
+    strcpy(autoaway, "automatically away after 10 mins \037(\037\002n\002/\037a)\037");
+    strcpy(kickprefix, "\037[na\002(\037k\037)\002]\037 ");
     strcpy(bankickprefix, "");
     break;
   case CLOAK_TUNNELVISION:
@@ -92,32 +92,32 @@ void scriptchanged()
     p[0] = '\037';
     p[2] = '\037';
     p[3] = 0;
-    sprintf(ctcpversion, STR("\002b\002itchx-%s :tunnel\002vision\002/\0371.2\037"), tmp);
+    sprintf(ctcpversion, "\002b\002itchx-%s :tunnel\002vision\002/\0371.2\037", tmp);
     strcpy(ctcpuserinfo, "");
-    strcpy(autoaway, STR("auto-gone"));
+    strcpy(autoaway, "auto-gone");
     strcpy(kickprefix, "");
     strcpy(bankickprefix, "");
     break;
   case CLOAK_ARGON:
-    sprintf(ctcpversion, STR(".\037.(\037argon\002/\0021g\037)\037 \002:\002bitchx-%s"), cloak_bxver);
+    sprintf(ctcpversion, ".\037.(\037argon\002/\0021g\037)\037 \002:\002bitchx-%s", cloak_bxver);
     strcpy(ctcpuserinfo, "");
-    strcpy(autoaway, STR("\037(\037ar\037)\037 auto-away \037(\03710m\037)\037"));
-    strcpy(kickprefix, STR("\037(\037ar\037)\037 "));
-    strcpy(bankickprefix, STR("\037(\037ar\037)\037 "));
+    strcpy(autoaway, "\037(\037ar\037)\037 auto-away \037(\03710m\037)\037");
+    strcpy(kickprefix, "\037(\037ar\037)\037 ");
+    strcpy(bankickprefix, "\037(\037ar\037)\037 ");
     break;
   case CLOAK_EVOLVER:
-    sprintf(ctcpversion, STR("\037evolver\037(\00202x9\002)\037: bitchx\037(\002%s\002) \037í\037 %s\002/\002%s : eye yam pheerable now!"), cloak_bxver, cloak_os, cloak_osver);
+    sprintf(ctcpversion, "\037evolver\037(\00202x9\002)\037: bitchx\037(\002%s\002) \037í\037 %s\002/\002%s : eye yam pheerable now!", cloak_bxver, cloak_os, cloak_osver);
     strcpy(ctcpuserinfo, "");
-    strcpy(autoaway, STR("[\037\002i\002dle for \037[\03710 minutes\037]]"));
-    strcpy(kickprefix, STR("\037ev\002!\002k\037 "));
-    strcpy(bankickprefix, STR("\037ev\002!\002bk\037 "));
+    strcpy(autoaway, "[\037\002i\002dle for \037[\03710 minutes\037]]");
+    strcpy(kickprefix, "\037ev\002!\002k\037 ");
+    strcpy(bankickprefix, "\037ev\002!\002bk\037 ");
     break;
   case CLOAK_PREVAIL:
-    sprintf(ctcpversion, STR("%s\037!\037%s bitchx-%s \002-\002 prevail\037[\0370123\037]\037 :down with people"), cloak_os, cloak_osver, cloak_bxver);
+    sprintf(ctcpversion, "%s\037!\037%s bitchx-%s \002-\002 prevail\037[\0370123\037]\037 :down with people", cloak_os, cloak_osver, cloak_bxver);
     strcpy(ctcpuserinfo, botrealname);
-    strcpy(autoaway, STR("idle 10 minutes \037-\037 gone\037!\037"));
-    strcpy(kickprefix, STR("\037[\037pv\037!\037k\037]\037 "));
-    strcpy(bankickprefix, STR("\037[\037pv\037!\037bk\037]\037 "));
+    strcpy(autoaway, "idle 10 minutes \037-\037 gone\037!\037");
+    strcpy(kickprefix, "\037[\037pv\037!\037k\037]\037 ");
+    strcpy(bankickprefix, "\037[\037pv\037!\037bk\037]\037 ");
     break;
   case CLOAK_MIRC:
   {
@@ -153,9 +153,9 @@ void scriptchanged()
       default:
         strcpy(mircver, "");
     }
-    sprintf(ctcpversion, STR("mIRC v%s Khaled Mardam-Bey"), mircver);
+    sprintf(ctcpversion, "mIRC v%s Khaled Mardam-Bey", mircver);
     strcpy(ctcpuserinfo, botrealname);
-    strcpy(autoaway, STR("auto-away after 10 minutes"));
+    strcpy(autoaway, "auto-away after 10 minutes");
     strcpy(kickprefix, "");
     strcpy(bankickprefix, "");
     break;
@@ -166,147 +166,147 @@ void scriptchanged()
 
     switch (randint(25)) { /* 0-19 = script, 20-24 = plain */
     case 0:
-      strcpy(theme, STR(" \037.\037.\002BX\002"));
+      strcpy(theme, " \037.\037.\002BX\002");
       break;
     case 1:
-      strcpy(theme, STR(" \037.\037.chl\037o\037rine"));
+      strcpy(theme, " \037.\037.chl\037o\037rine");
       break;
     case 2:
-      strcpy(theme, STR(" \037.\037.\037<\037c\002x\002\037>\037"));
+      strcpy(theme, " \037.\037.\037<\037c\002x\002\037>\037");
       break;
     case 3:
-      strcpy(theme, STR(" \037.\037.supercyan"));
+      strcpy(theme, " \037.\037.supercyan");
       break;
     case 4:
-      strcpy(theme, STR(" \037.\037.\037c\037yan\002i\002\002\037z\037\002\037e\037d"));
+      strcpy(theme, " \037.\037.\037c\037yan\002i\002\002\037z\037\002\037e\037d");
       break;
     case 5:
-      strcpy(theme, STR(" \037.\037.delusion"));
+      strcpy(theme, " \037.\037.delusion");
       break;
     case 6:
-      strcpy(theme, STR(" \037.\037.\002e\002mbryonic"));
+      strcpy(theme, " \037.\037.\002e\002mbryonic");
       break;
     case 7:
-      strcpy(theme, STR(" \037.\037.e\002x\002tra\037.\037terrestr\037i\037al"));
+      strcpy(theme, " \037.\037.e\002x\002tra\037.\037terrestr\037i\037al");
       break;
     case 8:
-      strcpy(theme, STR(" \037.\037.\002f\002ad\037e\037d"));
+      strcpy(theme, " \037.\037.\002f\002ad\037e\037d");
       break;
     case 9:
-      strcpy(theme, STR(" \037.\037.fo\037c\037us"));
+      strcpy(theme, " \037.\037.fo\037c\037us");
       break;
     case 10:
-      strcpy(theme, STR(" \037.\037.\002h\002ade\037s\037"));
+      strcpy(theme, " \037.\037.\002h\002ade\037s\037");
       break;
     case 11:
-      strcpy(theme, STR(" \037.\037.hellbent\037.\037"));
+      strcpy(theme, " \037.\037.hellbent\037.\037");
       break;
     case 12:
-      strcpy(theme, STR(" \037.\037.illusi\037o\037n"));
+      strcpy(theme, " \037.\037.illusi\037o\037n");
       break;
     case 13:
-      strcpy(theme, STR(" \037.\037.\037j\037ungl\037e\037"));
+      strcpy(theme, " \037.\037.\037j\037ungl\037e\037");
       break;
     case 14:
-      strcpy(theme, STR(" \037.\037.\002l\002abry\037i\037nth"));
+      strcpy(theme, " \037.\037.\002l\002abry\037i\037nth");
       break;
     case 15:
-      strcpy(theme, STR(" \037.\037.nightblue"));
+      strcpy(theme, " \037.\037.nightblue");
       break;
     case 16:
-      strcpy(theme, STR(" \037.\037.\037o\037bli\037v\037io\037n\037"));
+      strcpy(theme, " \037.\037.\037o\037bli\037v\037io\037n\037");
       break;
     case 17:
-      strcpy(theme, STR(" \037.\037.ph\002a\002ze"));
+      strcpy(theme, " \037.\037.ph\002a\002ze");
       break;
     case 18:
-      strcpy(theme, STR(" \037.\037.sphere"));
+      strcpy(theme, " \037.\037.sphere");
       break;
     case 19:
-      strcpy(theme, STR(" \037.\037.zip"));
+      strcpy(theme, " \037.\037.zip");
       break;
     default:
-      strcpy(theme, STR(""));
+      strcpy(theme, "");
       break;
     }
     switch (randint(16)) {
     case 0:
-      sprintf(ctcpversion, STR("bitchx\037-\037%s \037/\037 cypress\037.\03701i%s"), cloak_bxver, theme);
+      sprintf(ctcpversion, "bitchx\037-\037%s \037/\037 cypress\037.\03701i%s", cloak_bxver, theme);
       break;
     case 1:
-      sprintf(ctcpversion, STR("cypress\037.\03701i%s \037/\037 bitchx\037-\037%s"), theme, cloak_bxver);
+      sprintf(ctcpversion, "cypress\037.\03701i%s \037/\037 bitchx\037-\037%s", theme, cloak_bxver);
       break;
     case 2:
-      sprintf(tmp, STR("%s %s"), cloak_os, cloak_osver);
+      sprintf(tmp, "%s %s", cloak_os, cloak_osver);
       p = strtolower(tmp);
-      sprintf(ctcpversion, STR("cypress\037.\03701i%s %s\037(\037%s\037)\037 bitchx\037-\037%s)"), theme, p, cloak_host, cloak_bxver);
+      sprintf(ctcpversion, "cypress\037.\03701i%s %s\037(\037%s\037)\037 bitchx\037-\037%s)", theme, p, cloak_host, cloak_bxver);
       free(p);
       break;
     case 3:
-      sprintf(tmp, STR("%s %s"), cloak_os, cloak_osver);
+      sprintf(tmp, "%s %s", cloak_os, cloak_osver);
       p = strtolower(tmp);
-      sprintf(ctcpversion, STR("bitchx\037-\037%s %s\037(\037%s\037)\037 cypress\037.\03701i%s"), cloak_bxver, p, cloak_host, theme);
+      sprintf(ctcpversion, "bitchx\037-\037%s %s\037(\037%s\037)\037 cypress\037.\03701i%s", cloak_bxver, p, cloak_host, theme);
       free(p);
       break;
     case 4:
-      sprintf(ctcpversion, STR("%s\002/\002%s: BitchX-%s \002[\002cypress\002]\002 v01i%s"), cloak_os, cloak_osver, cloak_bxver, theme);
+      sprintf(ctcpversion, "%s\002/\002%s: BitchX-%s \002[\002cypress\002]\002 v01i%s", cloak_os, cloak_osver, cloak_bxver, theme);
       break;
     case 5:
       p = replace(cloak_osver, ".", "\037.\037");
-      sprintf(tmp, STR("%s %s"), cloak_os, p);
+      sprintf(tmp, "%s %s", cloak_os, p);
       p = strtolower(tmp);
-      sprintf(ctcpversion, STR("\037.\037.cypress\037.\03701i%s %s\037(\037%s\037)\037 bitchx\037/\037%s"),theme, p, cloak_host, cloak_bxver);
+      sprintf(ctcpversion, "\037.\037.cypress\037.\03701i%s %s\037(\037%s\037)\037 bitchx\037/\037%s",theme, p, cloak_host, cloak_bxver);
       free(p);
       break;
     case 6:
       p = replace(cloak_osver, ".", "\037.\037");
-      sprintf(tmp, STR("%s %s"), cloak_os, p);
+      sprintf(tmp, "%s %s", cloak_os, p);
       p = strtolower(tmp);
-      sprintf(ctcpversion, STR("cypress\002.\00201i%s\037(\037bitchx\002.\002%s\037)\037\002.\002. %s\037(\037%s\037)\037"),theme, cloak_bxver, p, cloak_host);
+      sprintf(ctcpversion, "cypress\002.\00201i%s\037(\037bitchx\002.\002%s\037)\037\002.\002. %s\037(\037%s\037)\037",theme, cloak_bxver, p, cloak_host);
       free(p);
       break;
     case 7:
       p = replace(cloak_osver, ".", "\037.\037");
-      sprintf(tmp, STR("%s %s"), cloak_os, p);
+      sprintf(tmp, "%s %s", cloak_os, p);
       p = strtolower(tmp);
-      sprintf(ctcpversion, STR("\037.\037.cypress\037.\03701i%s - bitchx\037.\037%s\002/\002%s"), theme, cloak_bxver, p);
+      sprintf(ctcpversion, "\037.\037.cypress\037.\03701i%s - bitchx\037.\037%s\002/\002%s", theme, cloak_bxver, p);
       free(p);
       break;
     case 8:
-      sprintf(ctcpversion, STR("\002BitchX-%s\002 by panasync \002-\002 %s %s"), cloak_bxver, cloak_os, cloak_osver);
+      sprintf(ctcpversion, "\002BitchX-%s\002 by panasync \002-\002 %s %s", cloak_bxver, cloak_os, cloak_osver);
       break;
     case 9:
-      sprintf(ctcpversion, STR("\037[\037cypress\002/\00201i\037]\037 - %s \037[\037bx\002/\002%s\037]\037"), theme, cloak_bxver);
+      sprintf(ctcpversion, "\037[\037cypress\002/\00201i\037]\037 - %s \037[\037bx\002/\002%s\037]\037", theme, cloak_bxver);
       break;
     case 10:
-      sprintf(ctcpversion, STR("\037[\037\002b\002itchx\002.\002%s\037]\037 \002+\002 \037[\037cypress\002.\00201i\037]\037 %s"),cloak_bxver, theme);
+      sprintf(ctcpversion, "\037[\037\002b\002itchx\002.\002%s\037]\037 \002+\002 \037[\037cypress\002.\00201i\037]\037 %s",cloak_bxver, theme);
       break;
     case 11:
-      sprintf(ctcpversion, STR("\037[\037BitchX\002/\002%s\037(\037cypress\002/\00201i\037)]\037 %s"), cloak_bxver, theme);
+      sprintf(ctcpversion, "\037[\037BitchX\002/\002%s\037(\037cypress\002/\00201i\037)]\037 %s", cloak_bxver, theme);
       break;
     case 12:
       p = strtolower(cloak_os);
-      sprintf(ctcpversion, STR("bitchx\037/\037%s %s %s \037(\037cypress\037/\03701i\037)\037 %s"), cloak_bxver, p, cloak_osver, theme);
+      sprintf(ctcpversion, "bitchx\037/\037%s %s %s \037(\037cypress\037/\03701i\037)\037 %s", cloak_bxver, p, cloak_osver, theme);
       free(p);
       break;
     case 13:
-      sprintf(ctcpversion, STR("\037.\037.cypress\037/\03701i\037!\037bitchx\037/\037%s\037.\037.%s"), cloak_bxver, theme);
+      sprintf(ctcpversion, "\037.\037.cypress\037/\03701i\037!\037bitchx\037/\037%s\037.\037.%s", cloak_bxver, theme);
       break;
     case 14:
       p = strtolower(cloak_bxver);
-      sprintf(ctcpversion, STR("cypress\002\037.\037\002\037.\03701i\002/\002bitchx\037.\037\002\037.\037\002%s%s"), p, theme);
+      sprintf(ctcpversion, "cypress\002\037.\037\002\037.\03701i\002/\002bitchx\037.\037\002\037.\037\002%s%s", p, theme);
       free(p);
       break;
     case 15:
       p = strtolower(cloak_bxver);
-      sprintf(ctcpversion, STR("cypress\037.\03701i\037/\037bx%s \037(\037%s\037)\037"), p, theme);
+      sprintf(ctcpversion, "cypress\037.\03701i\037/\037bx%s \037(\037%s\037)\037", p, theme);
       free(p);
       break;
     }
-    strcpy(ctcpuserinfo, STR(""));
-    strcpy(autoaway, STR("autoaway after 40 min"));
-    strcpy(kickprefix, STR("\002.\002.\037(\037\002c\002yp\002/\002k\037)\037 "));
-    strcpy(bankickprefix, STR("\002.\002.\037(\037\002c\002yp\002/\002bk\037)\037 "));
+    strcpy(ctcpuserinfo, "");
+    strcpy(autoaway, "autoaway after 40 min");
+    strcpy(kickprefix, "\002.\002.\037(\037\002c\002yp\002/\002k\037)\037 ");
+    strcpy(bankickprefix, "\002.\002.\037(\037\002c\002yp\002/\002bk\037)\037 ");
     break;
   }
   }
@@ -324,58 +324,58 @@ void sendaway()
   sec = gt % 60;
   switch (cloak_script) {
   case CLOAK_PLAIN:
-    dprintf(DP_HELP, STR("AWAY :is away: (%s) [\002BX\002-MsgLog Off]\n"), autoaway);
+    dprintf(DP_HELP, "AWAY :is away: (%s) [\002BX\002-MsgLog Off]\n", autoaway);
     break;
   case CLOAK_MIRC:
-    dprintf(DP_HELP, STR("AWAY :is away: (%s)\n"), autoaway);
+    dprintf(DP_HELP, "AWAY :is away: (%s)\n", autoaway);
     break;
   case CLOAK_CRACKROCK:
     if (hrs)
-      sprintf(awtime, STR("%dh %dm %ds"), hrs, min, sec);
+      sprintf(awtime, "%dh %dm %ds", hrs, min, sec);
     else if (min)
-      sprintf(awtime, STR("%dm %ds"), min, sec);
+      sprintf(awtime, "%dm %ds", min, sec);
     else
-      sprintf(awtime, STR("%ds"), sec);
-    dprintf(DP_HELP, STR("AWAY :%s\002\037[\002%s\002]\037\002\n"), autoaway, awtime);
+      sprintf(awtime, "%ds", sec);
+    dprintf(DP_HELP, "AWAY :%s\002\037[\002%s\002]\037\002\n", autoaway, awtime);
     break;
   case CLOAK_TUNNELVISION:
     if (hrs)
-      sprintf(awtime, STR("%dh%dm%ds"), hrs, min, sec);
+      sprintf(awtime, "%dh%dm%ds", hrs, min, sec);
     else if (min)
-      sprintf(awtime, STR("%dm%ds"), min, sec);
+      sprintf(awtime, "%dm%ds", min, sec);
     else
-      sprintf(awtime, STR("%ds"), sec);
-    dprintf(DP_HELP, STR("AWAY :%s \037(\037%s\037)\037\n"), autoaway, awtime);
+      sprintf(awtime, "%ds", sec);
+    dprintf(DP_HELP, "AWAY :%s \037(\037%s\037)\037\n", autoaway, awtime);
     break;
   case CLOAK_ARGON:
     if (hrs)
-      sprintf(awtime, STR("%dh%dm%ds"), hrs, min, sec);
+      sprintf(awtime, "%dh%dm%ds", hrs, min, sec);
     else if (min)
-      sprintf(awtime, STR("%dm%ds"), min, sec);
+      sprintf(awtime, "%dm%ds", min, sec);
     else
-      sprintf(awtime, STR("%ds"), sec);
-    dprintf(DP_HELP, STR("AWAY :%s .\002.\002\037(\037%s\037)\037\n"), autoaway, awtime);
+      sprintf(awtime, "%ds", sec);
+    dprintf(DP_HELP, "AWAY :%s .\002.\002\037(\037%s\037)\037\n", autoaway, awtime);
     break;
   case CLOAK_EVOLVER:
     if (hrs)
-      sprintf(awtime, STR("%dh %dm %ds"), hrs, min, sec);
+      sprintf(awtime, "%dh %dm %ds", hrs, min, sec);
     else if (min)
-      sprintf(awtime, STR("%dm %ds"), min, sec);
+      sprintf(awtime, "%dm %ds", min, sec);
     else
-      sprintf(awtime, STR("%ds"), sec);
-    dprintf(DP_HELP, STR("AWAY :away\037: %s (\037l\002:\002off\037,\037 p\002:\002off\037)\037 \037[\037gone\002:\002%s\037]\037\n"), autoaway, awtime);
+      sprintf(awtime, "%ds", sec);
+    dprintf(DP_HELP, "AWAY :away\037: %s (\037l\002:\002off\037,\037 p\002:\002off\037)\037 \037[\037gone\002:\002%s\037]\037\n", autoaway, awtime);
     break;
   case CLOAK_PREVAIL:
     if (hrs)
-      sprintf(awtime, STR("%dh%dm%ds"), hrs, min, sec);
+      sprintf(awtime, "%dh%dm%ds", hrs, min, sec);
     else if (min)
-      sprintf(awtime, STR("%dm%ds"), min, sec);
+      sprintf(awtime, "%dm%ds", min, sec);
     else
-      sprintf(awtime, STR("%ds"), sec);
-    dprintf(DP_HELP, STR("AWAY :%s %s\n"), autoaway, awtime);
+      sprintf(awtime, "%ds", sec);
+    dprintf(DP_HELP, "AWAY :%s %s\n", autoaway, awtime);
     break;
   case CLOAK_CYPRESS:
-    dprintf(DP_HELP, STR("AWAY :is gone\037.\037. %s \037.\037.\037[\037\002c\002yp\037(\037l\002/\002off\002.\002p\002/\002off)]\n"), autoaway);
+    dprintf(DP_HELP, "AWAY :is gone\037.\037. %s \037.\037.\037[\037\002c\002yp\037(\037l\002/\002off\002.\002p\002/\002off)]\n", autoaway);
     break;
   }
 }
@@ -389,7 +389,7 @@ static void ctcp_minutely()
   if (server_online) {
     if ((cloak_awaytime == 0) && (cloak_heretime == 0)) {
       cloak_heretime = now;
-      dprintf(DP_HELP, STR("AWAY :\n"));
+      dprintf(DP_HELP, "AWAY :\n");
       return;
     }
 
@@ -403,7 +403,7 @@ static void ctcp_minutely()
       if (!randint(AVGAWAYTIME)) {
         cloak_awaytime = 0;
         cloak_heretime = now;
-        dprintf(DP_HELP, STR("AWAY :\n"));
+        dprintf(DP_HELP, "AWAY :\n");
       } else
         sendaway();
     }
@@ -446,14 +446,14 @@ static int ctcp_ECHO(char *nick, char *uhost, struct userrec *u, char *object, c
   char reply[60] = "";
 
   strncpyz(reply, text, sizeof(reply));
-  dprintf(DP_HELP, STR("NOTICE %s :\001%s %s\001\n"), nick, keyword, reply);
+  dprintf(DP_HELP, "NOTICE %s :\001%s %s\001\n", nick, keyword, reply);
   return BIND_RET_BREAK;
 }
 static int ctcp_PING(char *nick, char *uhost, struct userrec *u, char *object, char *keyword, char *text)
 {
 
   if (strlen(text) <= 80)       /* bitchx ignores > 80 */
-    dprintf(DP_HELP, STR("NOTICE %s :\001%s %s\001\n"), nick, keyword, text);
+    dprintf(DP_HELP, "NOTICE %s :\001%s %s\001\n", nick, keyword, text);
   return BIND_RET_BREAK;
 }
 
@@ -464,32 +464,32 @@ static int ctcp_VERSION(char *nick, char *uhost, struct userrec *u, char *object
   if (cloak_script == CLOAK_CYPRESS) {
     switch (randint(8)) {
     case 0:
-      strcpy(s, STR(" :should of put the glock down."));
+      strcpy(s, " :should of put the glock down.");
       break;
     case 1:
-      strcpy(s, STR(" :hot damn, I didn't want to kill a man."));
+      strcpy(s, " :hot damn, I didn't want to kill a man.");
       break;
     case 2:
-      strcpy(s, STR(" :check me and I'll check ya back."));
+      strcpy(s, " :check me and I'll check ya back.");
       break;
     case 3:
-      strcpy(s, STR(" :put the blunt down just for a minute."));
+      strcpy(s, " :put the blunt down just for a minute.");
       break;
     case 4:
-      strcpy(s, STR(" :tried to jack me, my homie got shot."));
+      strcpy(s, " :tried to jack me, my homie got shot.");
       break;
     case 5:
-      strcpy(s, STR(" :insane in the membrane"));
+      strcpy(s, " :insane in the membrane");
       break;
     case 6:
-      strcpy(s, STR(" :slow hits from the bong"));
+      strcpy(s, " :slow hits from the bong");
       break;
     case 7:
-      strcpy(s, STR(" :k\002-\002leet"));
+      strcpy(s, " :k\002-\002leet");
       break;
     }
   }
-  dprintf(DP_HELP, STR("NOTICE %s :\001%s %s%s\001\n"), nick, keyword, ctcpversion, s);
+  dprintf(DP_HELP, "NOTICE %s :\001%s %s%s\001\n", nick, keyword, ctcpversion, s);
 /* if mirc send second reply here.. */
 
   return BIND_RET_BREAK;
@@ -498,7 +498,7 @@ static int ctcp_VERSION(char *nick, char *uhost, struct userrec *u, char *object
 static int ctcp_WHOAMI(char *nick, char *uhost, struct userrec *u, char *object, char *keyword, char *text)
 {
 
-  dprintf(DP_HELP, STR("NOTICE %s :\002BitchX\002: Access Denied\n"), nick);
+  dprintf(DP_HELP, "NOTICE %s :\002BitchX\002: Access Denied\n", nick);
   return BIND_RET_BREAK;
 }
 
@@ -511,7 +511,7 @@ static int ctcp_OP(char *nick, char *uhost, struct userrec *u, char *object, cha
     p = strchr(chan, ' ');
     if (p)
       *p = 0;
-    dprintf(DP_HELP, STR("NOTICE %s :\002BitchX\002: I'm not on %s or I'm not opped\n"), nick, chan);
+    dprintf(DP_HELP, "NOTICE %s :\002BitchX\002: I'm not on %s or I'm not opped\n", nick, chan);
   }
   return BIND_RET_BREAK;
 }
@@ -529,13 +529,13 @@ static int ctcp_INVITE_UNBAN(char *nick, char *uhost, struct userrec *u, char *o
     while (chan) {
       if (chan->status & CHAN_ACTIVE) {
         if (!egg_strcasecmp(chan->name, chname)) {
-          dprintf(DP_HELP, STR("NOTICE %s :\002BitchX\002: Access Denied\n"), nick);
+          dprintf(DP_HELP, "NOTICE %s :\002BitchX\002: Access Denied\n", nick);
           return BIND_RET_LOG;
         }
       }
       chan = chan->next;
     }
-    dprintf(DP_HELP, STR("NOTICE %s :\002BitchX\002: I'm not on that channel\n"), nick);
+    dprintf(DP_HELP, "NOTICE %s :\002BitchX\002: I'm not on that channel\n", nick);
   }
   return BIND_RET_BREAK;
 }
@@ -548,7 +548,7 @@ static int ctcp_USERINFO(char *nick, char *uhost, struct userrec *u, char *objec
     strcpy(ctcpuserinfo, botname);
     strcat(ctcpuserinfo, " ?");
   }
-  dprintf(DP_HELP, STR("NOTICE %s :\001%s %s\001\n"), nick, keyword, ctcpuserinfo);
+  dprintf(DP_HELP, "NOTICE %s :\001%s %s\001\n", nick, keyword, ctcpuserinfo);
   return BIND_RET_BREAK;
 }
 
@@ -557,58 +557,58 @@ static int ctcp_CLIENTINFO(char *nick, char *uhost, struct userrec *u, char *obj
   char buf[256] = "";
 
   if (!text[0]) {
-    strcpy(buf, STR("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"));
-  } else if (!egg_strcasecmp(text, STR("UNBAN")))
-    strcpy(buf, STR("UNBAN unbans the person from channel"));
-  else if (!egg_strcasecmp(text, STR("OPS")))
-    strcpy(buf, STR("OPS ops the person if on userlist"));
-  else if (!egg_strcasecmp(text, STR("ECHO")))
-    strcpy(buf, STR("ECHO returns the arguments it receives"));
-  else if (!egg_strcasecmp(text, STR("WHOAMI")))
-    strcpy(buf, STR("WHOAMI user list information"));
-  else if (!egg_strcasecmp(text, STR("INVITE")))
-    strcpy(buf, STR("INVITE invite to channel specified"));
-  else if (!egg_strcasecmp(text, STR("PING")))
-    strcpy(buf, STR("PING returns the arguments it receives"));
-  else if (!egg_strcasecmp(text, STR("UTC")))
-    strcpy(buf, STR("UTC substitutes the local timezone"));
-  else if (!egg_strcasecmp(text, STR("XDCC")))
-    strcpy(buf, STR("XDCC checks cdcc info for you"));
-  else if (!egg_strcasecmp(text, STR("BDCC")))
-    strcpy(buf, STR("BDCC checks cdcc info for you"));
-  else if (!egg_strcasecmp(text, STR("CDCC")))
-    strcpy(buf, STR("CDCC checks cdcc info for you"));
-  else if (!egg_strcasecmp(text, STR("DCC")))
-    strcpy(buf, STR("DCC requests a direct_client_connection"));
-  else if (!egg_strcasecmp(text, STR("ACTION")))
-    strcpy(buf, STR("ACTION contains action descriptions for atmosphere"));
-  else if (!egg_strcasecmp(text, STR("FINGER")))
-    strcpy(buf, STR("FINGER shows real name, login name and idle time of user"));
-  else if (!egg_strcasecmp(text, STR("ERRMSG")))
-    strcpy(buf, STR("ERRMSG returns error messages"));
-  else if (!egg_strcasecmp(text, STR("USERINFO")))
-    strcpy(buf, STR("USERINFO returns user settable information"));
-  else if (!egg_strcasecmp(text, STR("CLIENTINFO")))
-    strcpy(buf, STR("CLIENTINFO gives information about available CTCP commands"));
-  else if (!egg_strcasecmp(text, STR("SED")))
-    strcpy(buf, STR("SED contains simple_encrypted_data"));
+    strcpy(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");
+  } else if (!egg_strcasecmp(text, "UNBAN"))
+    strcpy(buf, "UNBAN unbans the person from channel");
+  else if (!egg_strcasecmp(text, "OPS"))
+    strcpy(buf, "OPS ops the person if on userlist");
+  else if (!egg_strcasecmp(text, "ECHO"))
+    strcpy(buf, "ECHO returns the arguments it receives");
+  else if (!egg_strcasecmp(text, "WHOAMI"))
+    strcpy(buf, "WHOAMI user list information");
+  else if (!egg_strcasecmp(text, "INVITE"))
+    strcpy(buf, "INVITE invite to channel specified");
+  else if (!egg_strcasecmp(text, "PING"))
+    strcpy(buf, "PING returns the arguments it receives");
+  else if (!egg_strcasecmp(text, "UTC"))
+    strcpy(buf, "UTC substitutes the local timezone");
+  else if (!egg_strcasecmp(text, "XDCC"))
+    strcpy(buf, "XDCC checks cdcc info for you");
+  else if (!egg_strcasecmp(text, "BDCC"))
+    strcpy(buf, "BDCC checks cdcc info for you");
+  else if (!egg_strcasecmp(text, "CDCC"))
+    strcpy(buf, "CDCC checks cdcc info for you");
+  else if (!egg_strcasecmp(text, "DCC"))
+    strcpy(buf, "DCC requests a direct_client_connection");
+  else if (!egg_strcasecmp(text, "ACTION"))
+    strcpy(buf, "ACTION contains action descriptions for atmosphere");
+  else if (!egg_strcasecmp(text, "FINGER"))
+    strcpy(buf, "FINGER shows real name, login name and idle time of user");
+  else if (!egg_strcasecmp(text, "ERRMSG"))
+    strcpy(buf, "ERRMSG returns error messages");
+  else if (!egg_strcasecmp(text, "USERINFO"))
+    strcpy(buf, "USERINFO returns user settable information");
+  else if (!egg_strcasecmp(text, "CLIENTINFO"))
+    strcpy(buf, "CLIENTINFO gives information about available CTCP commands");
+  else if (!egg_strcasecmp(text, "SED"))
+    strcpy(buf, "SED contains simple_encrypted_data");
   else if (!egg_strcasecmp(text, "OP"))
-    strcpy(buf, STR("OP ops the person if on userlist"));
-  else if (!egg_strcasecmp(text, STR("VERSION")))
-    strcpy(buf, STR("VERSION shows client type, version and environment"));
-  else if (!egg_strcasecmp(text, STR("XLINK")))
-    strcpy(buf, STR("XLINK x-filez rule"));
-  else if (!egg_strcasecmp(text, STR("IDENT")))
-    strcpy(buf, STR("IDENT change userhost of userlist"));
-  else if (!egg_strcasecmp(text, STR("TIME")))
-    strcpy(buf, STR("TIME tells you the time on the user's host"));
-  else if (!egg_strcasecmp(text, STR("UPTIME")))
-    strcpy(buf, STR("UPTIME my uptime"));
+    strcpy(buf, "OP ops the person if on userlist");
+  else if (!egg_strcasecmp(text, "VERSION"))
+    strcpy(buf, "VERSION shows client type, version and environment");
+  else if (!egg_strcasecmp(text, "XLINK"))
+    strcpy(buf, "XLINK x-filez rule");
+  else if (!egg_strcasecmp(text, "IDENT"))
+    strcpy(buf, "IDENT change userhost of userlist");
+  else if (!egg_strcasecmp(text, "TIME"))
+    strcpy(buf, "TIME tells you the time on the user's host");
+  else if (!egg_strcasecmp(text, "UPTIME"))
+    strcpy(buf, "UPTIME my uptime");
   else {
-    dprintf(DP_HELP, STR("NOTICE %s :\001ERRMSG %s is not a valid function\001\n"), nick, text);
+    dprintf(DP_HELP, "NOTICE %s :\001ERRMSG %s is not a valid function\001\n", nick, text);
     return BIND_RET_LOG;
   }
-  dprintf(DP_HELP, STR("NOTICE %s :\001%s %s\001\n"), nick, keyword, buf);
+  dprintf(DP_HELP, "NOTICE %s :\001%s %s\001\n", nick, keyword, buf);
   return BIND_RET_BREAK;
 }
 
@@ -617,7 +617,7 @@ static int ctcp_TIME(char *nick, char *uhost, struct userrec *u, char *object, c
   char tms[81] = "";
 
   strncpyz(tms, ctime(&now), sizeof(tms));
-  dprintf(DP_HELP, STR("NOTICE %s :\001%s %s\001\n"), nick, keyword, tms);
+  dprintf(DP_HELP, "NOTICE %s :\001%s %s\001\n", nick, keyword, tms);
   return BIND_RET_BREAK;
 }
 
@@ -719,15 +719,15 @@ void ctcp_init()
     /* shit, we have to come up with something ourselves.. */
     switch (randint(2)) {
     case 0:
-      strcpy(cloak_os, STR("Linux"));
-      strcpy(cloak_osver, STR("2.4.20"));
+      strcpy(cloak_os, "Linux");
+      strcpy(cloak_osver, "2.4.20");
       break;
     case 1:
-      strcpy(cloak_os, STR("FreeBSD"));
-      strcpy(cloak_osver, STR("4.5-STABLE"));
+      strcpy(cloak_os, "FreeBSD");
+      strcpy(cloak_osver, "4.5-STABLE");
       break;
     }
-    strcpy(cloak_host, STR("login"));
+    strcpy(cloak_host, "login");
 #ifndef CYGWIN_HACKS
   }
 #endif /* !CYGWIN_HACKS */
@@ -736,16 +736,16 @@ void ctcp_init()
 
   switch (randint(4)) {
   case 0:
-    strcpy(cloak_bxver, STR("1.0c17"));
+    strcpy(cloak_bxver, "1.0c17");
     break;
   case 1:
-    strcpy(cloak_bxver, STR("1.0c18"));
+    strcpy(cloak_bxver, "1.0c18");
     break;
   case 2:
-    strcpy(cloak_bxver, STR("1.0c19"));
+    strcpy(cloak_bxver, "1.0c19");
     break;
   case 3:
-    strcpy(cloak_bxver, STR("1.0c20cvs+"));
+    strcpy(cloak_bxver, "1.0c20cvs+");
     break;
   }
   scriptchanged();

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

@@ -140,7 +140,7 @@ void priority_do(struct chanset_t * chan, int opsonly, int action)
     if (!m->user) {
       char s[256] = "";
 
-      sprintf(s, STR("%s!%s"), m->nick, m->userhost);
+      sprintf(s, "%s!%s", m->nick, m->userhost);
       m->user = get_user_by_host(s);
     }
 
@@ -199,7 +199,7 @@ void priority_do(struct chanset_t * chan, int opsonly, int action)
             sent++;
             if (chan->closed_ban)
               doban(chan, m);
-            dprintf(DP_MODE, STR("KICK %s %s :%s%s\n"), chan->name, m->nick, kickprefix, kickreason(KICK_CLOSED));
+            dprintf(DP_MODE, "KICK %s %s :%s%s\n", chan->name, m->nick, kickprefix, kickreason(KICK_CLOSED));
             m->flags |= SENTKICK;
             if (actions >= ct)
               return;
@@ -241,7 +241,7 @@ void priority_do(struct chanset_t * chan, int opsonly, int action)
             actions++;
             if (chan->closed_ban)
               doban(chan, m);
-            dprintf(DP_MODE, STR("KICK %s %s :%s%s\n"), chan->name, m->nick, kickprefix, kickreason(KICK_CLOSED));
+            dprintf(DP_MODE, "KICK %s %s :%s%s\n", chan->name, m->nick, kickprefix, kickreason(KICK_CLOSED));
             m->flags |= SENTKICK;
             if ((actions >= ct) || (sent > 5))
               return;
@@ -444,7 +444,7 @@ static int detect_chan_flood(char *floodnick, char *floodhost, char *from,
       /* Flooding chan! either by public or notice */
       if (!chan_sentkick(m) && me_op(chan)) {
 	putlog(LOG_MODES, chan->dname, IRC_FLOODKICK, floodnick);
-        dprintf(DP_MODE, STR("KICK %s %s :%s%s\n"), chan->name, floodnick, kickprefix, kickreason(KICK_FLOOD));
+        dprintf(DP_MODE, "KICK %s %s :%s%s\n", chan->name, floodnick, kickprefix, kickreason(KICK_FLOOD));
 	m->flags |= SENTKICK;
       }
       return 1;
@@ -480,7 +480,7 @@ static int detect_chan_flood(char *floodnick, char *floodhost, char *from,
    	        dprintf(DP_SERVER, "KICK %s %s :%s%s\n", chan->name, m->nick,
 		      kickprefix, IRC_JOIN_FLOOD);
 	      else
-                dprintf(DP_SERVER, STR("KICK %s %s :%s%s\n"), chan->name, m->nick, kickprefix, kickreason(KICK_NICKFLOOD));
+                dprintf(DP_SERVER, "KICK %s %s :%s%s\n", chan->name, m->nick, kickprefix, kickreason(KICK_NICKFLOOD));
 	    }
 	  }
 	}
@@ -488,7 +488,7 @@ static int detect_chan_flood(char *floodnick, char *floodhost, char *from,
     case FLOOD_KICK:
       if (me_op(chan) && !chan_sentkick(m)) {
 	putlog(LOG_MODES, chan->dname, "Kicking %s, for mass kick.", floodnick);
-        dprintf(DP_MODE, STR("KICK %s %s :%s%s\n"), chan->name, floodnick, kickprefix, kickreason(KICK_KICKFLOOD));
+        dprintf(DP_MODE, "KICK %s %s :%s%s\n", chan->name, floodnick, kickprefix, kickreason(KICK_KICKFLOOD));
 	m->flags |= SENTKICK;
       }
     return 1;
@@ -496,13 +496,13 @@ static int detect_chan_flood(char *floodnick, char *floodhost, char *from,
       if (me_op(chan) && !chan_sentkick(m)) {
 	putlog(LOG_MODES, chan->dname,
 	       CHAN_MASSDEOP, chan->dname, from);
-        dprintf(DP_MODE, STR("KICK %s %s :%s%s\n"), chan->name, floodnick, kickprefix, kickreason(KICK_MASSDEOP));
+        dprintf(DP_MODE, "KICK %s %s :%s%s\n", chan->name, floodnick, kickprefix, kickreason(KICK_MASSDEOP));
 	m->flags |= SENTKICK;
       }
       if (u) {
         char s[256] = "";
 
-        sprintf(s, STR("Mass deop on %s by %s"), chan->dname, from);
+        sprintf(s, "Mass deop on %s by %s", chan->dname, from);
         deflag_user(u, DEFLAG_MDOP, s, chan);
       }
       return 1;
@@ -995,7 +995,7 @@ void enforce_closed(struct chanset_t *chan) {
   if (chan->closed_private && !(chan->channel.mode & CHANPRIV))
     strcat(buf, "p"); 
   if (buf && buf[0])
-    dprintf(DP_MODE, STR("MODE %s +%s\n"), chan->name, buf);
+    dprintf(DP_MODE, "MODE %s +%s\n", chan->name, buf);
   priority_do(chan, 0, PRIO_KICK);
 }
 
@@ -1449,7 +1449,7 @@ static int got352or4(struct chanset_t *chan, char *user, char *host, char *serv,
       /* and it's not me, and i'm an op */
       !match_my_nick(nick) && me_op(chan)) {
     /*  && target_priority(chan, m, 0) */
-    dprintf(DP_SERVER, STR("KICK %s %s :%s%s\n"), chan->name, nick, bankickprefix, kickreason(KICK_BANNED));
+    dprintf(DP_SERVER, "KICK %s %s :%s%s\n", chan->name, nick, bankickprefix, kickreason(KICK_BANNED));
     m->flags |= SENTKICK;
   }
   /* if the user is a +k */
@@ -1460,7 +1460,7 @@ static int got352or4(struct chanset_t *chan, char *user, char *host, char *serv,
            /* && target_priority(chan, m, 0) */
     /* cya later! */
     quickban(chan, userhost);
-    dprintf(DP_SERVER, STR("KICK %s %s :%s%s\n"), chan->name, nick, bankickprefix, kickreason(KICK_KUSER));
+    dprintf(DP_SERVER, "KICK %s %s :%s%s\n", chan->name, nick, bankickprefix, kickreason(KICK_KUSER));
     m->flags |= SENTKICK;
   }
 
@@ -2181,7 +2181,7 @@ static int gotjoin(char *from, char *chname)
               me_op(chan)) {
             for (b = chan->channel.ban; b->mask[0]; b = b->next) {
               if (wild_match(b->mask, from)) {
-                dprintf(DP_SERVER, STR("KICK %s %s :%s%s\n"), chname, m->nick, bankickprefix, kickreason(KICK_BANNED));
+                dprintf(DP_SERVER, "KICK %s %s :%s%s\n", chname, m->nick, bankickprefix, kickreason(KICK_BANNED));
                 m->flags |= SENTKICK;
                 goto exit;
               }
@@ -2197,7 +2197,7 @@ static int gotjoin(char *from, char *chname)
 	    check_exemptlist(chan, from);
 	    quickban(chan, from);
 	    p = get_user(&USERENTRY_COMMENT, m->user);
-            dprintf(DP_MODE, STR("KICK %s %s :%s%s\n"), chname, nick, bankickprefix, kickreason(KICK_KUSER));
+            dprintf(DP_MODE, "KICK %s %s :%s%s\n", chname, nick, bankickprefix, kickreason(KICK_KUSER));
 	    m->flags |= SENTKICK;
 	  }
 	}
@@ -2454,11 +2454,11 @@ void check_should_cycle(struct chanset_t *chan)
     /* I'm only one opped here... and other side has some ops... so i'm cycling */
     if (localnonops) {
       /* need to unset any +kil first */
-      dprintf(DP_MODE, STR("MODE %s -ilk %s\nPART %s\nJOIN %s\n"), chan->name,
+      dprintf(DP_MODE, "MODE %s -ilk %s\nPART %s\nJOIN %s\n", chan->name,
                             (chan->channel.key && chan->channel.key[0]) ? chan->channel.key : "",
                              chan->name, chan->name);
     } else
-      dprintf(DP_MODE, STR("PART %s\nJOIN %s\n"), chan->name, chan->name);
+      dprintf(DP_MODE, "PART %s\nJOIN %s\n", chan->name, chan->name);
   }
 }
 #endif /* S_SPLITHIJACK */

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

@@ -704,7 +704,7 @@ ContextNote("!mdop!");
   }
   if (bitch && !simul && chan) {
     chan->status |= CHAN_BITCH;
-    do_chanset(NULL, chan, STR("+bitch"), DO_LOCAL | DO_NET);
+    do_chanset(NULL, chan, "+bitch", DO_LOCAL | DO_NET);
   }
   free(targets);
   free(chanbots);
@@ -991,7 +991,7 @@ static void cmd_mop(struct userrec *u, int idx, char *par)
         if (!m->user) {
           char s[256] = "";
 
-          sprintf(s, STR("%s!%s"), m->nick, m->userhost);
+          sprintf(s, "%s!%s", m->nick, m->userhost);
           m->user = get_user_by_host(s);
         }
         get_user_flagrec(m->user, &victim, chan->dname);
@@ -1041,7 +1041,7 @@ static void cmd_find(struct userrec *u, int idx, char *par)
       for (m = chan->channel.member; m && m->nick[0]; m = m->next) {
         char tmp[256] = "";
 
-        sprintf(tmp, STR("%s!%s"), m->nick, m->userhost ? m->userhost : "(null)");
+        sprintf(tmp, "%s!%s", m->nick, m->userhost ? m->userhost : "(null)");
         if (wild_match(par, tmp)) {
           fcount++;
           if (!found) {
@@ -1500,7 +1500,7 @@ static void cmd_adduser(struct userrec *u, int idx, char *par)
   if (!u) {
     userlist = adduser(userlist, hand, p1, "-", USER_DEFAULT);
     u = get_user_by_handle(userlist, hand);
-    sprintf(tmp, STR("%li %s"), now, dcc[idx].nick);
+    sprintf(tmp, "%li %s", now, dcc[idx].nick);
     set_user(&USERENTRY_ADDED, u, tmp);
     make_rand_str(s2, 15);
     set_user(&USERENTRY_PASS, u, s2);
@@ -1509,8 +1509,8 @@ static void cmd_adduser(struct userrec *u, int idx, char *par)
     set_user(&USERENTRY_SECPASS, u, s3);
 
     dprintf(idx, "Added [%s]%s with no flags.\n", hand, p1);
-    dprintf(idx, STR("%s's initial password set to \002%s\002\n"), hand, s2);
-    dprintf(idx, STR("%s's initial secpass set to \002%s\002\n"), hand, s3);
+    dprintf(idx, "%s's initial password set to \002%s\002\n", hand, s2);
+    dprintf(idx, "%s's initial secpass set to \002%s\002\n", hand, s3);
   } else {
     dprintf(idx, "Added hostmask %s to %s.\n", p1, u->handle);
     addhost_by_handle(hand, p1);

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

@@ -147,7 +147,7 @@ void makeopline(struct chanset_t *chan, char *nick, char *buf)
   p = encrypt_string(key, plaincookie);
   strcpy(enccookie, p);
   free(p);
-  sprintf(buf, STR("MODE %s +o-b %s *!*@<%s>\n"), chan->name, nck, enccookie);
+  sprintf(buf, "MODE %s +o-b %s *!*@<%s>\n", chan->name, nck, enccookie);
 }
 
 /*
@@ -199,7 +199,7 @@ void getin_request(char *botnick, char *code, char *par)
     return;
 
   if (!(chan = findchan_by_dname(chname))) {
-    putlog(LOG_GETIN, "*", STR("getin req from %s for %s which is not a valid channel!"), botnick, chname);
+    putlog(LOG_GETIN, "*", "getin req from %s for %s which is not a valid channel!", botnick, chname);
     return;
   }
 
@@ -242,7 +242,7 @@ void getin_request(char *botnick, char *code, char *par)
     host[0] = 0;
   /*
     if (!ismember(chan, botname)) {
-      putlog(LOG_GETIN, "*", STR("getin req from %s for %s - I'm not on %s!"), botnick, chname, chname);
+      putlog(LOG_GETIN, "*", "getin req from %s for %s - I'm not on %s!", botnick, chname, chname);
       return;
     }
   */
@@ -253,53 +253,53 @@ void getin_request(char *botnick, char *code, char *par)
 
   if (what[0] == 'o') {
     if (!nick[0]) {
-      putlog(LOG_GETIN, "*", STR("opreq from %s/??? on %s - No nick specified - SHOULD NOT HAPPEN"), botnick, chname);
+      putlog(LOG_GETIN, "*", "opreq from %s/??? on %s - No nick specified - SHOULD NOT HAPPEN", botnick, chname);
       return;
     }
     if (!chan) {
-      putlog(LOG_GETIN, "*", STR("opreq from %s/%s on %s - Channel %s doesn't exist"), botnick, nick, chname, chname);
+      putlog(LOG_GETIN, "*", "opreq from %s/%s on %s - Channel %s doesn't exist", botnick, nick, chname, chname);
       return;
     }
     if (!mem) {
-      putlog(LOG_GETIN, "*", STR("opreq from %s/%s on %s - %s isn't on %s"), botnick, nick, chan->dname, nick, chan->dname);
+      putlog(LOG_GETIN, "*", "opreq from %s/%s on %s - %s isn't on %s", botnick, nick, chan->dname, nick, chan->dname);
       return;
     }
     if (!u) {
-      putlog(LOG_GETIN, "*", STR("opreq from %s/%s on %s - No user called %s in userlist"), botnick, nick, chan->dname, botnick);
+      putlog(LOG_GETIN, "*", "opreq from %s/%s on %s - No user called %s in userlist", botnick, nick, chan->dname, botnick);
       return;
     }
     if (mem->user != u) {
-      putlog(LOG_GETIN, "*", STR("opreq from %s/%s on %s - %s doesn't match %s"), botnick, nick, chan->dname, nick, botnick);
+      putlog(LOG_GETIN, "*", "opreq from %s/%s on %s - %s doesn't match %s", botnick, nick, chan->dname, nick, botnick);
       return;
     }
     get_user_flagrec(u, &fr, chan->dname);
 
     if ((!chan_op(fr) && !glob_op(fr)) || (glob_deop(fr) && !chan_op(fr))) {
-      putlog(LOG_GETIN, "*", STR("opreq from %s/%s on %s - %s doesnt have +o for chan."), botnick, nick, chan->dname, botnick);
+      putlog(LOG_GETIN, "*", "opreq from %s/%s on %s - %s doesnt have +o for chan.", botnick, nick, chan->dname, botnick);
       return;
     }
     if (chan_hasop(mem)) {
-      putlog(LOG_GETIN, "*", STR("opreq from %s/%s on %s - %s already has ops"), botnick, nick, chan->dname, nick);
+      putlog(LOG_GETIN, "*", "opreq from %s/%s on %s - %s already has ops", botnick, nick, chan->dname, nick);
       return;
     }
     if (chan_issplit(mem)) {
-      putlog(LOG_GETIN, "*", STR("opreq from %s/%s on %s - %s is split"), botnick, nick, chan->dname, nick);
+      putlog(LOG_GETIN, "*", "opreq from %s/%s on %s - %s is split", botnick, nick, chan->dname, nick);
       return;
     }
     if (!me_op(chan)) {
-      putlog(LOG_GETIN, "*", STR("opreq from %s/%s on %s - I haven't got ops"), botnick, nick, chan->dname);
+      putlog(LOG_GETIN, "*", "opreq from %s/%s on %s - I haven't got ops", botnick, nick, chan->dname);
       return;
     }
     if (chan_sentop(mem)) {
-      putlog(LOG_GETIN, "*", STR("opreq from %s/%s on %s - Already sent a +o"), botnick, nick, chan->dname);
+      putlog(LOG_GETIN, "*", "opreq from %s/%s on %s - Already sent a +o", botnick, nick, chan->dname);
       return;
     }
     if (server_lag > LAG_THRESHOLD) {
-      putlog(LOG_GETIN, "*", STR("opreq from %s/%s on %s - I'm too lagged"), botnick, nick, chan->dname);
+      putlog(LOG_GETIN, "*", "opreq from %s/%s on %s - I'm too lagged", botnick, nick, chan->dname);
       return;
     }
     if (getting_users()) {
-      putlog(LOG_GETIN, "*", STR("opreq from %s/%s on %s - I'm getting userlist right now"), botnick, nick, chan->dname);
+      putlog(LOG_GETIN, "*", "opreq from %s/%s on %s - I'm getting userlist right now", botnick, nick, chan->dname);
       return;
     }
     if (chan->channel.no_op) {
@@ -311,48 +311,48 @@ void getin_request(char *botnick, char *code, char *par)
     do_op(nick, chan, 1);
     mem->flags |= SENTOP;
 
-    putlog(LOG_GETIN, "*", STR("opreq from %s/%s on %s - Opped"), botnick, nick, chan->dname);
+    putlog(LOG_GETIN, "*", "opreq from %s/%s on %s - Opped", botnick, nick, chan->dname);
   } else if (what[0] == 'i') {
     strcpy(s, getchanmode(chan));
     p = (char *) &s;
     p2 = newsplit(&p);
     p3 = newsplit(&p);
     if (!nick[0]) {
-      putlog(LOG_GETIN, "*", STR("inreq from %s/??? for %s - No nick specified - SHOULD NOT HAPPEN"), botnick, chname);
+      putlog(LOG_GETIN, "*", "inreq from %s/??? for %s - No nick specified - SHOULD NOT HAPPEN", botnick, chname);
       return;
     }
     if (!chan) {
-      putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - Channel %s doesn't exist"), botnick, nick, chname, chname);
+      putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - Channel %s doesn't exist", botnick, nick, chname, chname);
       return;
     }
     if (mem) {
-      putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - %s is already on %s"), botnick, nick, chan->dname, nick, chan->dname);
+      putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - %s is already on %s", botnick, nick, chan->dname, nick, chan->dname);
       return;
     }
     if (!u) {
-      putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - No user called %s in userlist"), botnick, nick, chan->dname, botnick);
+      putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - No user called %s in userlist", botnick, nick, chan->dname, botnick);
       return;
     }
     get_user_flagrec(u, &fr, chan->dname);
     if ((!chan_op(fr) && !glob_op(fr)) || (glob_deop(fr) && !chan_op(fr))) {
-      putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - %s doesn't have acces for chan."), botnick, nick, chan->dname, botnick);
+      putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - %s doesn't have acces for chan.", botnick, nick, chan->dname, botnick);
       return;
     }
     if (server_lag > LAG_THRESHOLD) {
-      putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - I'm too lagged"), botnick, nick, chan->dname);
+      putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - I'm too lagged", botnick, nick, chan->dname);
       return;
     }
     if (getting_users()) {
-      putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - I'm getting userlist right now"), botnick, nick, chan->dname);
+      putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - I'm getting userlist right now", botnick, nick, chan->dname);
       return;
     }
     if (!(channel_pending(chan) || channel_active(chan))) {
-      putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - I'm not on %s now"), botnick, nick, chan->dname, chan->dname);
+      putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - I'm not on %s now", botnick, nick, chan->dname, chan->dname);
       return;
     }
     if (strchr(p2, 'l')) {
       if (!me_op(chan))
-	putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - I haven't got ops"), botnick, nick, chan->dname);
+	putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - I haven't got ops", botnick, nick, chan->dname);
       else {
 	lim = chan->channel.members + 5;
 	if (!*p)
@@ -361,9 +361,9 @@ void getin_request(char *botnick, char *code, char *par)
 	  curlim = atoi(p);
 	if (curlim > 0 && curlim < lim) {
 	  sendi = 1;
-	  simple_sprintf(s2, STR("%d"), lim);
+	  simple_sprintf(s2, "%d", lim);
 	  add_mode(chan, '+', 'l', s2);
-	  putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - Raised limit to %d"), botnick, nick, chan->dname, lim, nick);
+	  putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - Raised limit to %d", botnick, nick, chan->dname, lim, nick);
 	}
       }
     }
@@ -371,9 +371,9 @@ void getin_request(char *botnick, char *code, char *par)
     while (*mr) {
       if (wild_match((*mr)->mask, host) || wild_match((*mr)->mask, ip4host) || wild_match((*mr)->mask, ip6host)) {
 	if (!noshare) {
-	  shareout(NULL, STR("-b %s\n"), (*mr)->mask);
+	  shareout(NULL, "-b %s\n", (*mr)->mask);
 	}
-	putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - Removed permanent global ban %s"), botnick, nick, chan->dname, (*mr)->mask);
+	putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - Removed permanent global ban %s", botnick, nick, chan->dname, (*mr)->mask);
 	/*gban_total--;*/
 	free((*mr)->mask);
 	if ((*mr)->desc)
@@ -391,9 +391,9 @@ void getin_request(char *botnick, char *code, char *par)
     while (*mr) {
       if (wild_match((*mr)->mask, host) || wild_match((*mr)->mask, ip4host) || wild_match((*mr)->mask, ip6host)) {
 	if (!noshare) {
-	  shareout(NULL, STR("-bc %s %s\n"), chan->dname, (*mr)->mask);
+	  shareout(NULL, "-bc %s %s\n", chan->dname, (*mr)->mask);
 	}
-	putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - Removed permanent channel ban %s"), botnick, nick, chan->dname, (*mr)->mask);
+	putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - Removed permanent channel ban %s", botnick, nick, chan->dname, (*mr)->mask);
 	free((*mr)->mask);
 	if ((*mr)->desc)
 	  free((*mr)->desc);
@@ -409,41 +409,41 @@ void getin_request(char *botnick, char *code, char *par)
     for (b = chan->channel.ban; b->mask[0]; b = b->next) {
       if (wild_match(b->mask, host) || wild_match(b->mask, ip4host) || wild_match(b->mask, ip6host)) {
 	add_mode(chan, '-', 'b', b->mask);
-	putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - Removed active ban %s"), botnick, nick, chan->dname, b->mask);
+	putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - Removed active ban %s", botnick, nick, chan->dname, b->mask);
 	sendi = 1;
       }
     }
     if (strchr(p2, 'k')) {
       sendi = 0;
       tmp = calloc(1, strlen(chan->dname) + strlen(p3) + 7);
-      sprintf(tmp, STR("gi K %s %s"), chan->dname, p3);
+      sprintf(tmp, "gi K %s %s", chan->dname, p3);
       botnet_send_zapf(nextbot(botnick), conf.bot->nick, botnick, tmp);
-      putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - Sent key (%s)"), botnick, nick, chan->dname, p3);
+      putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - Sent key (%s)", botnick, nick, chan->dname, p3);
       free(tmp);
     }
     if (strchr(p2, 'i')) {
       if (!me_op(chan))
-	putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - I haven't got ops"), botnick, nick, chan->dname);
+	putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - I haven't got ops", botnick, nick, chan->dname);
       else {
 	sendi = 1;
-	putlog(LOG_GETIN, "*", STR("inreq from %s/%s for %s - Invited"), botnick, nick, chan->dname);
+	putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - Invited", botnick, nick, chan->dname);
       }
     }
     if (sendi && me_op(chan))
-      dprintf(DP_MODE, STR("INVITE %s %s\n"), nick, chan->name);
+      dprintf(DP_MODE, "INVITE %s %s\n", nick, chan->name);
   } else if (what[0] == 'K') {
     if (!chan) {
-      putlog(LOG_GETIN, "*", STR("Got key for nonexistant channel %s from %s"), chname, botnick);
+      putlog(LOG_GETIN, "*", "Got key for nonexistant channel %s from %s", chname, botnick);
       return;
     }
     if (!shouldjoin(chan)) {
-      putlog(LOG_GETIN, "*", STR("Got key for %s from %s - I shouldn't be on that chan?!?"), chan->dname, botnick);
+      putlog(LOG_GETIN, "*", "Got key for %s from %s - I shouldn't be on that chan?!?", chan->dname, botnick);
     } else {
       if (!(channel_pending(chan) || channel_active(chan))) {
-	putlog(LOG_GETIN, "*", STR("Got key for %s from %s (%s) - Joining"), chan->dname, botnick, nick);
-	dprintf(DP_MODE, STR("JOIN %s %s\n"), chan->dname, nick);
+	putlog(LOG_GETIN, "*", "Got key for %s from %s (%s) - Joining", chan->dname, botnick, nick);
+	dprintf(DP_MODE, "JOIN %s %s\n", chan->dname, nick);
       } else {
-	putlog(LOG_GETIN, "*", STR("Got key for %s from %s - I'm already in the channel"), chan->dname, botnick);
+	putlog(LOG_GETIN, "*", "Got key for %s from %s - I'm already in the channel", chan->dname, botnick);
       }
     }
   }
@@ -461,10 +461,10 @@ void check_hostmask()
 
   if (!tmp[0] || !tmp[1]) return;
   if (tmp[0] != '~')
-    sprintf(s, STR("*!%s"), tmp);
+    sprintf(s, "*!%s", tmp);
   else {
     tmp++;
-    sprintf(s, STR("*!*%s"), tmp);
+    sprintf(s, "*!*%s", tmp);
   }
   for (q = get_user(&USERENTRY_HOSTS, conf.bot->u); q; q = q->next) {
     if (!strcasecmp(q->extra, s))
@@ -472,7 +472,7 @@ void check_hostmask()
   }
 
   addhost_by_handle(conf.bot->nick, s);
-  putlog(LOG_GETIN, "*", STR("Updated my hostmask: %s"), s);
+  putlog(LOG_GETIN, "*", "Updated my hostmask: %s", s);
 }
 
 static void request_op(struct chanset_t *chan)
@@ -496,7 +496,7 @@ static void request_op(struct chanset_t *chan)
   chan->channel.do_opreq = 0;
   /* check server lag */
   if (server_lag > LAG_THRESHOLD) {
-    putlog(LOG_GETIN, "*", STR("Not asking for ops on %s - I'm too lagged"), chan->dname);
+    putlog(LOG_GETIN, "*", "Not asking for ops on %s - I'm too lagged", chan->dname);
     return;
   }
   /* max OPREQ_COUNT requests per OPREQ_SECONDS sec */
@@ -511,7 +511,7 @@ static void request_op(struct chanset_t *chan)
     i++;
   }
   if ((5 - my_exp) >= OPREQ_COUNT) {
-    putlog(LOG_GETIN, "*", STR("Delaying opreq for %s - Maximum of %d:%d reached"), chan->dname, OPREQ_COUNT, OPREQ_SECONDS);
+    putlog(LOG_GETIN, "*", "Delaying opreq for %s - Maximum of %d:%d reached", chan->dname, OPREQ_COUNT, OPREQ_SECONDS);
     return;
   }
   if (!checked_hostmask)
@@ -534,7 +534,7 @@ static void request_op(struct chanset_t *chan)
   if (!i) {
     /* FIXME: This notice floods when bots arent in chans..*/
     if (channel_active(chan) && !channel_pending(chan))
-      putlog(LOG_GETIN, "*", STR("No one to ask for ops on %s"), chan->dname);
+      putlog(LOG_GETIN, "*", "No one to ask for ops on %s", chan->dname);
     return;
   }
 
@@ -581,7 +581,7 @@ static void request_op(struct chanset_t *chan)
 	cnt--;
     }
   }
-  putlog(LOG_GETIN, "*", STR("Requested ops on %s from %s"), chan->dname, l);
+  putlog(LOG_GETIN, "*", "Requested ops on %s from %s", chan->dname, l);
   free(l);
 }
 
@@ -603,7 +603,7 @@ static void request_in(struct chanset_t *chan)
       botops[i++] = u;
   }
   if (!i) {
-    putlog(LOG_GETIN, "*", STR("No bots linked, can't request help to join %s"), chan->dname);
+    putlog(LOG_GETIN, "*", "No bots linked, can't request help to join %s", chan->dname);
     return;
   }
   if (!checked_hostmask)
@@ -629,7 +629,7 @@ static void request_in(struct chanset_t *chan)
 	cnt--;
     }
   }
-  putlog(LOG_GETIN, "*", STR("Requesting help to join %s from %s"), chan->dname, l);
+  putlog(LOG_GETIN, "*", "Requesting help to join %s from %s", chan->dname, l);
   free(l);
 }
 
@@ -790,7 +790,7 @@ static void punish_badguy(struct chanset_t *chan, char *whobad,
       !chan_sentkick(m) &&
       /* ... and can I actually do anything about it? */
       me_op(chan) && !mevictim) {
-    dprintf(DP_MODE, STR("KICK %s %s :%s%s\n"), chan->name, m->nick, bankickprefix, kickreason(KICK_MEAN));
+    dprintf(DP_MODE, "KICK %s %s :%s%s\n", chan->name, m->nick, bankickprefix, kickreason(KICK_MEAN));
     m->flags |= SENTKICK;
   }
 }
@@ -1088,7 +1088,7 @@ void check_servers() {
     for (m = chan->channel.member; m && m->nick[0]; m = m->next) {
       if (!match_my_nick(m->nick) && chan_hasop(m) && (!m->server || (m->server && !m->server[0]) || (m->hops == -1))) {
         putlog(LOG_DEBUG, "*", "Updating WHO for '%s' because '%s' is missing data.", chan->dname, m->nick);
-        dprintf(DP_HELP, STR("WHO %s\n"), chan->name);
+        dprintf(DP_HELP, "WHO %s\n", chan->name);
         break;			/* lets just do one chan at a time to save from flooding */
       }
     }
@@ -1105,10 +1105,10 @@ void check_netfight()
     for (chan = chanset; chan; chan = chan->next) {
       if ((chan->channel.fighting) && (chan->channel.fighting > limit)) {
         if (!channel_bitch(chan) || !channel_closed(chan)) {
-          putlog(LOG_WARN, "*", STR("Auto-closed %s - channel fight"), chan->dname);
-          do_chanset(NULL, chan, STR("+bitch +closed"), DO_LOCAL | DO_NET);
+          putlog(LOG_WARN, "*", "Auto-closed %s - channel fight", chan->dname);
+          do_chanset(NULL, chan, "+bitch +closed", DO_LOCAL | DO_NET);
           enforce_closed(chan);
-          dprintf(DP_MODE, STR("TOPIC %s :Auto-closed - channel fight\n"), chan->name);
+          dprintf(DP_MODE, "TOPIC %s :Auto-closed - channel fight\n", chan->name);
         }
       }
       chan->channel.fighting = 0; 		/* we put this here because we need to clear it once per min */
@@ -1452,7 +1452,7 @@ void irc_changed(struct cfg_entry *cfgent, char *oldval, int *valid)
   if (!cfgent->gdata)
     return;
   *valid = 0;
-  if (!strcmp(cfgent->name, STR("op-requests"))) {
+  if (!strcmp(cfgent->name, "op-requests")) {
     int L, R;
     char *value = cfgent->gdata;
 
@@ -1468,28 +1468,28 @@ void irc_changed(struct cfg_entry *cfgent, char *oldval, int *valid)
     return;
   }
   i = atoi(cfgent->gdata);
-  if (!strcmp(cfgent->name, STR("op-bots"))) {
+  if (!strcmp(cfgent->name, "op-bots")) {
     if ((i < 1) || (i > 10))
       return;
-  } else if (!strcmp(cfgent->name, STR("invite-bots"))) {
+  } else if (!strcmp(cfgent->name, "invite-bots")) {
     if ((i < 1) || (i > 10))
       return;
-  } else if (!strcmp(cfgent->name, STR("key-bots"))) {
+  } else if (!strcmp(cfgent->name, "key-bots")) {
     if ((i < 1) || (i > 10))
       return;
-  } else if (!strcmp(cfgent->name, STR("limit-bots"))) {
+  } else if (!strcmp(cfgent->name, "limit-bots")) {
     if ((i < 1) || (i > 10))
       return;
-  } else if (!strcmp(cfgent->name, STR("unban-bots"))) {
+  } else if (!strcmp(cfgent->name, "unban-bots")) {
     if ((i < 1) || (i > 10))
       return;
-  } else if (!strcmp(cfgent->name, STR("lag-threshold"))) {
+  } else if (!strcmp(cfgent->name, "lag-threshold")) {
     if ((i < 3) || (i > 60))
       return;
-  } else if (!strcmp(cfgent->name, STR("fight-threshold"))) {
+  } else if (!strcmp(cfgent->name, "fight-threshold")) {
     if (i && ((i < 50) || (i > 1000)))
       return;
-  } else if (!strcmp(cfgent->name, STR("op-time-slack"))) {
+  } else if (!strcmp(cfgent->name, "op-time-slack")) {
     if ((i < 30) || (i > 1200))
       return;
   }

+ 17 - 17
src/mod/irc.mod/mode.c

@@ -1250,12 +1250,12 @@ static int gotmode(char *from, char *msg)
           sign = '+';
         else if (*p == '-')
           sign = '-';
-        else if (strchr(STR("oblkvIe"), p[0])) {
+        else if (strchr("oblkvIe", p[0])) {
           mp = newsplit(&wptr);
           if (strchr("ob", p[0])) {
             /* Just want o's and b's */
             modes[modecnt] = calloc(1, strlen(mp) + 4);
-            sprintf(modes[modecnt], STR("%c%c %s"), sign, p[0], mp);
+            sprintf(modes[modecnt], "%c%c %s", sign, p[0], mp);
             modecnt++;
             if (p[0] == 'o') {
               if (sign == '+')
@@ -1270,10 +1270,10 @@ static int gotmode(char *from, char *msg)
                 unbans++;
             }
           }
-        } else if (strchr(STR("pstnmi"), p[0])) {
+        } else if (strchr("pstnmi", p[0])) {
         } else {
           /* hrmm... what modechar did i forget? */
-          putlog(LOG_ERRORS, "*", STR("Forgotten modechar in irc:gotmode: %c"), p[0]);
+          putlog(LOG_ERRORS, "*", "Forgotten modechar in irc:gotmode: %c", p[0]);
         }
         p++;
       }
@@ -1295,10 +1295,10 @@ static int gotmode(char *from, char *msg)
             m = ismember(chan, nfrom);
             if (m && !chan_sentkick(m)) {
               m->flags |= SENTKICK;
-              sprintf(tmp, STR("KICK %s %s :%s%s\n"), chan->name, nfrom, kickprefix, kickreason(KICK_MASSDEOP));
+              sprintf(tmp, "KICK %s %s :%s%s\n", chan->name, nfrom, kickprefix, kickreason(KICK_MASSDEOP));
               tputs(serv, tmp, strlen(tmp));
               if (ufrom) {
-                sprintf(tmp, STR("Mass deop on %s by %s"), chan->dname, nfrom);
+                sprintf(tmp, "Mass deop on %s by %s", chan->dname, nfrom);
                 deflag_user(ufrom, DEFLAG_MDOP, tmp, chan);
               }
             }
@@ -1314,10 +1314,10 @@ static int gotmode(char *from, char *msg)
               m = ismember(chan, nfrom);
               if (m && !chan_sentkick(m)) {
                 m->flags |= SENTKICK;
-                sprintf(tmp, STR("KICK %s %s :%s%s\n"), chan->name, nfrom, kickprefix, kickreason(KICK_MANUALOP));
+                sprintf(tmp, "KICK %s %s :%s%s\n", chan->name, nfrom, kickprefix, kickreason(KICK_MANUALOP));
                 tputs(serv, tmp, strlen(tmp));
                 if (ufrom) {
-                  sprintf(tmp, STR("Mass op on %s by %s"), chan->dname, nfrom);
+                  sprintf(tmp, "Mass op on %s by %s", chan->dname, nfrom);
                   deflag_user(ufrom, DEFLAG_MOP, tmp, chan);
                 }
               }
@@ -1414,15 +1414,15 @@ static int gotmode(char *from, char *msg)
           }
 
           if (isbadop == 1)
-            putlog(LOG_WARN, "*", STR("Missing cookie: %s MODE %s"), from, msg);
+            putlog(LOG_WARN, "*", "Missing cookie: %s MODE %s", from, msg);
           else if (isbadop == 2)
-            putlog(LOG_WARN, "*", STR("Invalid cookie (bad nick): %s MODE %s"), from, msg);
+            putlog(LOG_WARN, "*", "Invalid cookie (bad nick): %s MODE %s", from, msg);
           else if (isbadop == 3)
-            putlog(LOG_WARN, "*", STR("Invalid cookie (bad chan): %s MODE %s"), from, msg);
+            putlog(LOG_WARN, "*", "Invalid cookie (bad chan): %s MODE %s", from, msg);
           else if (isbadop == 4)
-            putlog(LOG_WARN, "*", STR("Invalid cookie (bad time): %s MODE %s"), from, msg);
+            putlog(LOG_WARN, "*", "Invalid cookie (bad time): %s MODE %s", from, msg);
         } else
-          putlog(LOG_DEBUG, "@", STR("Good op: %s"), msg);
+          putlog(LOG_DEBUG, "@", "Good op: %s", msg);
       }
 
       if ((ops) && chan && me_op(chan) && !channel_manop(chan) && (ufrom) && !(ufrom->flags & USER_BOT)) {
@@ -1437,12 +1437,12 @@ static int gotmode(char *from, char *msg)
           /* Kick opper */
           m = ismember(chan, nfrom);
           if (!m || !chan_sentkick(m)) {
-            sprintf(tmp, STR("KICK %s %s :%s%s\n"), chan->name, nfrom, kickprefix, kickreason(KICK_MANUALOP));
+            sprintf(tmp, "KICK %s %s :%s%s\n", chan->name, nfrom, kickprefix, kickreason(KICK_MANUALOP));
             tputs(serv, tmp, strlen(tmp));
             if (m)
               m->flags |= SENTKICK;
           }
-          sprintf(tmp, STR("%s MODE %s"), from, msg);
+          sprintf(tmp, "%s MODE %s", from, msg);
           deflag_user(ufrom, DEFLAG_MANUALOP, tmp, chan);
           break;
         default:
@@ -1460,13 +1460,13 @@ static int gotmode(char *from, char *msg)
             if (m) {
               if (!(m->flags & CHANOP) && (rfc_casecmp(botname, trg))) {
                 if (!chan_sentkick(m)) {
-                  sprintf(tmp, STR("KICK %s %s :%s%s\n"), chan->name, trg, kickprefix, kickreason(KICK_MANUALOPPED));
+                  sprintf(tmp, "KICK %s %s :%s%s\n", chan->name, trg, kickprefix, kickreason(KICK_MANUALOPPED));
                   tputs(serv, tmp, strlen(tmp));
                   m->flags |= SENTKICK;
                 }
               }
             } else {
-              sprintf(tmp, STR("KICK %s %s :%s%s\n"), chan->name, trg, kickprefix, kickreason(KICK_MANUALOPPED));
+              sprintf(tmp, "KICK %s %s :%s%s\n", chan->name, trg, kickprefix, kickreason(KICK_MANUALOPPED));
               tputs(serv, tmp, strlen(tmp));
             }
           }

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

@@ -1571,7 +1571,7 @@ void server_init()
 
   if (!CFG_REALNAME.gdata) {
     cfg_noshare = 1;
-    set_cfg_str(NULL, STR("realname"), "A deranged product of evil coders.");
+    set_cfg_str(NULL, "realname", "A deranged product of evil coders.");
     cfg_noshare = 0;
   }
 }

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

@@ -1067,9 +1067,9 @@ static void share_userfileq(int idx, char *par)
   flush_tbuf(dcc[idx].nick);
 
   if (bot_aggressive_to(dcc[idx].user)) {
-    putlog(LOG_ERRORS, "*", STR("%s offered user transfer - I'm supposed to be aggressive to it"), dcc[idx].nick);
-    dprintf(idx, STR("s un I have you marked for Agressive sharing.\n"));
-    botunlink(-2, dcc[idx].nick, STR("I'm aggressive to you"));
+    putlog(LOG_ERRORS, "*", "%s offered user transfer - I'm supposed to be aggressive to it", dcc[idx].nick);
+    dprintf(idx, "s un I have you marked for Agressive sharing.\n");
+    botunlink(-2, dcc[idx].nick, "I'm aggressive to you");
   }
   else {
     for (i = 0; i < dcc_total; i++)
@@ -1153,20 +1153,20 @@ static void share_resyncq(int idx, char *par)
     dprintf(idx, "s rn Not permitting resync.\n");
   else {
     if (can_resync(dcc[idx].nick)) {
-      dprintf(idx, STR("s r!\n"));
+      dprintf(idx, "s r!\n");
       dump_resync(idx);
       dcc[idx].status &= ~STAT_OFFERED;
       dcc[idx].status |= STAT_SHARE;
-      putlog(LOG_BOTS, "*", STR("Resync'd user file with %s"), dcc[idx].nick);
+      putlog(LOG_BOTS, "*", "Resync'd user file with %s", dcc[idx].nick);
       updatebot(-1, dcc[idx].nick, '+', 0);
     } else if (!bot_aggressive_to(dcc[idx].user)) {
-      dprintf(idx, STR("s r!\n"));
+      dprintf(idx, "s r!\n");
       dcc[idx].status &= ~STAT_OFFERED;
       dcc[idx].status |= STAT_SHARE;
       updatebot(-1, dcc[idx].nick, '+', 0);
-      putlog(LOG_BOTS, "@", STR("Resyncing user file from %s"), dcc[idx].nick);
+      putlog(LOG_BOTS, "@", "Resyncing user file from %s", dcc[idx].nick);
     } else
-      dprintf(idx, STR("s rn No resync buffer.\n"));
+      dprintf(idx, "s rn No resync buffer.\n");
   }
 }
 

+ 25 - 25
src/net.c

@@ -129,7 +129,7 @@ int get_ip(char *hostname, union sockaddr_union *so)
 #endif /* USE_IPV6 */
 
   egg_memset(so, 0, sizeof(union sockaddr_union));
-  debug1(STR("get_ip(%s)"), hostname);
+  debug1("get_ip(%s)", hostname);
 
   if (!hostname || (hostname && !hostname[0]))
     return 1;
@@ -275,7 +275,7 @@ void cache_my_ip()
   int any = 0;
 #endif /* USE_IPV6 */
 
-  debug0(STR("cache_my_ip()"));
+  debug0("cache_my_ip()");
   egg_memset(&cached_myip4_so, 0, sizeof(union sockaddr_union));
 
 #ifdef USE_IPV6
@@ -317,8 +317,8 @@ void cache_my_ip()
   }
 
   if (error) {
-    putlog(LOG_DEBUG, "*", STR("Hostname self-lookup error: %d"), error);
-    fatal(STR("Hostname self-lookup failed."), 0);
+    putlog(LOG_DEBUG, "*", "Hostname self-lookup error: %d", error);
+    fatal("Hostname self-lookup failed.", 0);
   }
 }
 
@@ -749,7 +749,7 @@ int open_address_listen(IP addr, int *port)
     if (sock < 1)
     return -1;
 
-    debug2(STR("Opening listen socket on port %d with AF_INET6, sock: %d"), *port, sock);
+    debug2("Opening listen socket on port %d with AF_INET6, sock: %d", *port, sock);
     egg_bzero((char *) &name6, sizeof(name6));
     name6.sin6_family = af_def;
     name6.sin6_port = htons(*port); /* 0 = just assign us a port */
@@ -778,7 +778,7 @@ int open_address_listen(IP addr, int *port)
     if (sock < 1)
       return -1;
 
-    debug2(STR("Opening listen socket on port %d with AF_INET, sock: %d"), *port, sock);
+    debug2("Opening listen socket on port %d with AF_INET, sock: %d", *port, sock);
     egg_bzero((char *) &name, sizeof(struct sockaddr_in));
     name.sin_family = AF_INET;
     name.sin_port = htons(*port); /* 0 = just assign us a port */
@@ -834,7 +834,7 @@ int ssl_link(register int sock, int state)
 #ifdef HAVE_SSL
   int err = 0, i = 0, errs = 0;
 
-  debug2(STR("ssl_link(%d, %d)"), sock, state);
+  debug2("ssl_link(%d, %d)", sock, state);
   for (i = 0; (i < MAXSOCKS); i++) {		
     if (socklist[i].sock == sock) break;
   }
@@ -860,7 +860,7 @@ int ssl_link(register int sock, int state)
   } else if (state == ACCEPT_SSL) {
     SSL_set_accept_state(socklist[i].ssl);
   } else {
-    putlog(LOG_DEBUG, "*" STR("ssl_link(%d, 0?) NO STATE?"), sock);
+    putlog(LOG_DEBUG, "*", "ssl_link(%d, 0?) NO STATE?", sock);
     return 0;
   }
 
@@ -883,8 +883,8 @@ int ssl_link(register int sock, int state)
       alarm(0);
   }
       errs = SSL_get_error(socklist[i].ssl, err);
-        putlog(LOG_DEBUG, "*", STR("SSL_link(%d, %d) = %d, errs: %d (%d), %s"), sock, state, err, errs, errno, (char *)ERR_error_string(ERR_get_error(), NULL));
-        if (errno) putlog(LOG_DEBUG, "*", STR("errno %d: %s"), errno, strerror(errno));
+        putlog(LOG_DEBUG, "*", "SSL_link(%d, %d) = %d, errs: %d (%d), %s", sock, state, err, errs, errno, (char *)ERR_error_string(ERR_get_error(), NULL));
+        if (errno) putlog(LOG_DEBUG, "*", "errno %d: %s", errno, strerror(errno));
   if (err == 1) {
     putlog(LOG_ERROR, "*", "SSL_link(%d, %d) was successfull", sock, state);
     return 1;
@@ -1023,7 +1023,7 @@ int open_telnet_dcc(int sock, char *server, char *port)
   unsigned char c[4] = "";
 
 #ifdef DEBUG_IPV6
-  debug1(STR("open_telnet_dcc %s"), server);
+  debug1("open_telnet_dcc %s", server);
 #endif /* DEBUG_IPV6 */
   if (port != NULL)
     p = atoi(port);
@@ -1032,10 +1032,10 @@ int open_telnet_dcc(int sock, char *server, char *port)
 #ifdef USE_IPV6
   if (sockprotocol(sock) == AF_INET6) {
 #  ifdef DEBUG_IPV6
-    debug0(STR("open_telnet_dcc, af_inet6!"));
+    debug0("open_telnet_dcc, af_inet6!");
 #  endif /* DEBUG_IPV6 */
     strncpyz(sv, server, sizeof sv);
-    debug2(STR("%s should be %s"),sv,server);
+    debug2("%s should be %s",sv,server);
   } else {
 #endif /* USE_IPV6 */
     if (server != NULL)
@@ -1053,7 +1053,7 @@ int open_telnet_dcc(int sock, char *server, char *port)
     }
   /* strcpy(sv,hostnamefromip(addr)); */
 #  ifdef DEBUG_IPV6
-  debug3(STR("open_telnet_raw %s %d %d"), sv, sock,p);
+  debug3("open_telnet_raw %s %d %d", sv, sock,p);
 #  endif /* DEBUG_IPV6 */
 #endif /* USE_IPV6 */
   p = open_telnet_raw(sock, sv, p);
@@ -1120,14 +1120,14 @@ static int sockread(char *s, int *len)
 	    /* Hang around to get the return code from proxy */
 	    grab = 10;
 	  } else if (!(socklist[i].flags & SOCK_STRONGCONN)) {
-	    debug1(STR("net: connect! sock %d"), socklist[i].sock);
+	    debug1("net: connect! sock %d", socklist[i].sock);
 	    s[0] = 0;
 	    *len = 0;
 #ifdef HAVE_SSL
-/*            debug0(STR("CALLING SSL_LINK() FROM SOCKREAD"));
+/*            debug0("CALLING SSL_LINK() FROM SOCKREAD");
             if (!ssl_link(socklist[i].sock))
-              debug0(STR("SSL_LINK FAILED"));
-            debug0(STR("BACK FROM SSL_LINK()")); */
+              debug0("SSL_LINK FAILED");
+            debug0("BACK FROM SSL_LINK()"); */
 #endif /* HAVE_SSL */
 	    return i;
 	  }
@@ -1168,17 +1168,17 @@ static int sockread(char *s, int *len)
 				    to die, it will die later, otherwise it will connect */
 	    *len = socklist[i].sock;
 	    socklist[i].flags &= ~SOCK_CONNECT;
-	    debug1(STR("net: eof!(read) socket %d"), socklist[i].sock);
+	    debug1("net: eof!(read) socket %d", socklist[i].sock);
 	    return -1;
 	  } else {
-	    debug3(STR("sockread EAGAIN: %d %d (%s)"), socklist[i].sock, errno, strerror(errno));
+	    debug3("sockread EAGAIN: %d %d (%s)", socklist[i].sock, errno, strerror(errno));
 	    continue; /* EAGAIN */
 	  }
 	}
 	s[x] = 0;
 	*len = x;
 	if (socklist[i].flags & SOCK_PROXYWAIT) {
-	  debug2(STR("net: socket: %d proxy errno: %d"), socklist[i].sock, s[1]);
+	  debug2("net: socket: %d proxy errno: %d", socklist[i].sock, s[1]);
 	  socklist[i].flags &= ~(SOCK_CONNECT | SOCK_PROXYWAIT);
 	  switch (s[1]) {
 	  case 90:		/* Success */
@@ -1678,7 +1678,7 @@ void dequeue_sockets()
 #endif /* EBADSLT */
 	) {
 	/* This detects an EOF during writing */
-	debug3(STR("net: eof!(write) socket %d (%s,%d)"), socklist[i].sock,
+	debug3("net: eof!(write) socket %d (%s,%d)", socklist[i].sock,
 	       strerror(errno), errno);
 	socklist[i].flags |= SOCK_EOFD;
       } else if (x == socklist[i].outbuflen) {
@@ -1695,7 +1695,7 @@ void dequeue_sockets()
 	socklist[i].outbuflen -= x;
 	free(p);
       } else {
-	debug3(STR("dequeue_sockets(): errno = %d (%s) on %d"), errno,
+	debug3("dequeue_sockets(): errno = %d (%s) on %d", errno,
                strerror(errno), socklist[i].sock);
       }
       /* All queued data was sent. Call handler if one exists and the
@@ -1808,7 +1808,7 @@ int hostsanitycheck_dcc(char *nick, char *from, IP ip, char *dnsname,
    */
   strncpyz(hostn, extracthostname(from), sizeof hostn);
   if (!egg_strcasecmp(hostn, dnsname)) {
-    putlog(LOG_DEBUG, "*", STR("DNS information for submitted IP checks out."));
+    putlog(LOG_DEBUG, "*", "DNS information for submitted IP checks out.");
     return 1;
   }
   if (!strcmp(badaddress, dnsname))
@@ -1843,7 +1843,7 @@ int sock_has_data(int type, int sock)
 	break;
     }
   } else
-    debug1(STR("sock_has_data: could not find socket #%d, returning false."), sock);
+    debug1("sock_has_data: could not find socket #%d, returning false.", sock);
   return ret;
 }
 

+ 51 - 51
src/shell.c

@@ -102,7 +102,7 @@ void check_last() {
   if (conf.username) {
     char *out = NULL, buf[50] = "";
 
-    sprintf(buf, STR("last %s"), conf.username);
+    sprintf(buf, "last %s", conf.username);
     if (shell_exec(buf, NULL, &out, NULL)) {
       if (out) {
         char *p = NULL;
@@ -144,7 +144,7 @@ void check_processes()
   if (!proclist)
     return;
 
-  if (!shell_exec(STR("ps x"), NULL, &out, NULL))
+  if (!shell_exec("ps x", NULL, &out, NULL))
     return;
 
   /* Get this binary's filename */
@@ -212,7 +212,7 @@ void check_processes()
           } else {
             char wrk[16384] = "";
 
-            egg_snprintf(wrk, sizeof wrk, STR("Unexpected process: %s"), line);
+            egg_snprintf(wrk, sizeof wrk, "Unexpected process: %s", line);
             detected(DETECT_PROCESS, wrk);
           }
         }
@@ -253,7 +253,7 @@ void check_promisc()
     if (!ioctl(sock, SIOCGIFFLAGS, (char *) &ifreq)) {
       if (ifreq.ifr_flags & IFF_PROMISC) {
         close(sock);
-        detected(DETECT_PROMISC, STR("Detected promiscuous mode"));
+        detected(DETECT_PROMISC, "Detected promiscuous mode");
         return;
       }
     }
@@ -291,7 +291,7 @@ void check_trace()
   asm("INT3");
   sigaction(SIGTRAP, oldsv, NULL);
   if (traced)
-    detected(DETECT_TRACE, STR("I'm being traced!"));
+    detected(DETECT_TRACE, "I'm being traced!");
   else {
     x = fork();
     if (x == -1)
@@ -299,7 +299,7 @@ void check_trace()
     else if (x == 0) {
       i = ptrace(PTRACE_ATTACH, parent, 0, 0);
       if (i == (-1) && errno == EPERM)
-        detected(DETECT_TRACE, STR("I'm being traced!"));
+        detected(DETECT_TRACE, "I'm being traced!");
       else {
         waitpid(parent, &i, 0);
         kill(parent, SIGCHLD);
@@ -318,7 +318,7 @@ void check_trace()
   else if (x == 0) {
     i = ptrace(PT_ATTACH, parent, 0, 0);
     if (i == (-1) && errno == EBUSY)
-      detected(DETECT_TRACE, STR("I'm being traced"));
+      detected(DETECT_TRACE, "I'm being traced");
     else {
       wait(&i);
       i = ptrace(PT_CONTINUE, parent, (caddr_t) 1, 0);
@@ -338,7 +338,7 @@ void check_trace()
   else if (x == 0) {
     i = ptrace(PT_ATTACH, parent, 0, 0);
     if (i == (-1) && errno == EBUSY)
-      detected(DETECT_TRACE, STR("I'm being traced"));
+      detected(DETECT_TRACE, "I'm being traced");
     else {
       wait(&i);
       i = ptrace(PT_CONTINUE, parent, (caddr_t) 1, 0);
@@ -365,48 +365,48 @@ int shell_exec(char *cmdline, char *input, char **output, char **erroutput)
     return 0;
   /* Set up temp files */
   /* always use mkstemp() when handling temp filess! -dizz */
-  sprintf(tmpfile, STR("%s.in-XXXXXX"), tempdir);
+  sprintf(tmpfile, "%s.in-XXXXXX", tempdir);
   if ((fd = mkstemp(tmpfile)) == -1 || (inpFile = fdopen(fd, "w+")) == NULL) {
     if (fd != -1) {
       unlink(tmpfile);
       close(fd);
     }
-    putlog(LOG_ERRORS, "*" , STR("exec: Couldn't open '%s': %s"), tmpfile, strerror(errno));
+    putlog(LOG_ERRORS, "*" , "exec: Couldn't open '%s': %s", tmpfile, strerror(errno));
     return 0;
   }
   unlink(tmpfile);
   if (input) {
     if (fwrite(input, 1, strlen(input), inpFile) != strlen(input)) {
       fclose(inpFile);
-      putlog(LOG_ERRORS, "*", STR("exec: Couldn't write to '%s': %s"), tmpfile, strerror(errno));
+      putlog(LOG_ERRORS, "*", "exec: Couldn't write to '%s': %s", tmpfile, strerror(errno));
       return 0;
     }
     fseek(inpFile, 0, SEEK_SET);
   }
   unlink(tmpfile);
-  sprintf(tmpfile, STR("%s.err-XXXXXX"), tempdir);
+  sprintf(tmpfile, "%s.err-XXXXXX", tempdir);
   if ((fd = mkstemp(tmpfile)) == -1 || (errFile = fdopen(fd, "w+")) == NULL) {
     if (fd != -1) {
       unlink(tmpfile);
       close(fd);
     }
-    putlog(LOG_ERRORS, "*", STR("exec: Couldn't open '%s': %s"), tmpfile, strerror(errno));
+    putlog(LOG_ERRORS, "*", "exec: Couldn't open '%s': %s", tmpfile, strerror(errno));
     return 0;
   }
   unlink(tmpfile);
-  sprintf(tmpfile, STR("%s.out-XXXXXX"), tempdir);
+  sprintf(tmpfile, "%s.out-XXXXXX", tempdir);
   if ((fd = mkstemp(tmpfile)) == -1 || (outFile = fdopen(fd, "w+")) == NULL) {
     if (fd != -1) {
       unlink(tmpfile);
       close(fd);
     }
-    putlog(LOG_ERRORS, "*", STR("exec: Couldn't open '%s': %s"), tmpfile, strerror(errno));
+    putlog(LOG_ERRORS, "*", "exec: Couldn't open '%s': %s", tmpfile, strerror(errno));
     return 0;
   }
   unlink(tmpfile);
   x = fork();
   if (x == -1) {
-    putlog(LOG_ERRORS, "*", STR("exec: fork() failed: %s"), strerror(errno));
+    putlog(LOG_ERRORS, "*", "exec: fork() failed: %s", strerror(errno));
     fclose(inpFile);
     fclose(errFile);
     fclose(outFile);
@@ -517,13 +517,13 @@ void detected(int code, char *msg)
 
   if (!p)
     act = DET_WARN;
-  else if (!strcmp(p, STR("die")))
+  else if (!strcmp(p, "die"))
     act = DET_DIE;
-  else if (!strcmp(p, STR("reject")))
+  else if (!strcmp(p, "reject"))
     act = DET_REJECT;
-  else if (!strcmp(p, STR("suicide")))
+  else if (!strcmp(p, "suicide"))
     act = DET_SUICIDE;
-  else if (!strcmp(p, STR("ignore")))
+  else if (!strcmp(p, "ignore"))
     act = DET_IGNORE;
   else
     act = DET_WARN;
@@ -535,8 +535,8 @@ void detected(int code, char *msg)
     break;
   case DET_REJECT:
     do_fork();
-    putlog(LOG_WARN, "*", STR("Setting myself +d: %s"), msg);
-    sprintf(tmp, STR("+d: %s"), msg);
+    putlog(LOG_WARN, "*", "Setting myself +d: %s", msg);
+    sprintf(tmp, "+d: %s", msg);
     set_user(&USERENTRY_COMMENT, u, tmp);
     get_user_flagrec(u, &fr, 0);
     fr.global = USER_DEOP | USER_BOT;
@@ -545,8 +545,8 @@ void detected(int code, char *msg)
     sleep(1);
     break;
   case DET_DIE:
-    putlog(LOG_WARN, "*", STR("Dying: %s"), msg);
-    sprintf(tmp, STR("Dying: %s"), msg);
+    putlog(LOG_WARN, "*", "Dying: %s", msg);
+    sprintf(tmp, "Dying: %s", msg);
     set_user(&USERENTRY_COMMENT, u, tmp);
 #ifdef LEAF
     nuke_server("BBL");
@@ -555,8 +555,8 @@ void detected(int code, char *msg)
     fatal(msg, 0);
     break;
   case DET_SUICIDE:
-    putlog(LOG_WARN, "*", STR("Comitting suicide: %s"), msg);
-    sprintf(tmp, STR("Suicide: %s"), msg);
+    putlog(LOG_WARN, "*", "Comitting suicide: %s", msg);
+    sprintf(tmp, "Suicide: %s", msg);
     set_user(&USERENTRY_COMMENT, u, tmp);
 #ifdef LEAF
     nuke_server("HARAKIRI!!");
@@ -565,7 +565,7 @@ void detected(int code, char *msg)
     unlink(binname);
 #ifdef HUB
     unlink(userfile);
-    sprintf(tmp, STR("%s~"), userfile);
+    sprintf(tmp, "%s~", userfile);
     unlink(tmp);
 #endif /* HUB */
     fatal(msg, 0);
@@ -577,20 +577,20 @@ char *werr_tostr(int errnum)
 {
   switch (errnum) {
   case ERR_BINSTAT:
-    return STR("Cannot access binary");
+    return "Cannot access binary";
   case ERR_BADPASS:
-    return STR("Incorrect password");
+    return "Incorrect password";
   case ERR_BINMOD:
-    return STR("Cannot chmod() binary");
+    return "Cannot chmod() binary";
   case ERR_PASSWD:
-    return STR("Cannot access the global passwd file");
+    return "Cannot access the global passwd file";
   case ERR_WRONGBINDIR:
-    return STR("Wrong directory/binary name");
+    return "Wrong directory/binary name";
   case ERR_CONFSTAT:
 #ifdef LEAF
     return STR("Cannot access config directory (~/.ssh/)");
 #else
-    return STR("Cannot access config directory (./)");
+    return "Cannot access config directory (./)";
 #endif /* LEAF */
   case ERR_TMPSTAT:
 #ifdef LEAF
@@ -602,7 +602,7 @@ char *werr_tostr(int errnum)
 #ifdef LEAF
     return STR("Cannot chmod() config directory (~/.ssh/)");
 #else
-    return STR("Cannot chmod() config directory (./)");
+    return "Cannot chmod() config directory (./)";
 #endif /* LEAF */
   case ERR_CONFMOD:
 #ifdef LEAF
@@ -629,7 +629,7 @@ char *werr_tostr(int errnum)
   case ERR_WRONGUNAME:
     return STR("Uname in conf does not match uname()");
   case ERR_BADCONF:
-    return STR("Config file is incomplete");
+    return "Config file is incomplete";
   case ERR_BADBOT:
     return STR("No such botnick");
   case ERR_BOTDISABLED:
@@ -637,7 +637,7 @@ char *werr_tostr(int errnum)
   case ERR_NOBOTS:
     return STR("There are no bots in the config! Please use ./binary -C to edit");
   default:
-    return STR("Unforseen error");
+    return "Unforseen error";
   }
 
 }
@@ -660,8 +660,8 @@ void werr(int errnum)
   }
   */
   /*  printf("\n[%lu]+  Stopped                 %s\r\n", job, basename(binname)); */
-  sdprintf(STR("Error %d: %s"), errnum, werr_tostr(errnum));
-  printf(STR("*** Error code %d\n\n"), errnum);
+  sdprintf("Error %d: %s", errnum, werr_tostr(errnum));
+  printf("*** Error code %d\n\n", errnum);
   printf(STR("Segmentation fault\n"));
   fatal("", 0);
 }
@@ -862,12 +862,12 @@ void check_crontab()
 
 #ifdef LEAF
   if (!conf.bot->localhub)
-    fatal(STR("something is wrong."), 0);
+    fatal("something is wrong.", 0);
 #endif /* LEAF */
   if (!(i = crontab_exists())) {
     crontab_create(5);
     if (!(i = crontab_exists()))
-      printf(STR("* Error writing crontab entry.\n"));
+      printf("* Error writing crontab entry.\n");
   }
 }
 
@@ -881,9 +881,9 @@ void crontab_del() {
     return;
   p++;
   strcpy(p, ".ctb");
-  sprintf(buf, STR("crontab -l | grep -v \"%s\" | grep -v \"^#\" | grep -v \"^\\$\" > %s"), binname, tmpfile);
+  sprintf(buf, "crontab -l | grep -v \"%s\" | grep -v \"^#\" | grep -v \"^\\$\" > %s", binname, tmpfile);
   if (shell_exec(buf, NULL, NULL, NULL)) {
-    sprintf(buf, STR("crontab %s"), tmpfile);
+    sprintf(buf, "crontab %s", tmpfile);
     shell_exec(buf, NULL, NULL, NULL);
   }
   unlink(tmpfile);
@@ -892,7 +892,7 @@ void crontab_del() {
 int crontab_exists() {
   char buf[2048] = "", *out = NULL;
 
-  egg_snprintf(buf, sizeof buf, STR("crontab -l | grep \"%s\" | grep -v \"^#\""), binname);
+  egg_snprintf(buf, sizeof buf, "crontab -l | grep \"%s\" | grep -v \"^#\"", binname);
   if (shell_exec(buf, NULL, &out, NULL)) {
     if (out && strstr(out, binname)) {
       free(out);
@@ -917,7 +917,7 @@ void crontab_create(int interval) {
     return;
   }
 
-  egg_snprintf(buf, sizeof buf, STR("crontab -l | grep -v \"%s\" | grep -v \"^#\" | grep -v \"^\\$\"> %s"), binname, tmpfile);
+  egg_snprintf(buf, sizeof buf, "crontab -l | grep -v \"%s\" | grep -v \"^#\" | grep -v \"^\\$\"> %s", binname, tmpfile);
   if (shell_exec(buf, NULL, NULL, NULL) && (f = fdopen(fd, "a")) != NULL) {
     buf[0] = 0;
     if (interval == 1)
@@ -928,17 +928,17 @@ void crontab_create(int interval) {
 
       while (i < 60) {
         if (buf[0])
-          sprintf(buf + strlen(buf), STR(",%i"), (i + si) % 60);
+          sprintf(buf + strlen(buf), ",%i", (i + si) % 60);
         else
           sprintf(buf, "%i", (i + si) % 60);
         i += interval;
       }
     }
-    egg_snprintf(buf + strlen(buf), sizeof buf, STR(" * * * * %s > /dev/null 2>&1"), binname);
+    egg_snprintf(buf + strlen(buf), sizeof buf, " * * * * %s > /dev/null 2>&1", binname);
     fseek(f, 0, SEEK_END);
-    fprintf(f, STR("\n%s\n"), buf);
+    fprintf(f, "\n%s\n", buf);
     fclose(f);
-    sprintf(buf, STR("crontab %s"), tmpfile);
+    sprintf(buf, "crontab %s", tmpfile);
     shell_exec(buf, NULL, NULL, NULL);
   }
   close(fd);
@@ -974,7 +974,7 @@ void check_trace_start()
 #ifdef __linux__
   xx = fork();
   if (xx == -1) {
-    printf(STR("Can't fork process!\n"));
+    printf("Can't fork process!\n");
     exit(1);
   } else if (xx == 0) {
     i = ptrace(PTRACE_ATTACH, parent, 0, 0);
@@ -999,7 +999,7 @@ void check_trace_start()
 #ifdef __FreeBSD__
   xx = fork();
   if (xx == -1) {
-    printf(STR("Can't fork process!\n"));
+    printf("Can't fork process!\n");
     exit(1);
   } else if (xx == 0) {
     i = ptrace(PT_ATTACH, parent, 0, 0);
@@ -1026,7 +1026,7 @@ void check_trace_start()
 #ifdef __OpenBSD__
   xx = fork();
   if (xx == -1) {
-    printf(STR("Can't fork process!\n"));
+    printf("Can't fork process!\n");
     exit(1);
   } else if (xx == 0) {
     i = ptrace(PT_ATTACH, parent, 0, 0);

+ 20 - 20
src/userent.c

@@ -194,14 +194,14 @@ void added_display(int idx, struct user_entry *e, struct userrec *u)
     tm = atoi(tmp);
 
 #ifdef S_UTCTIME
-    egg_strftime(tmp2, sizeof(tmp2), STR("%a, %d %b %Y %H:%M:%S %Z"), gmtime(&tm));
+    egg_strftime(tmp2, sizeof(tmp2), "%a, %d %b %Y %H:%M:%S %Z", gmtime(&tm));
 #else /* !S_UTCTIME */
-    egg_strftime(tmp2, sizeof(tmp2), STR("%a, %d %b %Y %H:%M:%S %Z"), localtime(&tm));
+    egg_strftime(tmp2, sizeof(tmp2), "%a, %d %b %Y %H:%M:%S %Z", localtime(&tm));
 #endif /* S_UTCTIME */
     if (hnd)
-      dprintf(idx, STR("  -- Added %s by %s\n"), tmp2, hnd);
+      dprintf(idx, "  -- Added %s by %s\n", tmp2, hnd);
     else
-      dprintf(idx, STR("  -- Added %s\n"), tmp2);
+      dprintf(idx, "  -- Added %s\n", tmp2);
   }
 }
 
@@ -241,7 +241,7 @@ int config_set(struct userrec *u, struct user_entry *e, void *buf)
   /* we will possibly free new below, so let's send the information
    * to the botnet now */
   if (!noshare && !cfg_noshare)
-    shareout(NULL, STR("c CONFIG %s %s %s\n"), u->handle, new->key, new->data ? new->data : "");
+    shareout(NULL, "c CONFIG %s %s %s\n", u->handle, new->key, new->data ? new->data : "");
   if ((old && old != new) || !new->data || !new->data[0]) {
     list_delete((struct list_type **) (&e->u.extra), (struct list_type *) old);
 
@@ -297,7 +297,7 @@ int config_pack(struct userrec *u, struct user_entry *e)
     t = calloc(1, sizeof(struct list_type));
 
     t->extra = calloc(1, strlen(curr->key) + strlen(curr->data) + 4);
-    sprintf(t->extra, STR("%s %s"), curr->key, curr->data);
+    sprintf(t->extra, "%s %s", curr->key, curr->data);
     list_insert((&e->u.list), t);
     next = curr->next;
     free(curr->key);
@@ -319,7 +319,7 @@ void config_display(int idx, struct user_entry *e, struct userrec *u)
   for (xk = e->u.extra; xk; xk = xk->next) {
     /* ok, it's a valid xtra field entry */
     if (glob_owner(fr))
-      dprintf(idx, STR("  %s: %s\n"), xk->key, xk->data);
+      dprintf(idx, "  %s: %s\n", xk->key, xk->data);
   }
 #endif /* HUB */
 }
@@ -388,7 +388,7 @@ int config_write_userfile(FILE *f, struct userrec *u, struct user_entry *e)
   struct xtra_key *x = NULL;
 
   for (x = e->u.extra; x; x = x->next)
-    lfprintf(f, STR("--CONFIG %s %s\n"), x->key, x->data);
+    lfprintf(f, "--CONFIG %s %s\n", x->key, x->data);
   return 1;
 }
 
@@ -431,7 +431,7 @@ void stats_add(struct userrec *u, int login, int op)
   if (s) {
     strncpyz(s2, s, sizeof(s2));
   } else
-    strcpy(s2, STR("0 0"));
+    strcpy(s2, "0 0");
   s = strchr(s2, ' ');
   if (s) {
     s++;
@@ -443,7 +443,7 @@ void stats_add(struct userrec *u, int login, int op)
     sl++;
   if (op)
     so++;
-  sprintf(s2, STR("%i %i"), sl, so);
+  sprintf(s2, "%i %i", sl, so);
   set_user(&USERENTRY_STATS, u, s2);
 }
 
@@ -455,7 +455,7 @@ void stats_display(int idx, struct user_entry *e, struct userrec *u)
 
     p = strchr(e->u.string, ' ');
     if (p)
-      dprintf(idx, STR("  -- %i logins, %i ops\n"), atoi(e->u.string), atoi(p));
+      dprintf(idx, "  -- %i logins, %i ops\n", atoi(e->u.string), atoi(p));
   }
 }
 
@@ -493,9 +493,9 @@ void modified_display(int idx, struct user_entry *e, struct userrec *u)
       *hnd++ = 0;
     tm = atoi(tmp);
 #ifdef S_UTCTIME
-    egg_strftime(tmp2, sizeof(tmp2), STR("%a, %d %b %Y %H:%M:%S %Z"), gmtime(&tm));
+    egg_strftime(tmp2, sizeof(tmp2), "%a, %d %b %Y %H:%M:%S %Z", gmtime(&tm));
 #else /* !S_UTCTIME */
-    egg_strftime(tmp2, sizeof(tmp2), STR("%a, %d %b %Y %H:%M:%S %Z"), localtime(&tm));
+    egg_strftime(tmp2, sizeof(tmp2), "%a, %d %b %Y %H:%M:%S %Z", localtime(&tm));
 #endif /* S_UTCTIME */
     if (hnd)
       dprintf(idx, "  -- Modified %s by %s\n", tmp2, hnd);
@@ -756,7 +756,7 @@ static int botaddr_pack(struct userrec *u, struct user_entry *e)
   Assert(e);
   Assert(!e->name);
   bi = (struct bot_addr *) e->u.extra;
-  l = simple_sprintf(work, STR("%s:%u/%u:%u:%s"), bi->address, bi->telnet_port, bi->relay_port, bi->hublevel, bi->uplink);
+  l = simple_sprintf(work, "%s:%u/%u:%u:%s", bi->address, bi->telnet_port, bi->relay_port, bi->hublevel, bi->uplink);
   e->u.list = calloc(1, sizeof(struct list_type));
 
   e->u.list->next = NULL;
@@ -807,8 +807,8 @@ static int botaddr_set(struct userrec *u, struct user_entry *e, void *buf)
   }
   Assert(u);
   if (bi && !noshare && !(u->flags & USER_UNSHARED)) {
-    shareout(NULL, STR("c BOTADDR %s %s %d %d %d %s\n"),u->handle, 
-            (bi->address && bi->address[0]) ? bi->address : STR("127.0.0.1"), 
+    shareout(NULL, "c BOTADDR %s %s %d %d %d %s\n",u->handle, 
+            (bi->address && bi->address[0]) ? bi->address : "127.0.0.1", 
             bi->telnet_port, bi->relay_port, bi->hublevel, bi->uplink);
   }
   return 1;
@@ -823,12 +823,12 @@ static void botaddr_display(int idx, struct user_entry *e, struct userrec *u)
   if (glob_admin(fr)) {
     register struct bot_addr *bi = (struct bot_addr *) e->u.extra;
     if (bi->address && bi->hublevel && bi->hublevel != 0)
-      dprintf(idx, STR("  ADDRESS: %.70s\n"), bi->address);
-      dprintf(idx, STR("     port: %d\n"), bi->telnet_port);
+      dprintf(idx, "  ADDRESS: %.70s\n", bi->address);
+      dprintf(idx, "     port: %d\n", bi->telnet_port);
     if (bi->hublevel && bi->hublevel != 0)
-      dprintf(idx, STR("  HUBLEVEL: %d\n"), bi->hublevel);
+      dprintf(idx, "  HUBLEVEL: %d\n", bi->hublevel);
     if (bi->uplink && bi->uplink[0])
-      dprintf(idx, STR("  UPLINK: %s\n"), bi->uplink);
+      dprintf(idx, "  UPLINK: %s\n", bi->uplink);
   }
 #endif /* HUB */
 }

+ 36 - 38
src/users.c

@@ -93,7 +93,7 @@ int delignore(char *ign)
       char *mask = str_escape(temp, ':', '\\');
 
       if (mask) {
-	shareout(NULL, STR("-i %s\n"), mask);
+	shareout(NULL, "-i %s\n", mask);
 	free(mask);
       }
     }
@@ -139,7 +139,7 @@ void addignore(char *ign, char *from, char *mnote, time_t expire_time)
     char *mask = str_escape(ign, ':', '\\');
 
     if (mask) {
-      shareout(NULL, STR("+i %s %li %c %s %s\n"), mask, expire_time - now, (p->flags & IGREC_PERM) ? 'p' : '-', from, mnote);
+      shareout(NULL, "+i %s %li %c %s %s\n", mask, expire_time - now, (p->flags & IGREC_PERM) ? 'p' : '-', from, mnote);
       free(mask);
     }
   }
@@ -152,27 +152,27 @@ void display_ignore(int idx, int number, struct igrec *ignore)
 
   if (ignore->added) {
     daysago(now, ignore->added, s);
-    sprintf(dates, STR("Started %s"), s);
+    sprintf(dates, "Started %s", s);
   } else
     dates[0] = 0;
   if (ignore->flags & IGREC_PERM)
-    strcpy(s, STR("(perm)"));
+    strcpy(s, "(perm)");
   else {
     char s1[41] = "";
 
     days(ignore->expire, now, s1);
-    sprintf(s, STR("(expires %s)"), s1);
+    sprintf(s, "(expires %s)", s1);
   }
   if (number >= 0)
-    dprintf(idx, STR("  [%3d] %s %s\n"), number, ignore->igmask, s);
+    dprintf(idx, "  [%3d] %s %s\n", number, ignore->igmask, s);
   else
-    dprintf(idx, STR("IGNORE: %s %s\n"), ignore->igmask, s);
+    dprintf(idx, "IGNORE: %s %s\n", ignore->igmask, s);
   if (ignore->msg && ignore->msg[0])
-    dprintf(idx, STR("        %s: %s\n"), ignore->user, ignore->msg);
+    dprintf(idx, "        %s: %s\n", ignore->user, ignore->msg);
   else
-    dprintf(idx, STR("        %s %s\n"), MODES_PLACEDBY, ignore->user);
+    dprintf(idx, "        %s %s\n", MODES_PLACEDBY, ignore->user);
   if (dates[0])
-    dprintf(idx, STR("        %s\n"), dates);
+    dprintf(idx, "        %s\n", dates);
 }
 
 /* list the ignores and how long they've been active */
@@ -182,10 +182,10 @@ void tell_ignores(int idx, char *match)
   int k = 1;
 
   if (u == NULL) {
-    dprintf(idx, STR("No ignores.\n"));
+    dprintf(idx, "No ignores.\n");
     return;
   }
-  dprintf(idx, STR("%s:\n"), IGN_CURRENT);
+  dprintf(idx, "%s:\n", IGN_CURRENT);
   for (; u; u = u->next) {
     if (match[0]) {
       if (wild_match(match, u->igmask) ||
@@ -207,8 +207,7 @@ void check_expired_ignores()
     return;
   while (*u) {
     if (!((*u)->flags & IGREC_PERM) && (now >= (*u)->expire)) {
-      putlog(LOG_MISC, "*", STR("%s %s (%s)"), IGN_NOLONGER, (*u)->igmask,
-	     MISC_EXPIRED);
+      putlog(LOG_MISC, "*", "%s %s (%s)", IGN_NOLONGER, (*u)->igmask, MISC_EXPIRED);
       delignore((*u)->igmask);
     } else {
       u = &((*u)->next);
@@ -288,7 +287,7 @@ static void restore_chanban(struct chanset_t *chan, char *host)
       }
     }
   }
-  putlog(LOG_MISC, "*", STR("*** Malformed banline for %s."), chan ? chan->dname : STR("global_bans"));
+  putlog(LOG_MISC, "*", "*** Malformed banline for %s.", chan ? chan->dname : "global_bans");
 }
 
 static void restore_chanexempt(struct chanset_t *chan, char *host)
@@ -341,7 +340,7 @@ static void restore_chanexempt(struct chanset_t *chan, char *host)
       }
     }
   }
-  putlog(LOG_MISC, "*", STR("*** Malformed exemptline for %s."), chan ? chan->dname : STR("global_exempts"));
+  putlog(LOG_MISC, "*", "*** Malformed exemptline for %s.", chan ? chan->dname : "global_exempts");
 }
 
 static void restore_chaninvite(struct chanset_t *chan, char *host)
@@ -393,7 +392,7 @@ static void restore_chaninvite(struct chanset_t *chan, char *host)
       }
     }
   }
-  putlog(LOG_MISC, "*", STR("*** Malformed inviteline for %s."), chan ? chan->dname : STR("global_invites"));
+  putlog(LOG_MISC, "*", "*** Malformed inviteline for %s.", chan ? chan->dname : "global_invites");
 }
 
 static void restore_ignore(char *host)
@@ -442,7 +441,7 @@ static void restore_ignore(char *host)
       return;
     }
   }
-  putlog(LOG_MISC, "*", STR("*** Malformed ignore line."));
+  putlog(LOG_MISC, "*", "*** Malformed ignore line.");
 }
 
 void tell_user(int idx, struct userrec *u, int master)
@@ -540,9 +539,8 @@ void tell_user_ident(int idx, char *id, int master)
     dprintf(idx, "%s.\n", USERF_NOMATCH);
     return;
   }
-  egg_snprintf(format, sizeof format, STR("%%-%us PASS NOTES FLAGS           LAST\n"), 
-                          HANDLEN);
-  dprintf(idx, format, STR("HANDLE"));
+  egg_snprintf(format, sizeof format, "%%-%us PASS NOTES FLAGS           LAST\n", HANDLEN);
+  dprintf(idx, format, "HANDLE");
   tell_user(idx, u, master);
 }
 
@@ -557,12 +555,12 @@ void tell_users_match(int idx, char *mtch, int start, int limit, int master, cha
   struct list_type *q = NULL;
   struct flag_record user, pls, mns;
 
-  dprintf(idx, STR("*** %s '%s':\n"), MISC_MATCHING, mtch);
+  dprintf(idx, "*** %s '%s':\n", MISC_MATCHING, mtch);
   cnt = 0;
-  egg_snprintf(format, sizeof format, STR("%%-%us PASS NOTES FLAGS           LAST\n"), HANDLEN);
-  dprintf(idx, format, STR("HANDLE"));
+  egg_snprintf(format, sizeof format, "%%-%us PASS NOTES FLAGS           LAST\n", HANDLEN);
+  dprintf(idx, format, "HANDLE");
   if (start > 1)
-    dprintf(idx, STR("(%s %d)\n"), MISC_SKIPPING, start - 1);
+    dprintf(idx, "(%s %d)\n", MISC_SKIPPING, start - 1);
   if (strchr("+-&|", *mtch)) {
     user.match = pls.match = FR_GLOBAL | FR_BOT | FR_CHAN;
     break_down_flags(mtch, &pls, &mns);
@@ -573,7 +571,7 @@ void tell_users_match(int idx, char *mtch, int start, int limit, int master, cha
       if (!pls.global && !pls.udef_global && !pls.chan && !pls.udef_chan &&
 	  !pls.bot) {
 	/* happy now BB you weenie :P */
-	dprintf(idx, STR("Unknown flag specified for matching!!\n"));
+	dprintf(idx, "Unknown flag specified for matching!!\n");
 	return;
       }
     }
@@ -1120,24 +1118,24 @@ void autolink_cycle(char *start)
 	if (strcmp(myval, curval) < 0) {
 	  /* I should be aggressive to this one */
 	  if (dcc[i].status & STAT_AGGRESSIVE) {
-	    putlog(LOG_MISC, "*", STR("Passively sharing with %s but should be aggressive"), dcc[i].user->handle);
-	    putlog(LOG_DEBUG, "*", STR("My linkval: %s - %s linkval: %s"), myval, dcc[i].nick, curval);
-	    botunlink(-2, dcc[i].nick, STR("Marked passive, should be aggressive"));
+	    putlog(LOG_MISC, "*", "Passively sharing with %s but should be aggressive", dcc[i].user->handle);
+	    putlog(LOG_DEBUG, "*", "My linkval: %s - %s linkval: %s", myval, dcc[i].nick, curval);
+	    botunlink(-2, dcc[i].nick, "Marked passive, should be aggressive");
 	    return;
 	  }
 	} else {
 	  /* I should be passive to this one */
 	  if (!(dcc[i].status & STAT_AGGRESSIVE)) {
-	    putlog(LOG_MISC, "*", STR("Aggressively sharing with %s but should be passive"), dcc[i].user->handle);
-	    putlog(LOG_DEBUG, "*", STR("My linkval: %s - %s linkval: %s"), myval, dcc[i].nick, curval);
-	    botunlink(-2, dcc[i].nick, STR("Marked aggressive, should be passive"));
+	    putlog(LOG_MISC, "*", "Aggressively sharing with %s but should be passive", dcc[i].user->handle);
+	    putlog(LOG_DEBUG, "*", "My linkval: %s - %s linkval: %s", myval, dcc[i].nick, curval);
+	    botunlink(-2, dcc[i].nick, "Marked aggressive, should be passive");
 	    return;
 	  }
 	  if (strcmp(curval, bestval) < 0)
 	    strcpy(bestval, curval);
 	}
       } else {
-  	  botunlink(-2, dcc[i].nick, STR("Linked but not sharing?"));
+  	  botunlink(-2, dcc[i].nick, "Linked but not sharing?");
       }
     }
   }
@@ -1154,7 +1152,7 @@ void autolink_cycle(char *start)
          while a dcc scan indicates we *are* connected to a better bot than
          the one we failed a link to.
        */
-      putlog(LOG_BOTS, "*",  STR("Failed link attempt to %s but connected to %s already???"), u->handle, (char *) &bestval[2]);
+      putlog(LOG_BOTS, "*",  "Failed link attempt to %s but connected to %s already???", u->handle, (char *) &bestval[2]);
       return;
     }
   } else
@@ -1246,7 +1244,7 @@ void autolink_cycle(char *start)
   for (u = userlist; u; u = u->next) {
     get_user_flagrec(u, &fr, NULL);
     if (glob_bot(fr) && strcmp(u->handle, conf.bot->nick) && strcmp(u->handle, avoidbot) && (bot_hublevel(u) < 999)) {
-      putlog(LOG_DEBUG, "@", STR("Adding %s to hublist"), u->handle);
+      putlog(LOG_DEBUG, "@", "Adding %s to hublist", u->handle);
       hl2 = hl;
       hl = calloc(1, sizeof(struct hublist_entry));
 
@@ -1255,12 +1253,12 @@ void autolink_cycle(char *start)
       hl->u = u;
     }
   }
-  putlog(LOG_DEBUG, "@", STR("Picking random hub from %d hubs"), hlc);
+  putlog(LOG_DEBUG, "@", "Picking random hub from %d hubs", hlc);
   hlc = randint(hlc);
-  putlog(LOG_DEBUG, "@", STR("Picked #%d for hub"), hlc);
+  putlog(LOG_DEBUG, "@", "Picked #%d for hub", hlc);
   while (hl) {
     if (!hlc) {
-      putlog(LOG_DEBUG, "@", STR("Which is bot: %s"), hl->u->handle);
+      putlog(LOG_DEBUG, "@", "Which is bot: %s", hl->u->handle);
       botlink("", -3, hl->u->handle);
     }
     hlc--;

Some files were not shown because too many files changed in this diff