Преглед изворни кода

* Fixed improper hub recognition in binary config parser. (#148)

svn: 2347
Bryan Drewery пре 21 година
родитељ
комит
9c9877a67b
2 измењених фајлова са 5 додато и 2 уклоњено
  1. 1 0
      doc/UPDATES
  2. 4 2
      src/conf.c

+ 1 - 0
doc/UPDATES

@@ -22,6 +22,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed cmd_chsecpass to use whois_access() (#120)
 * Added code to eat zombie processes minutely (shouldn't interfere with anything)
 * Fixed ignores not being used. (#147) (Breaks a fix to not display msgs after added to ignore for floods)
+* Fixed improper hub recognition in binary config parser. (#148)
 
 1.2.6
 * (REVERTED FROM 1.2.3) Disabled all memory allocations after a segfault (Fixes CPU spinning)

+ 4 - 2
src/conf.c

@@ -475,13 +475,15 @@ conf_addbot(char *nick, char *ip, char *host, char *ip6)
 //  bot->pid = checkpid(nick, bot);
 
   if (settings.hubs) {
-    char *p = settings.hubs, *p2 = NULL;
+    char *p = settings.hubs, *p2 = NULL, hubbuf[HANDLEN + 1] ="";
     size_t len = 0;
 
     while (p && *p) {
       if ((p2 = strchr(p, ' '))) {
+
         len = p2 - p;
-        if (!egg_strncasecmp(p, bot->nick, len)) {
+        simple_snprintf(hubbuf, len + 1, "%s", p);
+        if (!egg_strcasecmp(bot->nick, hubbuf)) {
           bot->hub = 1;
           break;
         }