Procházet zdrojové kódy

* Port [3234] to 1.2.14
* Fix cmd_mns_user being ran on self-bot. (fixes #350)



svn: 3235

Bryan Drewery před 19 roky
rodič
revize
1a4567b8d0
2 změnil soubory, kde provedl 6 přidání a 0 odebrání
  1. 1 0
      doc/UPDATES
  2. 5 0
      src/cmds.c

+ 1 - 0
doc/UPDATES

@@ -21,6 +21,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Make bot chmod() itself when accessing its binary.
 * Fix bots sharing wrong channel keys over botnet.
 * Cmd_swhois now displays a list of only 'public' channels as well.
+* Fix cmd_mns_user being ran on self-bot. (fixes #350)
 
 1.2.13 - http://wraith.shatow.net/milestone/1.2.13
 * Fix cmd_chanset accepting invalid flags

+ 5 - 0
src/cmds.c

@@ -3386,6 +3386,11 @@ static void cmd_mns_user(int idx, char *par)
         dprintf(idx, "You can't remove bots.\n");
         return;
     }
+    if (!egg_strcasecmp(u2->handle, conf.bot->nick)) {
+      dprintf(idx, "The 'suicide' cmd should be used instead.\n");
+      return;
+    }
+
     int i = nextbot(handle);
 
     if (i < 0)