From 3bb54a480803dcef5aead6ec6a2a7fe43af1f886 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 19 Aug 2018 10:19:36 +0100 Subject: [PATCH] upate IRCUser.id when a user changes their nickname --- IRCServer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/IRCServer.py b/IRCServer.py index a43960ac..c53cc5fd 100644 --- a/IRCServer.py +++ b/IRCServer.py @@ -132,7 +132,9 @@ class Server(object): channel.remove_user(user) def change_user_nickname(self, old_nickname, new_nickname): - self.users[new_nickname.lower()] = self.users.pop(old_nickname.lower()) + user = self.users.pop(old_nickname.lower()) + user.id = self.get_user_id(new_nickname) + self.users[new_nickname.lower()] = user def has_channel(self, channel_name): return channel_name[0] in self.channel_types and channel_name.lower( ) in self.channels