ZyklonB: `status' -> use semicolons in output
This commit is contained in:
parent
d4e4f599f0
commit
fb74a46393
15
zyklonb.c
15
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);
|
||||
|
Loading…
Reference in New Issue
Block a user