From f1d30c9df2079ca59dbf3f52438b025f7db0a000 Mon Sep 17 00:00:00 2001 From: reality Date: Wed, 2 Jan 2013 21:58:52 +0000 Subject: [PATCH] fix replace user entry --- modules/users/users.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/users/users.js b/modules/users/users.js index df95052..62dad13 100644 --- a/modules/users/users.js +++ b/modules/users/users.js @@ -60,7 +60,8 @@ var users = function(dbot) { // Replace users entry with new primary user var usersIndex = knownUsers.users.indexOf(newAlias); - knownUsers.users[usersIndex] = newParent; + knownUsers.splice(usersIndex, 1); + knownUsers.users.push(newParent); // Remove alias for new parent & add alias for new alias delete knownUsers.aliases[newParent];