handle correctly when MUC server force us to change our nickname by sending a 303 error presence. Fixes #5055

This commit is contained in:
Yann Leboulanger 2009-07-09 18:22:41 +02:00
parent 002f33f2b7
commit e01cb71d8f
1 changed files with 3 additions and 2 deletions

View File

@ -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: