From b01fce2cc84b4fd51c6529f2c6d1f15ac799080a Mon Sep 17 00:00:00 2001 From: reality Date: Wed, 23 Oct 2013 11:41:22 +0000 Subject: [PATCH] [Close #595] --- modules/users/commands.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/users/commands.js b/modules/users/commands.js index 5ba8997..05a04c2 100644 --- a/modules/users/commands.js +++ b/modules/users/commands.js @@ -172,6 +172,9 @@ var commands = function(dbot) { this.db.save('user_redirs', oldUser.id, user.id, function() {}); this.db.save('users', user.id, user, function(err) { if(!err) { + if(_.has(this.userCache, event.server) && _.has(this.userCache[event.server], oldUser.currentNick)) { + delete this.userCache[event.server][oldUser.currentNick]; + } event.reply(dbot.t('merged_users', { 'old_user': secondaryUser, 'new_user': primaryUser