From 24dda3ff25603f81a178cc157dd002d5d7f3feda Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sun, 25 Sep 2011 19:31:42 +0200 Subject: and that --- src/tabs.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/tabs.py b/src/tabs.py index 2a7c3dc2..f46087fd 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -999,11 +999,12 @@ class PrivateTab(ChatTab): # keys self.key_func['^I'] = self.completion # commands - #self.commands['info'] = (self.command_info, _('Usage: /info\nInfo: Display some information about the user in the MUC: '), None) + self.commands['info'] = (self.command_info, _('Usage: /info\nInfo: Display some information about the user in the MUC: '), None) self.commands['unquery'] = (self.command_unquery, _("Usage: /unquery\nUnquery: close the tab"), None) self.commands['part'] = (self.command_unquery, _("Usage: /part\nPart: close the tab"), None) self.commands['version'] = (self.command_version, _('Usage: /version\nVersion: get the software version of the current interlocutor (usually its XMPP client and Operating System)'), None) self.resize() + self.parent_muc = self.core.get_tab_by_name(JID(room.name).bare, MucTab) self.on = True def completion(self): @@ -1049,6 +1050,16 @@ class PrivateTab(ChatTab): jid = self.get_room().name self.core.xmpp.plugin['xep_0092'].get_version(jid, callback=callback) + def command_info(self, arg): + """ + /info + """ + if arg: + self.parent_muc.command_info(arg) + else: + user = JID(self.get_room().name).resource + self.parent_muc.command_info(user) + def resize(self): if self.core.information_win_size >= self.height-3 or not self.visible: return -- cgit v1.2.3