diff options
author | Timo Sirainen <cras@irssi.org> | 2002-09-30 21:43:46 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-09-30 21:43:46 +0000 |
commit | 525773aa80b3bc441768d49be82dd1ddd5f583a1 (patch) | |
tree | dda212a4ffb8d2c3ded43d1ef958a014d75e6aec /src/core | |
parent | 28faa953be748ef4cd0b615e2925fbeecb35827f (diff) | |
download | irssi-525773aa80b3bc441768d49be82dd1ddd5f583a1.zip |
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
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/servers-reconnect.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/servers-reconnect.c b/src/core/servers-reconnect.c index a095f3c4..79d65aab 100644 --- a/src/core/servers-reconnect.c +++ b/src/core/servers-reconnect.c @@ -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); } |