diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2007-01-17 15:07:14 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2007-01-17 15:07:14 +0000 |
commit | 67e5a315b0264e00521583cf2e775cbc8eb9bfc8 (patch) | |
tree | 7051c76e855cc062795c04d91a4e260e55947569 /src | |
parent | e840680d0ddf0e5d044644f7157088134445ea2e (diff) | |
download | irssi-67e5a315b0264e00521583cf2e775cbc8eb9bfc8.zip |
When connecting and the nick is invalid, abort the connection instead of looping indefinitely in event_nick_in_use.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4411 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/core/irc-nicklist.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/irc/core/irc-nicklist.c b/src/irc/core/irc-nicklist.c index 1bca67c9..8f8a027c 100644 --- a/src/irc/core/irc-nicklist.c +++ b/src/irc/core/irc-nicklist.c @@ -313,6 +313,12 @@ static void event_whois_ircop(SERVER_REC *server, const char *data) g_free(params); } +static void event_nick_invalid(IRC_SERVER_REC *server, const char *data) +{ + if (!server->connected) + server_disconnect((SERVER_REC *) server); +} + static void event_nick_in_use(IRC_SERVER_REC *server, const char *data) { char *str, *cmd; @@ -457,7 +463,7 @@ void irc_nicklist_init(void) signal_add_first("event 305", (SIGNAL_FUNC) event_own_unaway); signal_add_first("event 353", (SIGNAL_FUNC) event_names_list); signal_add_first("event 366", (SIGNAL_FUNC) event_end_of_names); - signal_add_first("event 432", (SIGNAL_FUNC) event_nick_in_use); + signal_add_first("event 432", (SIGNAL_FUNC) event_nick_invalid); signal_add_first("event 433", (SIGNAL_FUNC) event_nick_in_use); signal_add_first("event 437", (SIGNAL_FUNC) event_target_unavailable); signal_add_first("event 302", (SIGNAL_FUNC) event_userhost); @@ -479,7 +485,7 @@ void irc_nicklist_deinit(void) signal_remove("event 305", (SIGNAL_FUNC) event_own_unaway); signal_remove("event 353", (SIGNAL_FUNC) event_names_list); signal_remove("event 366", (SIGNAL_FUNC) event_end_of_names); - signal_remove("event 432", (SIGNAL_FUNC) event_nick_in_use); + signal_remove("event 432", (SIGNAL_FUNC) event_nick_invalid); signal_remove("event 433", (SIGNAL_FUNC) event_nick_in_use); signal_remove("event 437", (SIGNAL_FUNC) event_target_unavailable); signal_remove("event 302", (SIGNAL_FUNC) event_userhost); |