add leave part close in muc_commands; add some fixmes

This commit is contained in:
Nikos Kouremenos 2005-08-01 14:07:16 +00:00
parent f9b4bb36fe
commit e3e1065e49
1 changed files with 6 additions and 2 deletions

View File

@ -45,8 +45,8 @@ class GroupchatWindow(chat.Chat):
chat.Chat.__init__(self, plugin, account, 'groupchat_window') chat.Chat.__init__(self, plugin, account, 'groupchat_window')
# alphanum sorted # alphanum sorted
self.muc_cmds = ['ban', 'chat', 'clear', 'compact', 'kick', self.muc_cmds = ['ban', 'chat', 'clear', 'close', 'compact', 'kick',
'me', 'msg', 'nick', 'topic'] 'leave', 'me', 'msg', 'nick', 'part', 'topic']
self.nicks = {} # our nick for each groupchat we are in self.nicks = {} # our nick for each groupchat we are in
gajim.gc_contacts[account] = {} # contact instances for each room gajim.gc_contacts[account] = {} # contact instances for each room
@ -626,9 +626,13 @@ class GroupchatWindow(chat.Chat):
self.print_conversation(self.subjects[room_jid], room_jid) self.print_conversation(self.subjects[room_jid], room_jid)
return # don't print the command return # don't print the command
#FIXME: we lack /join to adhere to JEP
elif message.startswith('/leave') or message.startswith('/part')\ elif message.startswith('/leave') or message.startswith('/part')\
or message.startswith('/close'): or message.startswith('/close'):
# close current tab # close current tab
#FIXME: accept optional reason (pas in status msg for this room)
# see JEP
room_jid = self.get_active_jid() room_jid = self.get_active_jid()
self.remove_tab(room_jid) self.remove_tab(room_jid)
return # don't print the command return # don't print the command