From 40020684b8e84dde6de8722bdd0940249bdac369 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Tue, 13 Aug 2013 11:23:39 -0400 Subject: [PATCH] Restrict moderators too --- channel.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/channel.js b/channel.js index b0a8a6c6..c5d8af92 100644 --- a/channel.js +++ b/channel.js @@ -1159,9 +1159,16 @@ Channel.prototype.tryQueue = function(user, data) { return; } - if(user.rank < Rank.Moderator && this.playlist.count(data.id) > 10) { + var count = this.playlist.count(data.id); + + if(user.rank < Rank.Moderator && count > 5) { user.socket.emit("queueFail", "That video is already on the " + "playlist 10 times."); + return; + } else if(user.rank < Rank.Siteadmin && count > 20) { + user.socket.emit("queueFail", "That video is already on the " + + "playlist 20 times."); + return; } data.queueby = user ? user.name : "";