فهرست منبع

* Port [3098] to 1.2.12
* Fix cmds: bot[jump|server|version|msg] not running locally correctly. (fixes #304)


svn: 3099

Bryan Drewery 19 سال پیش
والد
کامیت
5f3e350ec4
2فایلهای تغییر یافته به همراه10 افزوده شده و 8 حذف شده
  1. 1 0
      doc/UPDATES
  2. 9 8
      src/cmds.c

+ 1 - 0
doc/UPDATES

@@ -14,6 +14,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Added a new error code (22) which displays if attempting to run binary before using -C.
 * cmd_swhois is now -|- and hides all restricted information, channels; see 'help swhois'.
 * cmd_mop no longer defaults to console channel if no channel is specified. (fixes #302)
+* Fix cmds: bot[jump|server|version|msg] not running locally correctly. (fixes #304)
 
 1.2.11 - http://wraith.shatow.net/milestone/1.2.11
 * Fixed typo in help for .set/.conf/.channel

+ 9 - 8
src/cmds.c

@@ -3592,8 +3592,9 @@ static void cmd_botserver(int idx, char * par) {
     dprintf(idx, "Usage: botserver <bot>\n");
     return;
   }
-  if (nextbot(par)<0) {
-    dprintf(idx, "%s isn't a linked bot\n", par);
+  if (egg_strcasecmp(conf->bot.nick, par) && nextbot(par)<0) {
+    dprintf(idx, "%s isn't a linked bot.\n", par);
+    return;
   }
   botnet_send_cmd(conf.bot->nick, par, dcc[idx].nick, idx, "cursrv");
 }
@@ -3641,8 +3642,8 @@ static void cmd_botversion(int idx, char * par) {
     dprintf(idx, "Usage: botversion <bot>\n");
     return;
   }
-  if (egg_strcasecmp(par, conf.bot->nick) && nextbot(par)<0) {
-    dprintf(idx, "%s isn't a linked bot\n", par);
+  if (egg_strcasecmp(conf.bot->nick, par) && nextbot(par)<0) {
+    dprintf(idx, "%s isn't a linked bot.\n", par);
     return;
   }
   botnet_send_cmd(conf.bot->nick, par, dcc[idx].nick, idx, "ver");
@@ -3714,8 +3715,8 @@ static void cmd_botmsg(int idx, char * par) {
     dprintf(idx, "Usage: botmsg <bot> <nick|#channel> <message>\n");
     return;
   }
-  if (nextbot(tbot)<0) {
-    dprintf(idx, "No such bot linked\n");
+  if (egg_strcasecmp(conf.bot->nick, tbot) && nextbot(tbot)<0) {
+    dprintf(idx, "%s isn't a linked bot.\n", tbot);
     return;
   }
   
@@ -4063,8 +4064,8 @@ static void cmd_botjump(int idx, char * par) {
     dprintf(idx, "Usage: botjump <bot> [server [port [pass]]]\n");
     return;
   }
-  if (nextbot(tbot)<0) {
-    dprintf(idx, "No such linked bot\n");
+  if (egg_strcasecmp(conf.bot->nick, tbot) && nextbot(tbot)<0) {
+    dprintf(idx, "%s isn't a linked bot.\n", tbot);
     return;
   }