This commit is contained in:
reality 2018-02-16 13:19:12 +00:00
parent 8310dc38ff
commit 0da6af229f

View File

@ -9,7 +9,7 @@ var _ = require('underscore')._;
var kill_namespam = function(dbot) {
this.listener = function(event) {
if(event.channel == event.user) return; // return if pm
if(_.filter(event.message.split(' '), function(word) { return _.has(event.channel.nicks, word); }.length > this.config.sensitivity) {
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,
'channel': event.channel,
@ -19,8 +19,8 @@ var kill_namespam = function(dbot) {
switch(this.config.action) {
case kickban:
dbot.api.kick.ban(event.server, event.host, event.channel)
dbot.api.kick.kick(event.server, event.user, 'Nick highlight spam.'
dbot.api.kick.ban(event.server, event.host, event.channel);
dbot.api.kick.kick(event.server, event.user, message);
break;
case kill:
dbot.api.kick.kill(event.server, event.user, message);