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

* Fixed bug with forwarding log msgs between bots

svn: 2026
Bryan Drewery 21 лет назад
Родитель
Сommit
242ebcdba3
2 измененных файлов с 8 добавлено и 2 удалено
  1. 1 0
      doc/UPDATES
  2. 7 2
      src/botcmd.c

+ 1 - 0
doc/UPDATES

@@ -9,6 +9,7 @@ Lines prefixxed with '-' were disabled before release and are not finishsed, or
 - Change user system to hash table with uids
 - Change userentry system around to use strings ?
 - Fixed bot's not being able to link when the botnick case did not match (userlist vs binary -C).
+- Remove bot_hublog
 
 1.2.3
 * HUB/LEAF binaries have been combined into 1 binary named 'wraith'

+ 7 - 2
src/botcmd.c

@@ -509,13 +509,18 @@ static void bot_log(int idx, char *par)
   if (egg_isdigit(par[0])) {
     int type = atoi(newsplit(&par));
 
+    if (conf.bot->hub) {
+      size_t len = simple_sprintf(OBUF, "lo %s %s\n", from, par);
+     
+      send_hubs_but(idx, OBUF, len);
+    }
+
     putlog(type, "@", "(%s) %s", from, par);
+
   } else {
     putlog(LOG_ERRORS, "*", "Malformed HL line from %s: %s", from, par);
   }
 
-  if (conf.bot->hub)
-    send_hubs_but(idx, par, strlen(par));
 }