Fix unregistered channel permissions
This commit is contained in:
parent
930402a058
commit
6e1de10860
|
@ -3312,7 +3312,8 @@ Channel.prototype.sendAll = function (msg, data) {
|
|||
* Loads a special set of permissions for unregistered channels
|
||||
*/
|
||||
Channel.prototype.setUnregisteredPermissions = function () {
|
||||
this.permissions = {
|
||||
var perms = {
|
||||
seeplaylist: -1,
|
||||
playlistadd: -1, // Add video to the playlist
|
||||
playlistnext: 0,
|
||||
playlistmove: 0, // Move a video on the playlist
|
||||
|
@ -3341,7 +3342,13 @@ Channel.prototype.setUnregisteredPermissions = function () {
|
|||
drink: 0, // Use the /d command
|
||||
chat: 0 // Send chat messages
|
||||
};
|
||||
|
||||
for (var key in perms) {
|
||||
this.permissions[key] = perms[key];
|
||||
}
|
||||
|
||||
this.sendAll("setPermissions", this.permissions);
|
||||
this.setLock(false);
|
||||
}
|
||||
|
||||
module.exports = Channel;
|
||||
|
|
Loading…
Reference in a new issue