Author: asterix Date: 2007-09-09 19:35:21 +0200 (Sun, 09 Sep 2007) New Revision: 8765
Modified: trunk/src/groupchat_control.py Log: [Maxime Ch?\195?\169ramy] /join room works. Gajim uses actual's MUC server.
Modified: trunk/src/groupchat_control.py =================================================================== --- trunk/src/groupchat_control.py 2007-09-09 17:28:50 UTC (rev 8764) +++ trunk/src/groupchat_control.py 2007-09-09 17:35:21 UTC (rev 8765) @@ -1290,29 +1290,26 @@ # example: /join room@conference.example.com/nick if len(message_array): room_jid = message_array[0] + if room_jid.find('@') < 0: + room_jid = room_jid + '@' + gajim.get_server_from_jid(self.room_jid) else: room_jid = '@' + gajim.get_server_from_jid(self.room_jid) - if room_jid.find('@') >= 0: - if room_jid.find('/') >= 0: - room_jid, nick = room_jid.split('/', 1) - else: - nick = '' - # join_gc window is needed in order to provide for password entry. - if gajim.interface.instances[self.account].has_key('join_gc'): - gajim.interface.instances[self.account]['join_gc'].\ - window.present() - else: - try: - gajim.interface.instances[self.account]['join_gc'] =\ - dialogs.JoinGroupchatWindow(self.account, - room_jid = room_jid, nick = nick) - except GajimGeneralException: - pass - self.clear(self.msg_textview) + if room_jid.find('/') >= 0: + room_jid, nick = room_jid.split('/', 1) else: - #%s is something the user wrote but it is not a jid so we inform - s = _('%s does not appear to be a valid JID') % message_array[0] - self.print_conversation(s, 'info') + nick = '' + # join_gc window is needed in order to provide for password entry. + if gajim.interface.instances[self.account].has_key('join_gc'): + gajim.interface.instances[self.account]['join_gc'].\ + window.present() + else: + try: + gajim.interface.instances[self.account]['join_gc'] =\ + dialogs.JoinGroupchatWindow(self.account, + room_jid = room_jid, nick = nick) + except GajimGeneralException: + pass + self.clear(self.msg_textview) return True elif command == 'leave' or command == 'part' or command == 'close': # Leave the room and close the tab or window