forked from GitHub/dbot
*
This commit is contained in:
parent
801ca52ab7
commit
1d6e83b3c0
6
run.js
6
run.js
@ -85,15 +85,11 @@ DBot.prototype.reloadModules = function() {
|
||||
if(data.channel == this.name) data.channel = data.user;
|
||||
|
||||
if(this.commands.hasOwnProperty(params[0])) {
|
||||
if(this.moduleNames.include('admin') && (this.db.bans.hasOwnProperty(params[0]) || this.db.bans['*'].include(data.user))) {
|
||||
if(this.db.bans[params[0]].include(data.user) || this.db.bans['*'].include(data.user))
|
||||
if((this.db.bans.hasOwnProperty(params[0]) && this.db.bans[params[0]].include(data.user)) || this.db.bans['*'].include(data.user))
|
||||
this.say(data.channel, data.user + ' is banned from using this command. Commence incineration.');
|
||||
else {
|
||||
this.commands[params[0]](data, params);
|
||||
}
|
||||
} else {
|
||||
this.commands[params[0]](data, params);
|
||||
}
|
||||
this.save();
|
||||
} else {
|
||||
var q = data.message.valMatch(/^~([\d\w\s]*)/, 2);
|
||||
|
Loading…
Reference in New Issue
Block a user