From 510a02d08a93c6885a22d2d99efbb153d175c22a Mon Sep 17 00:00:00 2001 From: reality Date: Fri, 16 Feb 2018 13:44:47 +0000 Subject: [PATCH] exempt --- modules/kick/kick.js | 2 +- modules/kill_namespam/config.json | 3 ++- modules/kill_namespam/kill_namespam.js | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/kick/kick.js b/modules/kick/kick.js index f65ba9f..890e637 100644 --- a/modules/kick/kick.js +++ b/modules/kick/kick.js @@ -32,7 +32,7 @@ var kick = function(dbot) { }, 'kill': function(server, user, reason) { - dbot.instance.connections[server].send('kill ' + user + ' :' + reason); + dbot.instance.connections[server].send('kill ' + user + ' ' + reason); }, 'unban': function(server, host, channel) { diff --git a/modules/kill_namespam/config.json b/modules/kill_namespam/config.json index 63cf774..d73efe8 100644 --- a/modules/kill_namespam/config.json +++ b/modules/kill_namespam/config.json @@ -1,4 +1,5 @@ { "action": "kill", - "sensitivity": 10 + "sensitivity": 10, + "exempt": [] } diff --git a/modules/kill_namespam/kill_namespam.js b/modules/kill_namespam/kill_namespam.js index cf47d5e..21fd9f2 100644 --- a/modules/kill_namespam/kill_namespam.js +++ b/modules/kill_namespam/kill_namespam.js @@ -9,6 +9,7 @@ var _ = require('underscore')._; var kill_namespam = function(dbot) { this.listener = function(event) { if(event.channel == event.user) return; // return if pm + if(_.includes(this.config.exempt, event.user)) return; if(_.filter(event.message.split(' '), function(word) { return _.has(event.channel.nicks, word); }).length > this.config.sensitivity) { var message = dbot.t('namespam_act', { 'user': event.user,