From 11d95fce115f710eb46ade3883de023f1c7d7fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 4 Nov 2023 08:58:19 +0100 Subject: [PATCH] relay: close properly connection with the IRC client in case of server disconnection (closes #2038) --- ChangeLog.adoc | 1 + src/plugins/relay/irc/relay-irc.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 093811487..22d1dca55 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -36,6 +36,7 @@ Bug fixes:: * core: fix crash when a custom bar item name is already used by a default bar item (issue #2034) * core: fix random timeouts when a lot of concurrent processes are launched with hook_process (issue #2033) * irc: revert compute of nick colors to case sensitive way, deprecate again infos "irc_nick_color" and "irc_nick_color_name" (issue #194, issue #2032) + * relay: close properly connection with the IRC client in case of server disconnection (issue #2038) * ruby: fix use of NULL variable when displaying exception Build:: diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c index eaf37f407..96d1e3be2 100644 --- a/src/plugins/relay/irc/relay-irc.c +++ b/src/plugins/relay/irc/relay-irc.c @@ -616,6 +616,13 @@ relay_irc_signal_irc_disc_cb (const void *pointer, void *data, if (strcmp ((char *)signal_data, client->protocol_args) == 0) { + relay_irc_sendf (client, + ":%s ERROR :WeeChat: disconnected from server \"%s\"", + RELAY_IRC_DATA(client, address), + client->protocol_args); + relay_irc_sendf (client, + ":%s ERROR :Closing Link", + RELAY_IRC_DATA(client, address)); relay_client_set_status (client, RELAY_STATUS_DISCONNECTED); }