oh whoops apparently I cant read

This commit is contained in:
Luke Slater 2012-06-24 23:30:11 +01:00
parent 2b48d1a555
commit 27bce53e2e

View File

@ -26,7 +26,13 @@ var kick = function(dbot) {
// who have kicked other people the most.
'~kickstats': function(event) {
var orderedKickLeague = function(list, topWhat) {
var kickArr = Object.keys(list);
var kickArr = [];
for(var kickUser in list) {
if(list.hasOwnProperty(kickUser)) {
kickArr.push([kickUser, list[kickUser]]);
}
}
kickArr = kickArr.sort(function(a, b) { return a[1] - b[1]; });
kickArr = kickArr.slice(kickArr.length - 10).reverse();
var kickString = "Top " + topWhat + ": ";