From e048780cfcb15654c24a85df437d9e52251ee678 Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 20 Jan 2013 18:44:21 +0000 Subject: [PATCH] Fix for [#165]. Recommend deleting knownUsers db on running instances --- modules/users/users.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/users/users.js b/modules/users/users.js index 8bc6c68..c093cff 100644 --- a/modules/users/users.js +++ b/modules/users/users.js @@ -54,12 +54,8 @@ var users = function(dbot) { } } else if(event.action == 'NICK') { var newNick = event.params.substr(1); - if(_.has(knownUsers.aliases, event.user)) { - knownUsers.aliases[newNick] = knownUsers.aliases[event.user]; - } else { - if(!_.include(knownUsers.users, newNick)) { - knownUsers.aliases[newNick] = event.user; - } + if(!this.api.isKnownUser(newNick)) { + knownUsers.aliases[newNick] = this.api.resolveUser(event.server, event.user); } } }.bind(this);