mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
power_users [#521]
This commit is contained in:
parent
e0ece997f8
commit
5a67f85ce1
@ -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,
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user