diff --git a/src/irc/core/irc-servers-reconnect.c b/src/irc/core/irc-servers-reconnect.c index 71a3718e..f2cbf7f0 100644 --- a/src/irc/core/irc-servers-reconnect.c +++ b/src/irc/core/irc-servers-reconnect.c @@ -86,12 +86,16 @@ static void event_nick_collision(IRC_SERVER_REC *server, const char *data) settings_get_int("server_reconnect_time"); if (server->connect_time > new_connect) server->connect_time = new_connect; + + server->nick_collision = TRUE; } static void event_kill(IRC_SERVER_REC *server, const char *data) { - /* don't reconnect if we were killed */ - server->no_reconnect = TRUE; + if (!server->nick_collision) { + /* don't reconnect if we were killed */ + server->no_reconnect = TRUE; + } } void irc_servers_reconnect_init(void) diff --git a/src/irc/core/irc-servers.h b/src/irc/core/irc-servers.h index 370dd0d1..0f4659cd 100644 --- a/src/irc/core/irc-servers.h +++ b/src/irc/core/irc-servers.h @@ -59,6 +59,7 @@ struct _IRC_SERVER_REC { unsigned int no_multi_who:1; /* Server doesn't understand WHO #chan1,#chan2,... */ unsigned int one_endofwho:1; /* /WHO #a,#b,.. replies only with one End of WHO message */ unsigned int disable_lag:1; /* Disable lag detection (PING command doesn't exist) */ + unsigned int nick_collision:1; /* We're just now being killed because of nick collision */ int max_kicks_in_cmd; /* max. number of people to kick with one /KICK command */ int max_modes_in_cmd; /* max. number of mode changes in one /MODE command */