diff options
author | Geert Hauwaerts <geert@irssi.org> | 2004-09-15 19:29:55 +0000 |
---|---|---|
committer | geert <geert@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2004-09-15 19:29:55 +0000 |
commit | f888f2c9dccbc075b74203b6f8899dbdef0fda05 (patch) | |
tree | f5d06e7eb3e9467d24dfa77e90e7796f482e8fba /src/fe-common | |
parent | ba2a025706cd12651d5d32d6205d3111ba0d0c19 (diff) | |
download | irssi-f888f2c9dccbc075b74203b6f8899dbdef0fda05.zip |
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
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/irc/fe-whois.c | 16 |
1 files changed, 10 insertions, 6 deletions
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 <geert@irssi.org> + * 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); } |