1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

relay/api: automatically disconnect when the command /upgrade is executed on the remote

This commit is contained in:
Sébastien Helleu
2024-08-09 18:23:23 +02:00
parent 6e775e4768
commit 995cbe542e
2 changed files with 12 additions and 0 deletions
+1
View File
@@ -66,6 +66,7 @@
- relay/api: close obsolete buffers when reconnecting to the remote
- relay/api: fix "body_type" returned when lines or nicks of a buffer are requested
- relay/api: fix read of one buffer line
- relay/api: automatically disconnect when the command `/upgrade` is executed on the remote
- relay: fix websocket permessage-deflate extension when the client doesn't send the max window bits parameters ([#1549](https://github.com/weechat/weechat/issues/1549))
- relay: fix allocation and reinit of field "client_context_takeover" in websocket deflate structure ([#1549](https://github.com/weechat/weechat/issues/1549))
- spell: improve error displayed when a word can not be added to the dictionary ([#2144](https://github.com/weechat/weechat/issues/2144))
@@ -1152,6 +1152,16 @@ RELAY_REMOTE_EVENT_CALLBACK(version)
return WEECHAT_RC_OK;
}
/*
* Callback for events "upgrade" and "upgrade_ended".
*/
RELAY_REMOTE_EVENT_CALLBACK(upgrade)
{
relay_remote_network_disconnect (event->remote);
return WEECHAT_RC_OK;
}
/*
* Synchronizes with remote.
*/
@@ -1208,6 +1218,7 @@ relay_remote_event_recv (struct t_relay_remote *remote, const char *data)
{ "input_*", &relay_remote_event_cb_input },
{ "nicklist_group_*", &relay_remote_event_cb_nick_group },
{ "nicklist_nick_*", &relay_remote_event_cb_nick },
{ "upgrade*", &relay_remote_event_cb_upgrade },
{ NULL, NULL },
};
t_relay_remote_event_func *callback;