Author: roidelapluie Date: 2007-07-19 13:54:15 +0200 (Thu, 19 Jul 2007) New Revision: 8411
Modified: trunk/src/gajim.py trunk/src/groupchat_control.py Log: Beter handling of status codes. See #3270. http://www.xmpp.org/extensions/xep-0045.html#registrar-statuscodes-init
Modified: trunk/src/gajim.py =================================================================== --- trunk/src/gajim.py 2007-07-19 10:06:59 UTC (rev 8410) +++ trunk/src/gajim.py 2007-07-19 11:54:15 UTC (rev 8411) @@ -1213,6 +1213,7 @@ def handle_event_gc_config_change(self, account, array): #('GC_CONFIG_CHANGE', account, (jid, statusCode)) statuscode is a list # http://www.xmpp.org/extensions/xep-0045.html#roomconfig-notify + # http://www.xmpp.org/extensions/xep-0045.html#registrar-statuscodes-init jid = array[0] statusCode = array[1]
@@ -1224,6 +1225,13 @@ return
changes = [] + if '102' in statusCode: + changes.append(_('Room now shows unavailable member')) + if '103' in statusCode: + changes.append(_('room now does not show unavailable members')) + if '104' in statusCode: + changes.append(\ + _('A non-privacy-related room configuration change has occurred')) if '170' in statusCode: changes.append(_('Room logging is now enabled')) if '171' in statusCode: @@ -1234,8 +1242,6 @@ changes.append(_('Room is now semi-anonymous')) if '174' in statusCode: changes.append(_('Room is now fully-anonymous')) - if '104' in statusCode: - changes.append(_('Room configuration has changed'))
for change in changes: gc_control.print_conversation(change)
Modified: trunk/src/groupchat_control.py =================================================================== --- trunk/src/groupchat_control.py 2007-07-19 10:06:59 UTC (rev 8410) +++ trunk/src/groupchat_control.py 2007-07-19 11:54:15 UTC (rev 8411) @@ -886,8 +886,20 @@ affiliation = 'none' fake_jid = self.room_jid + '/' + nick newly_created = False + + # statusCode + # http://www.xmpp.org/extensions/xep-0045.html#registrar-statuscodes-init + if '100' in statusCode: + self.print_conversation(\ + _('Any occupant is allowed to see your full JID')) if '170' in statusCode: self.print_conversation(_('Room logging is enabled')) + if '201' in statusCode: + self.print_conversation(_('A new room has been created')) + if '210' in statusCode: + self.print_conversation(\ + _('The server has assigned or modified your roomnick')) + if show in ('offline', 'error'): if '307' in statusCode: if actor is None: # do not print 'kicked by None'