From 08b46b9a8becb4e9abff0a18e2e8a7e39f34bc1c Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 24 Aug 2013 18:54:42 +0000 Subject: [PATCH] fixthe entry issuething --- modules/report/pages.js | 2 +- modules/users/users.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/report/pages.js b/modules/report/pages.js index 2fdc542..d23f453 100644 --- a/modules/report/pages.js +++ b/modules/report/pages.js @@ -12,7 +12,7 @@ var pages = function(dbot) { '/notify/:server': function(req, res) { var server = req.params.server, userCount = {}, - users = []; + users = {}; this.db.scan('notifies', function(notify) { if(!_.has(userCount, notify.user)) { diff --git a/modules/users/users.js b/modules/users/users.js index ef444fa..5042e73 100644 --- a/modules/users/users.js +++ b/modules/users/users.js @@ -142,7 +142,10 @@ var users = function(dbot) { this.api.resolveUser(event.server, event.user, function(user) { if(!user) { this.internalAPI.createUser(event.server, - event.user, checkCurrentNick); + event.user, function (user) { + this.userCache[event.server][user.currentNick] = user.id; + checkCurrentNick(user); + }.bind(this)); } else { checkCurrentNick(user); }