mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
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:
parent
28faa953be
commit
525773aa80
@ -44,6 +44,17 @@ void reconnect_save_status(SERVER_CONNECT_REC *conn, SERVER_REC *server)
|
|||||||
conn->away_reason = !server->usermode_away ? NULL :
|
conn->away_reason = !server->usermode_away ? NULL :
|
||||||
g_strdup(server->away_reason);
|
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);
|
signal_emit("server reconnect save status", 2, conn, server);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,8 @@ static void sig_server_connect_copy(SERVER_CONNECT_REC **dest,
|
|||||||
static void sig_server_reconnect_save_status(IRC_SERVER_CONNECT_REC *conn,
|
static void sig_server_reconnect_save_status(IRC_SERVER_CONNECT_REC *conn,
|
||||||
IRC_SERVER_REC *server)
|
IRC_SERVER_REC *server)
|
||||||
{
|
{
|
||||||
if (!IS_IRC_SERVER_CONNECT(conn) || !IS_IRC_SERVER(server))
|
if (!IS_IRC_SERVER_CONNECT(conn) || !IS_IRC_SERVER(server) ||
|
||||||
|
!server->connected)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_free_not_null(conn->channels);
|
g_free_not_null(conn->channels);
|
||||||
|
Loading…
Reference in New Issue
Block a user