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

mods can run pu commands

This commit is contained in:
reality 2013-07-26 11:59:37 +00:00
parent b54a5a5ccc
commit a99a421767

View File

@ -11,7 +11,10 @@ var api = function(dbot) {
if(accessNeeded == 'admin' || accessNeeded == 'moderator' || accessNeeded == 'power_user') {
var allowedNicks = dbot.config.admins;
if(accessNeeded == 'moderator') allowedNicks = _.union(allowedNicks, dbot.config.moderators);
if(accessNeeded == 'power_user') allowedNicks = _.union(allowedNicks, dbot.config.power_users);
if(accessNeeded == 'power_user') {
allowedNicks = _.union(allowedNicks, dbot.config.moderators);
allowedNicks = _.union(allowedNicks, dbot.config.power_users);
}
if(!_.include(allowedNicks, user.primaryNick)) {
callback(false);