Added adding to roles

This commit is contained in:
hydrabolt
2015-10-26 13:50:17 +00:00
parent 1de2c5e5be
commit 6a18740927
5 changed files with 95 additions and 3 deletions

View File

@@ -21,6 +21,12 @@ var Member = (function (_User) {
this.rawRoles = roles;
}
Member.prototype.addRole = function addRole(role) {
if (! ~this.rawRoles.indexOf(role)) {
this.rawRoles.push(role);
}
};
Member.prototype.permissionsIn = function permissionsIn(channel) {
if (channel.server.ownerID === this.id) {