diff options
author | Jilles Tjoelker <jilles@irssi.org> | 2007-05-20 20:07:12 +0000 |
---|---|---|
committer | jilles <jilles@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2007-05-20 20:07:12 +0000 |
commit | cb1287ab63549186e1841a7e63f7a7d5b4be3b4d (patch) | |
tree | ba6a36aff0648c961ece3f35de7d2081fbc083ad /src/fe-common | |
parent | bf937e5e69d0d858f56cc6c87ee3731690435aaf (diff) | |
download | irssi-cb1287ab63549186e1841a7e63f7a7d5b4be3b4d.zip |
If we get a ERR_NOSUCHNICK for the nick "*", display
the text in the numeric rather than a fixed "no such
nick/channel". This often contains more information for
at least ircu/ratbox/charybdis (Target left IRC with
failed text when /msg crosses quit/split).
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4508 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/irc/fe-events-numeric.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/fe-common/irc/fe-events-numeric.c b/src/fe-common/irc/fe-events-numeric.c index c69a4238..7e290452 100644 --- a/src/fe-common/irc/fe-events-numeric.c +++ b/src/fe-common/irc/fe-events-numeric.c @@ -392,14 +392,20 @@ static void event_target_unavailable(IRC_SERVER_REC *server, const char *data, g_free(params); } -static void event_no_such_nick(IRC_SERVER_REC *server, const char *data) +static void event_no_such_nick(IRC_SERVER_REC *server, const char *data, + const char *nick, const char *addr) { - char *params, *nick; + char *params, *unick; g_return_if_fail(data != NULL); - params = event_get_params(data, 2, NULL, &nick); - printformat(server, nick, MSGLEVEL_CRAP, IRCTXT_NO_SUCH_NICK, nick); + params = event_get_params(data, 2, NULL, &unick); + if (!strcmp(unick, "*")) + /* more information will be in the description, + * e.g. * :Target left IRC. Failed to deliver: [hi] */ + print_event_received(server, data, nick, FALSE); + else + printformat(server, unick, MSGLEVEL_CRAP, IRCTXT_NO_SUCH_NICK, unick); g_free(params); } |