Переглянути джерело

* Fix log truncating for leafs (regression from timestamp commit)

Bryan Drewery 16 роки тому
батько
коміт
53deea9979
1 змінених файлів з 5 додано та 1 видалено
  1. 5 1
      src/botmsg.c

+ 5 - 1
src/botmsg.c

@@ -319,8 +319,12 @@ void putbot(const char *bot, char *par)
 */
 void botnet_send_log(int idx, const char *from, int type, const char *msg)
 {
+  size_t len;
   // Cut out timestamp
-  const size_t len = simple_snprintf(OBUF, sizeof(OBUF), "lo %s %d %s\n", from, type, &msg[LOG_TS_LEN]);
+  if (conf.bot->hub)
+    len = simple_snprintf(OBUF, sizeof(OBUF), "lo %s %d %s\n", from, type, &msg[LOG_TS_LEN]);
+  else
+    len = simple_snprintf(OBUF, sizeof(OBUF), "lo %s %d %s\n", from, type, msg);
 
   if (conf.bot->hub) {
     send_hubs_but(idx, OBUF, len);