From 548d4977f230808b9f17eedddbcdad811087397f Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 25 Apr 2015 10:26:35 +0000 Subject: [PATCH] order --- modules/report/commands.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/report/commands.js b/modules/report/commands.js index 4e65b1e..7fc2b7e 100644 --- a/modules/report/commands.js +++ b/modules/report/commands.js @@ -125,11 +125,11 @@ 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) { + async.eachSeries(_.keys(items).sort(function(a, b) { return moment(a).unix() - moment(b).unix(); - }), function(time) { + }), function(time, next) { event.reply('[' + moment(parseInt(time)).format('DD/MM/YYYY') + '] ' + items[time]); - console.log('[' + moment(parseInt(time)).format('DD/MM/YYYY') + '] ' + items[time]); + setTimeout(next, 500); }); if(latest_ban.time != 0) {