From f888f2c9dccbc075b74203b6f8899dbdef0fda05 Mon Sep 17 00:00:00 2001 From: Geert Hauwaerts Date: Wed, 15 Sep 2004 19:29:55 +0000 Subject: Bugfix: http://bugs.irssi.org/?do=details&id=99 git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3298 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/irc/fe-whois.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/fe-common/irc/fe-whois.c') diff --git a/src/fe-common/irc/fe-whois.c b/src/fe-common/irc/fe-whois.c index b956b9de..dfab7c5e 100644 --- a/src/fe-common/irc/fe-whois.c +++ b/src/fe-common/irc/fe-whois.c @@ -88,18 +88,22 @@ static void event_whois_oper(IRC_SERVER_REC *server, const char *data) g_return_if_fail(data != NULL); params = event_get_params(data, 3, NULL, &nick, &type); - /* type = "is an IRC Operator" */ - if (strlen(type) > 5) { + + /* Bugfix: http://bugs.irssi.org/?do=details&id=99 + * Author: Geert Hauwaerts + * Date: Wed Sep 15 20:17:24 CEST 2004 + */ + + if ((!strncmp(type, "is an ", 6)) || (!strncmp(type, "is a ", 5))) { type += 5; if (*type == ' ') type++; } - if (*type == '\0') { - /* shouldn't happen */ + + if (*type == '\0') type = "IRC Operator"; - } printformat(server, nick, MSGLEVEL_CRAP, - IRCTXT_WHOIS_OPER, nick, type); + IRCTXT_WHOIS_OPER, nick, type); g_free(params); } -- cgit v1.2.3