Merge pull request #3656 from thelounge/xpaw/self-ctcp
Ignore echoed ctcp requests that aren't targeted at us
This commit is contained in:
commit
c6f77f0668
@ -49,6 +49,16 @@ module.exports = function(irc, network) {
|
|||||||
"ctcp request",
|
"ctcp request",
|
||||||
_.throttle(
|
_.throttle(
|
||||||
(data) => {
|
(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) {
|
const shouldIgnore = network.ignoreList.some(function(entry) {
|
||||||
return Helper.compareHostmask(entry, data);
|
return Helper.compareHostmask(entry, data);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user