diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2016-12-19 21:16:37 +0100 |
---|---|---|
committer | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2016-12-19 21:16:37 +0100 |
commit | 77aab7905791823f6ce2c19b4aaacd4231324841 (patch) | |
tree | 439dff40e3cf6efcfb73cb23252d79c9c769bae1 /src/irc | |
parent | 1c6695107c09e8861a696d66b029e7df62589fcd (diff) | |
download | irssi-77aab7905791823f6ce2c19b4aaacd4231324841.zip |
avoid server_disconnect
Closes #4
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc-nicklist.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/irc/core/irc-nicklist.c b/src/irc/core/irc-nicklist.c index b22f3269..1cb1f3e9 100644 --- a/src/irc/core/irc-nicklist.c +++ b/src/irc/core/irc-nicklist.c @@ -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) { 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) |