3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-28 21:52:38 +01:00

fix some more mergeuser issues [#470]

This commit is contained in:
reality 2013-05-26 13:29:21 +00:00
parent f69f999118
commit d9850d19d5

View File

@ -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) {