more fixes

This commit is contained in:
Calvin Montgomery 2013-06-24 23:40:42 -04:00
parent 8b0a960440
commit dc7eeed360
2 changed files with 9 additions and 2 deletions

View file

@ -72,6 +72,12 @@ function handle(chan, user, msg, data) {
}
else if(msg.indexOf("/d") == 0 && msg.length > 2 &&
msg[2].match(/[-0-9 ]/)) {
if(msg[2] == "-") {
if(msg.length == 3)
return;
if(!msg[3].match(/[0-9]/))
return;
}
handleDrink(chan, user, msg.substring(2), data);
}
else if(msg.indexOf("/clear") == 0) {

View file

@ -71,10 +71,11 @@ $("#listloaded_refresh").click(function() {
menuHandler("#show_actionlog", "#actionlog");
$("#show_actionlog").click(getActionLog);
$("#actionlog_filter").click(function() {
var tbl = $("#actionlog table");
var actions = $(this).val();
$("#actionlog tbody").remove();
var entries = [];
$("#actionlog table").data("allentries").forEach(function(e) {
tbl.data("allentries").forEach(function(e) {
if(actions.indexOf(e.action) == -1)
return;
entries.push(e);
@ -398,7 +399,7 @@ function setupCallbacks() {
var x = a.name, y = b.name;
return x == y ? 0 : (x < y ? -1 : 1);
}
return a.usercount < b.usercount ? -1 : 1;
return a.usercount < b.usercount ? 1 : -1;
});
var total = 0;
data.forEach(function(c) {