From d9850d19d54d85bc35c3ff04c0d1eb2d72695f6b Mon Sep 17 00:00:00 2001 From: reality Date: Sun, 26 May 2013 13:29:21 +0000 Subject: [PATCH] fix some more mergeuser issues [#470] --- modules/users/commands.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/users/commands.js b/modules/users/commands.js index ac78de1..1011249 100644 --- a/modules/users/commands.js +++ b/modules/users/commands.js @@ -95,9 +95,9 @@ var commands = function(dbot) { this.api.resolveUser(event.server, primaryUser, function(user) { if(user) { this.api.resolveUser(event.server, secondaryUser, function(oldUser) { - if(secondaryUser) { + if(oldUser) { user.aliases.push(oldUser.primaryNick); - user.aliases.concat(oldUser.aliases); + user.aliases = _.union(user.aliases, oldUser.aliases); this.internalAPI.mergeChannelUsers(event.server, oldUser, user); this.db.del('users', oldUser.id, function(err) { if(!err) {