Jelajahi Sumber

* Port [3268] to 1.2.14
* Fix excess newline in remote simul bouncing



svn: 3269

Bryan Drewery 19 tahun lalu
induk
melakukan
224e32667d
1 mengubah file dengan 5 tambahan dan 0 penghapusan
  1. 5 0
      src/botcmd.c

+ 5 - 0
src/botcmd.c

@@ -1250,6 +1250,11 @@ void bounce_simul(int idx, char *buf)
   if (!buf || !buf[0] || !dcc[idx].simulbot || !dcc[idx].simulbot[0] || idx < 0)
     return;
 
+  /* Truncate out the newline that was put in from the dprintf() */
+  char *p = strchr(buf, '\n');
+  if (p)
+    *p = 0;
+
   simple_snprintf(rmsg, sizeof rmsg, "r-sr %d %s", dcc[idx].simul, buf);          /* remote-simul[r]eturn idx buf */
   putbot(dcc[idx].simulbot, rmsg);
 }