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

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
This commit is contained in:
Emanuele Giaquinta 2007-01-17 15:07:14 +00:00 committed by exg
parent e840680d0d
commit 67e5a315b0

View File

@ -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);