From 7ef88523ca602e61ed2ad400bc9f20c16d204c80 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Wed, 1 Jan 2020 18:06:42 +0200 Subject: [PATCH] Ignore echoed ctcp requests that aren't targeted at us Fixes #3655 --- src/plugins/irc-events/ctcp.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/plugins/irc-events/ctcp.js b/src/plugins/irc-events/ctcp.js index aa4c8999..37ba2243 100644 --- a/src/plugins/irc-events/ctcp.js +++ b/src/plugins/irc-events/ctcp.js @@ -49,6 +49,16 @@ module.exports = function(irc, network) { "ctcp request", _.throttle( (data) => { + // Ignore echoed ctcp requests that aren't targeted at us + // See https://github.com/kiwiirc/irc-framework/issues/225 + if ( + data.nick === irc.user.nick && + data.nick !== data.target && + network.irc.network.cap.isEnabled("echo-message") + ) { + return; + } + const shouldIgnore = network.ignoreList.some(function(entry) { return Helper.compareHostmask(entry, data); });