From b18d79b0a042acf46e1303aa23ecef66eea75394 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 2 Jun 2009 19:35:57 +0200 Subject: [PATCH] handle 210 status code in groupchat (Server changed our nickname) --- src/groupchat_control.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index e2dd6ab87..79d3a746e 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -1238,6 +1238,11 @@ class GroupchatControl(ChatControlBase): else: iter_ = self.get_contact_iter(nick) if not iter_: + if '210' in statusCode: + # Server changed our nick + self.nick = nick + s = _('You are now known as %s') % nick + self.print_conversation(s, 'info', tim=tim) iter_ = self.add_contact_to_roster(nick, show, role, affiliation, status, jid) newly_created = True