forked from GitHub/dbot
mods can run pu commands
This commit is contained in:
parent
b54a5a5ccc
commit
a99a421767
@ -11,7 +11,10 @@ var api = function(dbot) {
|
|||||||
if(accessNeeded == 'admin' || accessNeeded == 'moderator' || accessNeeded == 'power_user') {
|
if(accessNeeded == 'admin' || accessNeeded == 'moderator' || accessNeeded == 'power_user') {
|
||||||
var allowedNicks = dbot.config.admins;
|
var allowedNicks = dbot.config.admins;
|
||||||
if(accessNeeded == 'moderator') allowedNicks = _.union(allowedNicks, dbot.config.moderators);
|
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)) {
|
if(!_.include(allowedNicks, user.primaryNick)) {
|
||||||
callback(false);
|
callback(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user