Fix nick changes wrongly reported

This commit is contained in:
Jérémie Astori 2017-11-29 01:44:19 -05:00
parent c9e340e153
commit e60bbd9548
No known key found for this signature in database
GPG Key ID: B9A4F245CD67BDE8

View File

@ -32,10 +32,6 @@ module.exports = function(irc, network) {
return; return;
} }
chan.removeUser(user);
user.nick = data.new_nick;
chan.setUser(user);
msg = new Msg({ msg = new Msg({
time: data.time, time: data.time,
from: user, from: user,
@ -45,7 +41,9 @@ module.exports = function(irc, network) {
}); });
chan.pushMessage(client, msg); chan.pushMessage(client, msg);
chan.removeUser(user);
user.nick = data.new_nick; user.nick = data.new_nick;
chan.setUser(user);
client.emit("users", { client.emit("users", {
chan: chan.id, chan: chan.id,