From e563de4b8190965ee962d442b238d39c5fbae6ee Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sat, 30 Aug 2008 23:55:04 +0000 Subject: [PATCH] Fix display of ratbox-style operspy whois (/whois !nick). git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4874 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/irc-commands.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index 7d3b861f..fba686f4 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -354,14 +354,18 @@ static char *get_redirect_nicklist(const char *nicks, int *free) { char *str, *ret; - if (strchr(nicks, ',') == NULL) { + if (*nicks != '!' && strchr(nicks, ',') == NULL) { *free = FALSE; return (char *) nicks; } *free = TRUE; - str = g_strdup(nicks); + /* ratbox-style operspy whois takes !nick, echoes that + * in RPL_ENDOFWHOIS as normal but gives output about the + * plain nick + */ + str = g_strdup(*nicks == '!' ? nicks + 1 : nicks); g_strdelimit(str, ",", ' '); ret = g_strconcat(str, " ", nicks, NULL); g_free(str);