From c412ad0b23ecbe010b570a638b7fddcb1417481b Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 19 Jan 2015 22:30:04 +0000 Subject: [PATCH] revert --- modules/report/commands.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/report/commands.js b/modules/report/commands.js index 2f9db76..615fe8a 100644 --- a/modules/report/commands.js +++ b/modules/report/commands.js @@ -1,6 +1,5 @@ var _ = require('underscore')._, - moment = require('moment'), - async = require('async'); + moment = require('moment'); var commands = function(dbot) { var commands = { @@ -114,12 +113,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.'); - async.eachSeries(_.keys(items).sort(function(a, b) { + _.each(_.keys(items).sort(function(a, b) { return parseInt(new Date(a).getTime()) - parseInt(new Date(b).getTime()); - }), function(time, next) { + }), function(time) { event.reply('[' + moment(parseInt(time)).format('DD/MM/YYYY') + '] ' + items[time]); - setTimeout(next, 1000); - }, function(){}); + }); if(ban) { event.reply(user.primaryNick + ' was banned on ' + new Date(ban).toUTCString());