From 42952a24e5e9c34f7971c9dcadd02ff302bb73b5 Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 25 Apr 2015 10:34:34 +0000 Subject: [PATCH] meh --- modules/report/commands.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/report/commands.js b/modules/report/commands.js index 805eea7..7aba249 100644 --- a/modules/report/commands.js +++ b/modules/report/commands.js @@ -126,12 +126,14 @@ var commands = function(dbot) { if(quiet != 0 || warn != 0 || report != 0) { event.reply(user.primaryNick + ' has been warned ' + warn + ' times, quieted ' + quiet + ' times, and reported ' + report + ' times.'); - _.each(_.keys(items).sort(function(a, b) { + var sTimes = _.keys(items).sort(function(a, b) { return moment(a).unix() - moment(b).unix(); - }), function(time) { + }); + + _.each(sTimes, function(time) { event.reply('[' + moment(parseInt(time)).format('DD/MM/YYYY') + '] ' + items[time]); }); - event.reply(_.keys(items).join(', ')); + event.reply(sTimes.join(', ')); if(latest_ban.time != 0) { if(latest_unban.time == 0 || (latest_unban.time < latest_ban.time)) {