1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

relay/api: automatically reconnect to remotes with "autoconnect" enabled after /upgrade

This commit is contained in:
Sébastien Helleu
2024-08-11 14:26:36 +02:00
parent 970aa55f7f
commit 1de8fec2ee
2 changed files with 10 additions and 12 deletions
+1
View File
@@ -18,6 +18,7 @@
- core: allow mask in command `/item refresh`
- relay: enable websocket extension "permessage-deflate" with "api" relay only ([#1549](https://github.com/weechat/weechat/issues/1549))
- relay/api: add automatic reconnection to remote, add remote option "autoreconnect_delay" in remote, add options relay.api.remote_autoreconnect_delay_growing and relay.api.remote_autoreconnect_delay_max ([#2166](https://github.com/weechat/weechat/issues/2166))
- relay/api: automatically reconnect to remotes with "autoconnect" enabled after `/upgrade`
- relay/api: add field "hidden" in GET /api/buffers, add support of hidden buffers in remote client ([#2159](https://github.com/weechat/weechat/issues/2159))
- relay/api: add field "time_displayed" in GET /api/buffers, add support of time displayed in remote client buffers
- relay/weechat: add line id in buffer lines sent to clients
+9 -12
View File
@@ -303,19 +303,16 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
relay_info_init ();
if (weechat_relay_plugin->upgrading)
{
relay_upgrade_load ();
}
else
{
/* check if auto-connect is enabled */
info_auto_connect = weechat_info_get ("auto_connect", NULL);
auto_connect = (info_auto_connect && (strcmp (info_auto_connect, "1") == 0)) ?
1 : 0;
free (info_auto_connect);
if (auto_connect)
relay_remote_auto_connect ();
}
/* check if auto-connect is enabled */
info_auto_connect = weechat_info_get ("auto_connect", NULL);
auto_connect = (info_auto_connect && (strcmp (info_auto_connect, "1") == 0)) ?
1 : 0;
free (info_auto_connect);
if (weechat_relay_plugin->upgrading || auto_connect)
relay_remote_auto_connect ();
relay_hook_timer = weechat_hook_timer (1 * 1000, 0, 0,
&relay_timer_cb, NULL, NULL);