Browse Source

* Port [3224] to 1.2.14
* Localhubs now auto add *!~username@... hosts instead of *!~nick@... hosts for their leafs.



svn: 3225

Bryan Drewery 19 năm trước cách đây
mục cha
commit
d009090ebc
2 tập tin đã thay đổi với 14 bổ sung1 xóa
  1. 1 0
      doc/UPDATES
  2. 13 1
      src/conf.c

+ 1 - 0
doc/UPDATES

@@ -17,6 +17,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fix bot not reconnecting with new ip/host when -HUPd. (fixes #340)
 * All bots are now rehashed after editing binary - nick casing, ip changes are taken into effect.
 * Bots now use the shell username instead of botnick when ident does not work.
+* Localhubs now auto add *!~username@... hosts instead of *!~nick@... hosts for their leafs.
 
 1.2.13 - http://wraith.shatow.net/milestone/1.2.13
 * Fix cmd_chanset accepting invalid flags

+ 13 - 1
src/conf.c

@@ -1222,7 +1222,7 @@ void conf_add_userlist_bots()
         if (!user_has_host(NULL, u, uhost) && !host_conflicts(uhost))
           addhost_by_handle(bot->nick, uhost);
 
-        simple_snprintf(uhost, sizeof(uhost), "*!~%s@%s", bot->nick, bot->net.ip);
+        simple_snprintf(uhost, sizeof(uhost), "*!~%s@%s", conf.username, bot->net.ip);
         if (!user_has_host(NULL, u, uhost) && !host_conflicts(uhost))
           addhost_by_handle(bot->nick, uhost);
       }
@@ -1230,16 +1230,28 @@ void conf_add_userlist_bots()
         simple_snprintf(uhost, sizeof(uhost), "*!%s@%s", conf.username, bot->net.host);
         if (!user_has_host(NULL, u, uhost) && !host_conflicts(uhost))
           addhost_by_handle(bot->nick, uhost);
+
+        simple_snprintf(uhost, sizeof(uhost), "*!~%s@%s", conf.username, bot->net.host);
+        if (!user_has_host(NULL, u, uhost) && !host_conflicts(uhost))
+          addhost_by_handle(bot->nick, uhost);
       }
       if (bot->net.host6) {
         simple_snprintf(uhost, sizeof(uhost), "*!%s@%s", conf.username, bot->net.host6);
         if (!user_has_host(NULL, u, uhost) && !host_conflicts(uhost))
           addhost_by_handle(bot->nick, uhost);
+
+        simple_snprintf(uhost, sizeof(uhost), "*!~%s@%s", conf.username, bot->net.host6);
+        if (!user_has_host(NULL, u, uhost) && !host_conflicts(uhost))
+          addhost_by_handle(bot->nick, uhost);
       }
       if (bot->net.ip6) {
         simple_snprintf(uhost, sizeof(uhost), "*!%s@%s", conf.username, bot->net.ip6);
         if (!user_has_host(NULL, u, uhost) && !host_conflicts(uhost))
           addhost_by_handle(bot->nick, uhost);
+
+        simple_snprintf(uhost, sizeof(uhost), "*!~%s@%s", conf.username, bot->net.ip6);
+        if (!user_has_host(NULL, u, uhost) && !host_conflicts(uhost))
+          addhost_by_handle(bot->nick, uhost);
       }
     }
   }