diff --git a/channel.js b/channel.js index 0511eafc..3aba97ef 100644 --- a/channel.js +++ b/channel.js @@ -796,6 +796,9 @@ Channel.prototype.broadcastNewUser = function(user) { // Someone"s rank changed, or their leadership status changed Channel.prototype.broadcastRankUpdate = function(user) { + user.socket.emit("rank", { + rank: user.rank + }); this.sendAll("updateUser", { name: user.name, rank: user.rank, diff --git a/www/assets/js/callbacks.js b/www/assets/js/callbacks.js index 9a41e7c6..953ec79c 100644 --- a/www/assets/js/callbacks.js +++ b/www/assets/js/callbacks.js @@ -36,29 +36,8 @@ function initCallbacks() { }); socket.on("rank", function(data) { - if(data.rank >= Rank.Moderator) { - $("#playlist_controls").css("display", "block"); - $("#playlist_controls button").each(function() { - $(this).attr("disabled", false); - }); - $("#qlockbtn").css("display", "block"); - var poll = $("#pollcontainer .active"); - if(poll.length > 0) { - $("