3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 12:29:26 +01:00

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" ],
"moderators": [ "whatever" ],
"power_users": [],
"moduleNames": [ "ignore", "admin", "command", "dice", "js", "kick", "quotes", "spelling", "youare", "timers", "stats", "users", "link" ],
"language": "en",
"debugMode": false,

View File

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