summaryrefslogtreecommitdiff
path: root/zyklonb.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2014-08-15 20:11:06 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2014-08-15 20:11:34 +0200
commitfb74a463930412e5acbe65ccc617fcfc528af03c (patch)
treeccadd8bc87568ee75cd7d6cd61780341a342326e /zyklonb.c
parentd4e4f599f052b2639ebd111330657294dff1c146 (diff)
downloadxK-fb74a463930412e5acbe65ccc617fcfc528af03c.tar.gz
xK-fb74a463930412e5acbe65ccc617fcfc528af03c.tar.xz
xK-fb74a463930412e5acbe65ccc617fcfc528af03c.zip
ZyklonB: `status' -> use semicolons in output
Diffstat (limited to 'zyklonb.c')
-rw-r--r--zyklonb.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/zyklonb.c b/zyklonb.c
index 47533f0..fde8a02 100644
--- a/zyklonb.c
+++ b/zyklonb.c
@@ -1229,21 +1229,24 @@ process_privmsg (struct bot_context *ctx, const struct irc_message *msg)
const char *reason = getenv (g_startup_reason_str);
if (!reason)
reason = "launched normally";
- str_append_printf (&report, "\x02startup reason:\x0f %s, ", reason);
-
- str_append (&report, "\x02plugins:\x0f ");
+ str_append_printf (&report,
+ "\x02startup reason:\x0f %s; \x02plugins:\x0f ", reason);
size_t zombies = 0;
+ const char *prepend = "";
for (struct plugin_data *plugin = ctx->plugins;
plugin; plugin = plugin->next)
{
if (plugin->is_zombie)
zombies++;
else
- str_append_printf (&report, "%s, ", plugin->name);
+ {
+ str_append_printf (&report, "%s%s", prepend, plugin->name);
+ prepend = ", ";
+ }
}
if (!ctx->plugins)
- str_append (&report, "\x02none\x0f, ");
- str_append_printf (&report, "\x02zombies:\x0f %zu", zombies);
+ str_append (&report, "\x02none\x0f");
+ str_append_printf (&report, "; \x02zombies:\x0f %zu", zombies);
respond_to_user (ctx, msg, "%s", report.str);
str_free (&report);