From 709cd085a978b66c8c8447143a387ccfbe9c83b5 Mon Sep 17 00:00:00 2001 From: reality Date: Fri, 16 Feb 2018 14:29:17 +0000 Subject: [PATCH] add content kills --- modules/kill_namespam/kill_namespam.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/kill_namespam/kill_namespam.js b/modules/kill_namespam/kill_namespam.js index dd7cbb0..a0190d1 100644 --- a/modules/kill_namespam/kill_namespam.js +++ b/modules/kill_namespam/kill_namespam.js @@ -14,12 +14,13 @@ var kill_namespam = function(dbot) { var message; // Check distinctive spam content match - if(_.any(this.config.advert_content, function(spam) { return event.message.match(spam); })) { + if(_.any(this.config.advert_content, function(spam) { return event.message.indexOf(spam) != -1; })) { message = dbot.t('spamcont_act', { 'user': event.user, 'channel': event.channel, 'action': this.config.action }); + naughty = true; } // Name highlight spam @@ -30,6 +31,7 @@ var kill_namespam = function(dbot) { 'action': this.config.action, 'sensitivity': this.config.sensitivity }); + naughty = true; } if(naughty) {