If reconnection was aborted by trying to reconnect to another server, the

channels and usermode wasn't restored.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2934 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-09-30 21:43:46 +00:00 committed by cras
commit 525773aa80
2 changed files with 13 additions and 1 deletions

View file

@ -44,6 +44,17 @@ void reconnect_save_status(SERVER_CONNECT_REC *conn, SERVER_REC *server)
conn->away_reason = !server->usermode_away ? NULL :
g_strdup(server->away_reason);
if (!server->connected) {
/* default to channels/usermode from connect record
since server isn't fully connected yet */
g_free_not_null(conn->channels);
conn->channels = server->connrec->no_autojoin_channels ? NULL :
g_strdup(server->connrec->channels);
g_free_not_null(conn->channels);
conn->channels = g_strdup(server->connrec->channels);
}
signal_emit("server reconnect save status", 2, conn, server);
}