power_users [#521]

This commit is contained in:
reality 2013-07-01 17:59:54 +00:00
parent e0ece997f8
commit 5a67f85ce1
2 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,7 @@
}, },
"admins": [ "batman" ], "admins": [ "batman" ],
"moderators": [ "whatever" ], "moderators": [ "whatever" ],
"power_users": [],
"moduleNames": [ "ignore", "admin", "command", "dice", "js", "kick", "quotes", "spelling", "youare", "timers", "stats", "users", "link" ], "moduleNames": [ "ignore", "admin", "command", "dice", "js", "kick", "quotes", "spelling", "youare", "timers", "stats", "users", "link" ],
"language": "en", "language": "en",
"debugMode": false, "debugMode": false,

View File

@ -23,6 +23,7 @@ var api = function(dbot) {
if(accessNeeded == 'admin' || accessNeeded == 'moderator') { if(accessNeeded == 'admin' || accessNeeded == 'moderator') {
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(!_.include(allowedNicks, user)) { if(!_.include(allowedNicks, user)) {
callback(false); callback(false);