From e60bbd9548a8bc24985facf481b8e12db2b292fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Wed, 29 Nov 2017 01:44:19 -0500 Subject: [PATCH] Fix nick changes wrongly reported --- src/plugins/irc-events/nick.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plugins/irc-events/nick.js b/src/plugins/irc-events/nick.js index 3589453d..42ad216c 100644 --- a/src/plugins/irc-events/nick.js +++ b/src/plugins/irc-events/nick.js @@ -32,10 +32,6 @@ module.exports = function(irc, network) { return; } - chan.removeUser(user); - user.nick = data.new_nick; - chan.setUser(user); - msg = new Msg({ time: data.time, from: user, @@ -45,7 +41,9 @@ module.exports = function(irc, network) { }); chan.pushMessage(client, msg); + chan.removeUser(user); user.nick = data.new_nick; + chan.setUser(user); client.emit("users", { chan: chan.id,