Procházet zdrojové kódy

* Poted [2535] to 1.2.9

svn: 2618
Bryan Drewery před 20 roky
rodič
revize
3fa10cab38
2 změnil soubory, kde provedl 5 přidání a 2 odebrání
  1. 1 0
      doc/UPDATES
  2. 4 2
      src/botcmd.c

+ 1 - 0
doc/UPDATES

@@ -43,6 +43,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed cmd_rehash killing hubs. And revised help for 'rehash'. (#186)
 * Fixed a bug in the listen code, which caused a segfault in /ctcp chat (a few other places too) (#189)
 * Fixed botcmd using wrong user on remote bot after doing su'ing to another user. (#190)
+* Fixed botcmd -> su/quit causing remote bots to close random socket.
 
 1.2.8
 * Fixed [bot]* cmds depending on case of botnicks.

+ 4 - 2
src/botcmd.c

@@ -1019,9 +1019,11 @@ static void bot_part(int idx, char *par)
   int i = 0;
 
   for (i = 0; i < dcc_total; i++) {
+    /* This will potentially close all simul-idxs with matching nick, even though they may be connected multiple times
+       but, it won't matter as a new will just be made as needed. */
     if (dcc[i].type && dcc[i].simul >= 0 && !egg_strcasecmp(dcc[i].nick, nick)) {
-        dcc[idx].simul = -1;
-        lostdcc(idx);
+        dcc[i].simul = -1;
+        lostdcc(i);
     }
   }