From 930402a058c546fc7f09c90f83cb9a922cfafbe5 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Fri, 28 Feb 2014 13:49:17 -0600 Subject: [PATCH 1/3] Fix queueFail stacking --- www/js/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/js/util.js b/www/js/util.js index 6646866e..9ef263ab 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -1778,7 +1778,7 @@ function queueMessage(data, type) { title = "Warning"; } - var alerts = $(".qfalert.qf-" + type); + var alerts = $(".qfalert.qf-" + type + " .alert"); for (var i = 0; i < alerts.length; i++) { var al = $(alerts[i]); var cl = al.clone(); From 6e1de1086076c10872a04548eace2d16dd3371ec Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Fri, 28 Feb 2014 13:53:23 -0600 Subject: [PATCH 2/3] Fix unregistered channel permissions --- lib/channel.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/channel.js b/lib/channel.js index 61dd79c8..95e7fea8 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -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; From c93bc97a944304a88ed762ecaa73d2dc8f9d5345 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Fri, 28 Feb 2014 13:55:29 -0600 Subject: [PATCH 3/3] Hide channel settings button in chatonly for non mods --- www/js/util.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/js/util.js b/www/js/util.js index 9ef263ab..5f94e6d1 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -1502,11 +1502,13 @@ function chatOnly() { .appendTo($("#chatheader")) .click(showUserOptions); $("").addClass("label label-default pull-right pointer") + .attr("id", "showchansettings") .text("Channel Settings") .appendTo($("#chatheader")) .click(function () { $("#channeloptions").modal(); }); + setVisible("#showchansettings", CLIENT.rank >= 2); $("body").addClass("chatOnly"); resizeStuff(); }