1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

Move the check for 4xx numeric for join failures last, so

that the CHANNEL_REC is still around when handlers for
specific numerics are executed. This allows removing the
ugly special case for 437; I will also use this for 470
(channel forwarding).


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4572 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Jilles Tjoelker 2007-07-06 21:43:23 +00:00 committed by jilles
parent 0b8bee080a
commit 8312144547

View File

@ -60,8 +60,7 @@ static void irc_server_event(IRC_SERVER_REC *server, const char *line)
indicate that the join failed. */ indicate that the join failed. */
params = event_get_params(line, 3, &numeric, NULL, &channel); params = event_get_params(line, 3, &numeric, NULL, &channel);
/* 437 is handled specially in src/irc/core/channel-rejoin.c */ if (numeric[0] == '4')
if (numeric[0] == '4' && (numeric[1] != '3' || numeric[2] != '7'))
check_join_failure(server, channel); check_join_failure(server, channel);
g_free(params); g_free(params);
@ -360,7 +359,7 @@ void channel_events_init(void)
{ {
settings_add_bool("misc", "join_auto_chans_on_invite", TRUE); settings_add_bool("misc", "join_auto_chans_on_invite", TRUE);
signal_add_first("server event", (SIGNAL_FUNC) irc_server_event); signal_add_last("server event", (SIGNAL_FUNC) irc_server_event);
signal_add_first("event 403", (SIGNAL_FUNC) event_no_such_channel); /* no such channel */ signal_add_first("event 403", (SIGNAL_FUNC) event_no_such_channel); /* no such channel */
signal_add_first("event 407", (SIGNAL_FUNC) event_duplicate_channel); /* duplicate channel */ signal_add_first("event 407", (SIGNAL_FUNC) event_duplicate_channel); /* duplicate channel */