From 6d212f401cf7eeb3eabe315e610578f5aac74607 Mon Sep 17 00:00:00 2001 From: dequis Date: Sun, 25 Dec 2016 20:41:13 -0300 Subject: purple: include purple plugins in the 'plugins' command list --- root_commands.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'root_commands.c') diff --git a/root_commands.c b/root_commands.c index 6bc34fb5..0ea380af 100644 --- a/root_commands.c +++ b/root_commands.c @@ -1221,8 +1221,17 @@ static void cmd_plugins(irc_t *irc, char **cmd) irc_rootmsg(irc, format, "Plugin", "Version"); for (l = get_plugins(); l; l = l->next) { + char *c; info = l->data; - irc_rootmsg(irc, format, info->name, info->version); + + /* some purple plugins like to include several versions separated by newlines... */ + if ((c = strchr(info->version, '\n'))) { + char *version = g_strndup(info->version, c - info->version); + irc_rootmsg(irc, format, info->name, version); + g_free(version); + } else { + irc_rootmsg(irc, format, info->name, info->version); + } } #endif -- cgit v1.2.3