diff --git a/modules/users/users.js b/modules/users/users.js index 46fe1e8..17457e3 100644 --- a/modules/users/users.js +++ b/modules/users/users.js @@ -82,8 +82,12 @@ var users = function(dbot) { } } else if(event.action == 'NICK') { var newNick = event.params.substr(1); - if(!knownUsers.users.include(newNick)) { - knownUsers.aliases[newNick] = event.user; + if(knownUsers.aliases.hasOwnProperty(event.user)) { + knownUsers.aliases[newNick] = knownUsers.aliases[event.user]; + } else { + if(!knownUsers.users.include(newNick)) { + knownUsers.aliases[newNick] = event.user; + } } } },