ZyklonB: `status' -> use semicolons in output

This commit is contained in:
Přemysl Eric Janouch 2014-08-15 20:11:06 +02:00
parent d4e4f599f0
commit fb74a46393

View File

@ -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);