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); }