3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-03 17:39:28 +01:00
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) { var kill_namespam = function(dbot) {
this.listener = function(event) { this.listener = function(event) {
if(event.channel == event.user) return; // return if pm 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', { var message = dbot.t('namespam_act', {
'user': event.user, 'user': event.user,
'channel': event.channel, 'channel': event.channel,
@ -19,8 +19,8 @@ var kill_namespam = function(dbot) {
switch(this.config.action) { switch(this.config.action) {
case kickban: case kickban:
dbot.api.kick.ban(event.server, event.host, event.channel) dbot.api.kick.ban(event.server, event.host, event.channel);
dbot.api.kick.kick(event.server, event.user, 'Nick highlight spam.' dbot.api.kick.kick(event.server, event.user, message);
break; break;
case kill: case kill:
dbot.api.kick.kill(event.server, event.user, message); dbot.api.kick.kill(event.server, event.user, message);