Fixes; implement /clear command

This commit is contained in:
calzoneman 2013-05-23 00:03:37 -04:00
parent 4e364f45a6
commit a5c297365c
6 changed files with 23 additions and 15 deletions

View file

@ -186,13 +186,6 @@ Callbacks = {
},
channelOpts: function(opts) {
$("#opt_qopen_allow_anon").prop("checked", opts.qopen_allow_anon);
$("#opt_qopen_allow_guest").prop("checked", opts.qopen_allow_guest);
$("#opt_qopen_allow_qnext").prop("checked", opts.qopen_allow_qnext);
$("#opt_qopen_allow_move").prop("checked", opts.qopen_allow_move);
$("#opt_qopen_allow_delete").prop("checked", opts.qopen_allow_delete);
$("#opt_qopen_allow_playnext").prop("checked", opts.qopen_allow_playnext);
$("#opt_qopen_temp").prop("checked", opts.qopen_temp);
$("#opt_pagetitle").attr("placeholder", opts.pagetitle);
document.title = opts.pagetitle;
PAGETITLE = opts.pagetitle;
@ -473,6 +466,10 @@ Callbacks = {
addChatMessage(data);
},
clearchat: function() {
$("#messagebuffer").html("");
},
userlist: function(data) {
$(".userlist_item").each(function() { $(this).remove(); });
for(var i = 0; i < data.length; i++) {

View file

@ -1154,10 +1154,9 @@ function hasPermission(key) {
if(key.indexOf("playlist") == 0 && OPENQUEUE) {
var key2 = "o" + key;
var v = CHANPERMS[key2];
if(typeof v != "number") {
return false;
if(typeof v == "number" && RANK >= v) {
return true;
}
return RANK >= v;
}
var v = CHANPERMS[key];
if(typeof v != "number") {