diff options
author | dequis <dx@dxzone.com.ar> | 2016-12-25 20:41:13 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-12-25 21:20:09 -0300 |
commit | 6d212f401cf7eeb3eabe315e610578f5aac74607 (patch) | |
tree | 720a2c2e70667d0b57559ef3dba47cbba787d540 /root_commands.c | |
parent | 7486853ca817c0e6d0a5b3d1b702d6bd8e96bf4e (diff) |
purple: include purple plugins in the 'plugins' command list
Diffstat (limited to 'root_commands.c')
-rw-r--r-- | root_commands.c | 11 |
1 files changed, 10 insertions, 1 deletions
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 |