fix replace user entry

This commit is contained in:
reality 2013-01-02 21:58:52 +00:00
parent 97d9869f4d
commit f1d30c9df2

View File

@ -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];