Răsfoiți Sursa

Merge branch 'auth-lookup' into maint

* auth-lookup:
  * Fix auth IRC lookups getting the wrong cached idx
Bryan Drewery 16 ani în urmă
părinte
comite
6a6ce0d4c5
2 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  1. 1 0
      doc/UPDATES
  2. 4 0
      src/auth.c

+ 1 - 0
doc/UPDATES

@@ -10,6 +10,7 @@
 * Fix buffer overflow in DCC
 * Fix problems with changing IP
 * Fix bot going zombie if it jumps during a restart
+* Fix auth IRC lookups getting the wrong cached idx
 
 1.3 - http://wraith.botpack.net/milestone/1.3
 * Binary / shell / startup changes

+ 4 - 0
src/auth.c

@@ -183,6 +183,10 @@ sdprintf(STR("GETIDX: auth: %s, idx: %d"), nick, idx);
   if (idx != -1) {
     if (!valid_idx(idx))
       idx = -1;
+    else if (!dcc[idx].irc || dcc[idx].simul == -1)
+      idx = -1;
+    else if (strcmp(dcc[idx].nick, handle))
+      idx = -1;
     else {
       sdprintf(STR("FIRST FOUND: %d"), idx);
       strlcpy(dcc[idx].simulbot, nick, sizeof(dcc[idx].simulbot));