From b8e3f13816839bf877e8be80eef846cc668bf901 Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 14 Mar 2015 09:54:41 +0000 Subject: [PATCH] i actually am an idiot --- modules/report/commands.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/report/commands.js b/modules/report/commands.js index bc1cb8a..02f3b5a 100644 --- a/modules/report/commands.js +++ b/modules/report/commands.js @@ -302,7 +302,9 @@ var commands = function(dbot) { if(host) { var results = []; this.db.scan('notifies', function(notify) { - console.log(notify); + if(notify && _.has(notify, 'host') && notify.host == host) { + results.push(notify.message); + } }, function() { event.reply(nick + ' has sought help ' + result.length + ' times under the host ' + notify.host); _.each(results, function(n) { @@ -318,7 +320,7 @@ var commands = function(dbot) { event.reply(out); }); } - }); + }.bind(this)); } }; commands['~report'].regex = /^report (#[^ ]+ )?([^ ]+) (.*)$/;