Fix a bug with my last commits
This commit is contained in:
parent
3a1b83228d
commit
3087a66ccb
|
@ -889,6 +889,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
|
|
||||||
# statusCode
|
# statusCode
|
||||||
# http://www.xmpp.org/extensions/xep-0045.html#registrar-statuscodes-init
|
# http://www.xmpp.org/extensions/xep-0045.html#registrar-statuscodes-init
|
||||||
|
if statusCode:
|
||||||
if '100' in statusCode:
|
if '100' in statusCode:
|
||||||
# Can be a message (see handle_event_gc_config_change in gajim.py)
|
# Can be a message (see handle_event_gc_config_change in gajim.py)
|
||||||
self.print_conversation(\
|
self.print_conversation(\
|
||||||
|
@ -903,7 +904,8 @@ class GroupchatControl(ChatControlBase):
|
||||||
_('The server has assigned or modified your roomnick'))
|
_('The server has assigned or modified your roomnick'))
|
||||||
|
|
||||||
if show in ('offline', 'error'):
|
if show in ('offline', 'error'):
|
||||||
if '307' in statusCode:
|
if statusCode:
|
||||||
|
if statuscode '307' in statusCode:
|
||||||
if actor is None: # do not print 'kicked by None'
|
if actor is None: # do not print 'kicked by None'
|
||||||
s = _('%(nick)s has been kicked: %(reason)s') % {
|
s = _('%(nick)s has been kicked: %(reason)s') % {
|
||||||
'nick': nick,
|
'nick': nick,
|
||||||
|
@ -984,7 +986,8 @@ class GroupchatControl(ChatControlBase):
|
||||||
c = gajim.contacts.get_gc_contact(self.account, self.room_jid, nick)
|
c = gajim.contacts.get_gc_contact(self.account, self.room_jid, nick)
|
||||||
c.show = show
|
c.show = show
|
||||||
c.status = status
|
c.status = status
|
||||||
if nick == self.nick and '303' not in statusCode: # We became offline
|
if nick == self.nick and (not statusCode or \
|
||||||
|
'303' not in statusCode): # We became offline
|
||||||
self.got_disconnected()
|
self.got_disconnected()
|
||||||
contact = gajim.contacts.\
|
contact = gajim.contacts.\
|
||||||
get_contact_with_highest_priority(self.account, self.room_jid)
|
get_contact_with_highest_priority(self.account, self.room_jid)
|
||||||
|
@ -998,7 +1001,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
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
|
||||||
if '201' in statusCode: # We just created the room
|
if statusCode and '201' in statusCode: # We just created the room
|
||||||
gajim.connections[self.account].request_gc_config(self.room_jid)
|
gajim.connections[self.account].request_gc_config(self.room_jid)
|
||||||
else:
|
else:
|
||||||
gc_c = gajim.contacts.get_gc_contact(self.account, self.room_jid,
|
gc_c = gajim.contacts.get_gc_contact(self.account, self.room_jid,
|
||||||
|
@ -1051,7 +1054,8 @@ class GroupchatControl(ChatControlBase):
|
||||||
if self.parent_win:
|
if self.parent_win:
|
||||||
self.parent_win.redraw_tab(self)
|
self.parent_win.redraw_tab(self)
|
||||||
if (time.time() - self.room_creation) > 30 and \
|
if (time.time() - self.room_creation) > 30 and \
|
||||||
nick != self.nick and '303' not in statusCode:
|
nick != self.nick and (not statusCode or \
|
||||||
|
'303' not in statusCode):
|
||||||
st = ''
|
st = ''
|
||||||
print_status = None
|
print_status = None
|
||||||
for bookmark in gajim.connections[self.account].bookmarks:
|
for bookmark in gajim.connections[self.account].bookmarks:
|
||||||
|
@ -1069,7 +1073,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
if nick in self.attention_list:
|
if nick in self.attention_list:
|
||||||
self.attention_list.remove(nick)
|
self.attention_list.remove(nick)
|
||||||
if show == 'offline' and print_status in ('all', 'in_and_out') and \
|
if show == 'offline' and print_status in ('all', 'in_and_out') and \
|
||||||
'307' not in statusCode:
|
(not statusCode or '307' not in statusCode):
|
||||||
st = _('%s has left') % nick_jid
|
st = _('%s has left') % nick_jid
|
||||||
if reason:
|
if reason:
|
||||||
st += ' [%s]' % reason
|
st += ' [%s]' % reason
|
||||||
|
|
Loading…
Reference in New Issue