Răsfoiți Sursa

* cmd_getkey over .botcmd was displaying excess newlines.

svn: 2018
Bryan Drewery 21 ani în urmă
părinte
comite
2e5dbb851b
2 a modificat fișierele cu 8 adăugiri și 4 ștergeri
  1. 2 0
      doc/UPDATES
  2. 6 4
      src/mod/irc.mod/cmdsirc.c

+ 2 - 0
doc/UPDATES

@@ -84,6 +84,8 @@ Lines prefixxed with '-' were disabled before release and are not finishsed, or
 * Added match option for cmd_botcmd: '$' will match on all localhubs (first bot in config) (#28)
 * Added some debug logging when a telnet connection is ignored.
 * Fixed some missing sanity checking on certain user flags for channel records.
+* cmd_dns wasn't checking for param
+* cmd_getkey over .botcmd was displaying excess newlines.
 
 1.2.2
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.

+ 6 - 4
src/mod/irc.mod/cmdsirc.c

@@ -1005,13 +1005,15 @@ static void cmd_getkey(int idx, char *par)
     return;
   }
 
+  char outbuf[201] = "";
+
   if (!chan->channel.key[0])
-    dprintf(idx, "%s has no key set.", chan->dname);
+    simple_snprintf(outbuf, sizeof(outbuf), "%s has no key set.", chan->dname);
   else
-    dprintf(idx, "Key for %s is: %s", chan->dname, chan->channel.key);
+    simple_snprintf(outbuf, sizeof(outbuf), "Key for %s is: %s", chan->dname, chan->channel.key);
   if (chan->key_prot[0])
-    dprintf(idx, " (Enforcing +k %s)", chan->key_prot);
-  dprintf(idx, "\n");
+    simple_snprintf(outbuf, sizeof(outbuf), "%s (Enforcing +k %s)", outbuf, chan->key_prot);
+  dprintf(idx, "%s\n", outbuf);
 }
 
 static void cmd_mop(int idx, char *par)