diff --git a/modules/command/api.js b/modules/command/api.js index 4abaa9b..5fb8aa4 100644 --- a/modules/command/api.js +++ b/modules/command/api.js @@ -21,7 +21,10 @@ var api = function(dbot) { var accessNeeded = dbot.commands[command].access; if(accessNeeded == 'admin' || accessNeeded == 'moderator') { - if(!_.include(dbot.config[accessNeeded + 's'], user)) { // lol + var allowedNicks = dbot.config.admins; + if(accessNeeded == 'moderator') allowedNicks = _.union(allowedNicks, dbot.config.moderators); + + if(!_.include(allowedNicks, user)) { callback(false); } else { if(_.has(dbot.modules, 'nickserv') && this.config.useNickserv == true) {