From e01cb71d8fffb38051e8d2987f526bd45374511e Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 9 Jul 2009 18:22:41 +0200 Subject: [PATCH] handle correctly when MUC server force us to change our nickname by sending a 303 error presence. Fixes #5055 --- src/groupchat_control.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 2f842d5bc..988584bd6 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -1167,8 +1167,9 @@ class GroupchatControl(ChatControlBase): 'reason': reason } self.print_conversation(s, 'info', tim=tim) elif '303' in statusCode: # Someone changed his or her nick - if new_nick == self.new_nick: # We changed our nick - self.nick = self.new_nick + if new_nick == self.new_nick or nick == self.nick: + # We changed our nick + self.nick = new_nick self.new_nick = '' s = _('You are now known as %s') % new_nick else: