handle 210 status code in groupchat (Server changed our nickname)

This commit is contained in:
Yann Leboulanger 2009-06-02 19:35:57 +02:00
parent e6efcebfa8
commit b18d79b0a0
1 changed files with 5 additions and 0 deletions

View File

@ -1238,6 +1238,11 @@ class GroupchatControl(ChatControlBase):
else: else:
iter_ = self.get_contact_iter(nick) iter_ = self.get_contact_iter(nick)
if not iter_: 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, iter_ = self.add_contact_to_roster(nick, show, role, affiliation,
status, jid) status, jid)
newly_created = True newly_created = True