Просмотр исходного кода

* Port [3280] to 1.2.14
* Fix bots not connecting to their uplink.



svn: 3281

Bryan Drewery 19 лет назад
Родитель
Сommit
fd5f49743a
2 измененных файлов с 12 добавлено и 13 удалено
  1. 1 0
      doc/UPDATES
  2. 11 13
      src/chanprog.c

+ 1 - 0
doc/UPDATES

@@ -24,6 +24,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fix cmd_mns_user being ran on self-bot. (fixes #350)
 * Fix cmd_checkchannels not taking slowjoin into account.
 * Fix cmd_swhois returning results after a server jump.
+* Fix bots not connecting to their uplink.
 
 1.2.13 - http://wraith.shatow.net/milestone/1.2.13
 * Fix cmd_chanset accepting invalid flags

+ 11 - 13
src/chanprog.c

@@ -523,20 +523,18 @@ void add_myself_to_userlist() {
     userlist = adduser(userlist, conf.bot->nick, "none", "-", USER_OP, 1);
     conf.bot->u = get_user_by_handle(userlist, conf.bot->nick);
     bi = (struct bot_addr *) my_calloc(1, sizeof(struct bot_addr));
-  } else {
-    bi = (struct bot_addr *) get_user(&USERENTRY_BOTADDR, conf.bot->u);
-  }
 
-  /* Assume hub has a record added from load_internal_users();
-     why would it think it was a hub if it wasn't in the hub list??
-  */
-  if (!conf.bot->hub) {
-    if (conf.bot->net.ip)
-      bi->address = strdup(conf.bot->net.ip);
-    bi->telnet_port = bi->relay_port = 3333;
-    bi->hublevel = 999;
-    bi->uplink = (char *) my_calloc(1, 1);
-    set_user(&USERENTRY_BOTADDR, conf.bot->u, bi);
+    /* Assume hub has a record added from load_internal_users();
+       why would it think it was a hub if it wasn't in the hub list??
+    */
+    if (!conf.bot->hub) {
+      if (conf.bot->net.ip)
+        bi->address = strdup(conf.bot->net.ip);
+      bi->telnet_port = bi->relay_port = 3333;
+      bi->hublevel = 999;
+      bi->uplink = (char *) my_calloc(1, 1);
+      set_user(&USERENTRY_BOTADDR, conf.bot->u, bi);
+    }
   }
 }