This commit is contained in:
reality 2015-01-19 22:30:04 +00:00
parent 52a5023ef7
commit c412ad0b23

View File

@ -1,6 +1,5 @@
var _ = require('underscore')._, var _ = require('underscore')._,
moment = require('moment'), moment = require('moment');
async = require('async');
var commands = function(dbot) { var commands = function(dbot) {
var commands = { var commands = {
@ -114,12 +113,11 @@ var commands = function(dbot) {
if(quiet != 0 || warn != 0 || report != 0) { if(quiet != 0 || warn != 0 || report != 0) {
event.reply(user.primaryNick + ' has been warned ' + warn + ' times, quieted ' + quiet + ' times, and reported ' + report + ' times.'); 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()); 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]); event.reply('[' + moment(parseInt(time)).format('DD/MM/YYYY') + '] ' + items[time]);
setTimeout(next, 1000); });
}, function(){});
if(ban) { if(ban) {
event.reply(user.primaryNick + ' was banned on ' + new Date(ban).toUTCString()); event.reply(user.primaryNick + ' was banned on ' + new Date(ban).toUTCString());