Explorar el Código

* Fixed an outstanding bug on linking from a hub to another hub.

svn: 2048
Bryan Drewery hace 21 años
padre
commit
f3a3c53273
Se han modificado 2 ficheros con 4 adiciones y 3 borrados
  1. 1 0
      doc/UPDATES
  2. 3 3
      src/users.c

+ 1 - 0
doc/UPDATES

@@ -100,6 +100,7 @@ Lines prefixxed with '-' were disabled before release and are not finishsed, or
 * Detection system run by localhub will kill all other running bots with DIE/SUICIDE now.
 * Detection system run by localhub will kill all other running bots with DIE/SUICIDE now.
 * During update, bot uplinks aren't permanently changed now.
 * During update, bot uplinks aren't permanently changed now.
 * Bans aren't checked on join anymore if the channel is +take
 * Bans aren't checked on join anymore if the channel is +take
+* Fixed an outstanding bug on linking from a hub to another hub.
 
 
 1.2.2
 1.2.2
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.

+ 3 - 3
src/users.c

@@ -1116,17 +1116,17 @@ void autolink_cycle_hub(char *start)
 
 
   if (start)
   if (start)
     u = get_user_by_handle(userlist, start);
     u = get_user_by_handle(userlist, start);
-  else
-    u = NULL;
 
 
   if (u) {
   if (u) {
     link_pref_val(u, curval);
     link_pref_val(u, curval);
     if (strcmp(bestval, curval) < 0) {
     if (strcmp(bestval, curval) < 0) {
+	/* This happens if we're already connected to a good hub but we failed to link to another hub as well
+	   can happen if you .link.... but it's nothing FATAL :) */
       /* This shouldn't happen. Getting a failed link attempt (start!=NULL)
       /* This shouldn't happen. Getting a failed link attempt (start!=NULL)
          while a dcc scan indicates we *are* connected to a better bot than
          while a dcc scan indicates we *are* connected to a better bot than
          the one we failed a link to.
          the one we failed a link to.
        */
        */
-      putlog(LOG_BOTS, "*",  "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;
       return;
     }
     }
   } else
   } else