From cb1287ab63549186e1841a7e63f7a7d5b4be3b4d Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sun, 20 May 2007 20:07:12 +0000 Subject: 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 --- src/fe-common/irc/fe-events-numeric.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/fe-common') 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); } -- cgit v1.2.3