1
0
mirror of https://github.com/irssi/irssi.git synced 2025-02-02 15:08:01 -05:00

avoid server_disconnect

Closes #4
This commit is contained in:
ailin-nemui 2016-12-19 21:16:37 +01:00
parent 1c6695107c
commit 77aab79057

View File

@ -314,7 +314,11 @@ static void event_whois_ircop(SERVER_REC *server, const char *data)
static void event_nick_invalid(IRC_SERVER_REC *server, const char *data) static void event_nick_invalid(IRC_SERVER_REC *server, const char *data)
{ {
if (!server->connected) if (!server->connected)
server_disconnect((SERVER_REC *) server); /* we used to call server_disconnect but that crashes
irssi because of undefined memory access. instead,
indicate that the connection should be dropped and
let the irc method to the clean-up. */
server->connection_lost = server->no_reconnect = TRUE;
} }
static void event_nick_in_use(IRC_SERVER_REC *server, const char *data) static void event_nick_in_use(IRC_SERVER_REC *server, const char *data)