From d7939a59ccf048308deda80f1027c4d41bf6a555 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Tue, 21 Oct 2014 15:08:55 +0000 Subject: [PATCH] changes --- modules/warning/pages.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/warning/pages.js b/modules/warning/pages.js index cb24623..9af21f5 100644 --- a/modules/warning/pages.js +++ b/modules/warning/pages.js @@ -10,6 +10,7 @@ var pages = function(dbot) { 'name': dbot.config.name, 'servers': _.keys(dbot.config.servers) }); +console.log('YE'); }, '/warning/:server': function(req, res) { @@ -42,9 +43,11 @@ var pages = function(dbot) { '/warning/:server/:uid': function(req, res) { var server = req.params.server, user = req.params.uid; +console.log('YE YE'); dbot.api.users.resolveUser(server, user, function(err, user) { var warnings = []; + if(user) { this.db.search('warnings', { 'server': server, 'warnee': user.id @@ -64,6 +67,7 @@ var pages = function(dbot) { }); }); }); + } }.bind(this)); } };