From 8070875937cf12a4004ae4b4b1c3222d2fc685a5 Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 14 Mar 2015 13:47:31 +0000 Subject: [PATCH] trix --- 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 cb19c4a..cb31c3e 100644 --- a/modules/report/commands.js +++ b/modules/report/commands.js @@ -85,8 +85,8 @@ var commands = function(dbot) { dbot.api.users.resolveUser(event.server, user, function(err, user) { if(user) { var ban = 0, - latest_ban = 0, - latest_unban = 0, + latest_ban = {'time':0}, + latest_unban = {'time':0}, unban = 0, quiet = 0, warn = 0, @@ -133,7 +133,7 @@ var commands = function(dbot) { }); if(latest_ban != 0) { - if(latest_unban == 0 || (latest_unban != 0 && latest_unban.time < latest_ban.time)) { + if(latest_unban.time == 0 || (latest_unban.time < latest_ban.time)) { event.reply('Current Ban Status: Banned for ' + moment(latest_ban.time).fromNow() + ' (since ' + moment(parseInt(latest_ban.time)).format('DD/MM/YYYY') + ')'); event.reply('Reason: ' + latest_ban.message); } else {