3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-28 05:32:50 +01:00

fix the chain

This commit is contained in:
reality 2013-09-07 18:12:02 +00:00
parent 6b9c7d6cf0
commit 17bd41d3ef

View File

@ -19,9 +19,14 @@ var api = function(dbot) {
if(accessNeeded == 'voice') {
allowedNicks = _.union(allowedNicks, dbot.config.moderators);
allowedNicks = _.union(allowedNicks, dbot.config.power_users);
allowedNicks = _.union(allowedNicks, _.filter(channel.nicks, function(nick) {
return nick.op == true || nick.voice == true;
}));
allowedNicks = _.union(allowedNicks,
_.chain(channel.nicks)
.filter(function(nick) {
return nick.op == true || nick.voice == true;
})
.pluck('name')
.value());
console.log(allowedNicks);
}
if(!_.include(allowedNicks, user.primaryNick)) {