summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-08-01 22:35:21 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-08-01 22:35:21 +0200
commit03daae30593a54c5945757aa271f47ebc7278a1b (patch)
tree6e3fdf5ae51d10820896aece5e517ea0358e8174
parentb0549e4d0930e5a1f11fa6468d6701d359f9d4d9 (diff)
downloadweechat-03daae30593a54c5945757aa271f47ebc7278a1b.zip
irc: fix display of outgoing notice with channel when capability "echo-message" is enabled (closes #1991)
-rw-r--r--ChangeLog.adoc1
-rw-r--r--src/plugins/irc/irc-protocol.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index 462611c03..298b2a31b 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -42,6 +42,7 @@ Bug fixes::
* irc: fix memory leak in IRC message parser
* irc: fix switch to channel manually joined when server option autojoin_dynamic is on and option irc.look.buffer_switch_autojoin is off (issue #1982)
* irc: add channel in "autojoin" server option only when the channel is actually joined (issue #1990)
+ * irc: fix display of outgoing notice with channel when capability "echo-message" is enabled (issue #1991)
* script: fix cursor position after `/script list -i` or `/script list -il`
* script: fix buffer used by command `/script list -i|-il|-o|-ol`
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 52bb8f0ff..1ff109e28 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -2537,8 +2537,11 @@ IRC_PROTOCOL_CALLBACK(notice)
is_channel = irc_channel_is_channel (server, pos_target);
is_channel_orig = is_channel;
if (is_channel)
+ {
channel = strdup (pos_target);
- else if (weechat_config_boolean (irc_config_look_notice_welcome_redirect))
+ }
+ else if (weechat_config_boolean (irc_config_look_notice_welcome_redirect)
+ && (irc_server_strcasecmp (server, server->nick, pos_target) == 0))
{
end_char = ' ';
switch (pos_args[0])