Changeset 8710 for branches/gajim_0.11.1/src
- Timestamp:
- 09/04/07 20:38:33 (15 months ago)
- Location:
- branches/gajim_0.11.1/src
- Files:
-
- 2 modified
-
common/xmpp/protocol.py (modified) (1 diff)
-
groupchat_control.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11.1/src/common/xmpp/protocol.py
r8672 r8710 510 510 def getStatusCode(self): 511 511 """Returns the status code of the presence (for groupchat)""" 512 return self._muc_getItemAttr('status','code') 512 attrs = [] 513 for xtag in self.getTags('x'): 514 for child in xtag.getTags('status'): 515 attrs.append(child.getAttr('code')) 516 return attrs 513 517 514 518 class Iq(Protocol): -
branches/gajim_0.11.1/src/groupchat_control.py
r8709 r8710 838 838 fake_jid = self.room_jid + '/' + nick 839 839 newly_created = False 840 if '170' in statusCode: 841 self.print_conversation(_('Room logging is enabled'), 'info') 840 842 if show in ('offline', 'error'): 841 if statusCode == '307':843 if '307' in statusCode: 842 844 if actor is None: # do not print 'kicked by None' 843 845 s = _('%(nick)s has been kicked: %(reason)s') % { … … 850 852 'reason': reason } 851 853 self.print_conversation(s, 'info') 852 elif statusCode == '301':854 elif '301' in statusCode: 853 855 if actor is None: # do not print 'banned by None' 854 856 s = _('%(nick)s has been banned: %(reason)s') % { … … 861 863 'reason': reason } 862 864 self.print_conversation(s, 'info') 863 elif statusCode == '303': # Someone changed his or her nick865 elif '303' in statusCode: # Someone changed his or her nick 864 866 if nick == self.nick: # We changed our nick 865 867 self.nick = new_nick … … 903 905 c.show = show 904 906 c.status = status 905 if nick == self.nick and statusCode != '303': # We became offline907 if nick == self.nick and '303' not in statusCode: # We became offline 906 908 self.got_disconnected() 907 909 self.parent_win.redraw_tab(self) … … 912 914 status, jid) 913 915 newly_created = True 914 if statusCode == '201': # We just created the room916 if '201' in statusCode: # We just created the room 915 917 gajim.connections[self.account].request_gc_config(self.room_jid) 916 918 else: … … 965 967 self.parent_win.redraw_tab(self) 966 968 if (time.time() - self.room_creation) > 30 and \ 967 nick != self.nick and statusCode != '303':969 nick != self.nick and '303' not in statusCode: 968 970 st = '' 969 971 print_status = None … … 980 982 nick_jid += ' (%s)' % simple_jid 981 983 if show == 'offline' and print_status in ('all', 'in_and_out') and \ 982 statusCode != '307':984 '307' not in statusCode: 983 985 st = _('%s has left') % nick_jid 984 986 if reason:
