forked from GitHub/dbot
power_users [#521]
This commit is contained in:
parent
e0ece997f8
commit
5a67f85ce1
@ -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,
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user