This commit is contained in:
reality 2018-02-16 13:44:47 +00:00
parent d7f212ea52
commit 510a02d08a
3 changed files with 4 additions and 2 deletions

View File

@ -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) {

View File

@ -1,4 +1,5 @@
{
"action": "kill",
"sensitivity": 10
"sensitivity": 10,
"exempt": []
}

View File

@ -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,