Fix chat commands, fix a few bugs

This commit is contained in:
calzoneman 2014-01-12 17:06:25 -06:00
parent 637ece4044
commit 0a087c6507
8 changed files with 63 additions and 35 deletions

View file

@ -448,6 +448,24 @@ Callbacks = {
formatCSBanlist();
},
banlistRemove: function (data) {
var entries = $("#cs-banlist table").data("entries") || [];
var found = false;
for (var i = 0; i < entries.length; i++) {
if (entries[i].id === data.id) {
found = i;
break;
}
}
if (found !== false) {
entries.splice(i, 1);
$("#cs-banlist table").data("entries", entries);
}
formatCSBanlist();
},
recentLogins: function(entries) {
var tbl = $("#loginhistory table");
// I originally added this check because of a race condition