summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/irc/irc-protocol.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 4d1c1e41c..68f7422d4 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -3109,6 +3109,9 @@ IRC_PROTOCOL_CALLBACK(privmsg)
pos_target++;
}
+ cap_echo_message = weechat_hashtable_has_key (server->cap_list,
+ "echo-message");
+
/* receiver is a channel ? */
if (is_channel)
{
@@ -3233,8 +3236,6 @@ IRC_PROTOCOL_CALLBACK(privmsg)
/* CTCP to user */
if (msg_args[0] == '\01')
{
- cap_echo_message = weechat_hashtable_has_key (server->cap_list,
- "echo-message");
msg_already_received = weechat_hashtable_has_key (
server->echo_msg_recv, irc_message);
if (!msg_already_received && cap_echo_message)
@@ -3264,7 +3265,7 @@ IRC_PROTOCOL_CALLBACK(privmsg)
if (strcmp (ptr_channel->name, remote_nick) != 0)
irc_channel_pv_rename (server, ptr_channel, remote_nick);
}
- else if (!nick_is_me)
+ else if (!nick_is_me || !cap_echo_message)
{
ptr_channel = irc_channel_new (server,
IRC_CHANNEL_TYPE_PRIVATE,