3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 14:29:29 +01:00

fix all ban

This commit is contained in:
reality 2017-07-18 14:28:42 +00:00
parent 1f0e13bd2a
commit d37326c88e

View File

@ -19,7 +19,7 @@ var ignore = function(dbot) {
if(_.has(dbot.commands, item) && !_.include(ignores[by], item)) { if(_.has(dbot.commands, item) && !_.include(ignores[by], item)) {
item = dbot.commands[item].module; item = dbot.commands[item].module;
} }
if(_.include(ignores[by], item)) { if(_.include(ignores[by], item) || _.include(ignores[by], '*')) {
isImpeded = true; isImpeded = true;
} }
} }
@ -113,7 +113,7 @@ var ignore = function(dbot) {
var nick = event.input[1], var nick = event.input[1],
item = event.input[2]; item = event.input[2];
if(module == '*' || _.include(dbot.config.moduleNames, item) || _.include(dbot.commands, item)) { if(item == '*' || _.include(dbot.config.moduleNames, item) || _.include(dbot.commands, item)) {
dbot.api.users.resolveUser(event.server, nick, function(err, user) { dbot.api.users.resolveUser(event.server, nick, function(err, user) {
this.api.getUserIgnores(user, function(err, ignores) { this.api.getUserIgnores(user, function(err, ignores) {
if(!ignores) { if(!ignores) {