summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-09-25 19:30:09 +0200
committerFlorent Le Coz <louiz@louiz.org>2011-09-25 19:30:09 +0200
commit7ee5f251d927a5e0d5da352810e7686b56eb2b57 (patch)
treeaec5a5ff5926a1c2820e9031697e83bea980ad8d /src
parent8d67fbf133b1c9fd59325915f89888be31a5eec4 (diff)
downloadpoezio-7ee5f251d927a5e0d5da352810e7686b56eb2b57.tar.gz
poezio-7ee5f251d927a5e0d5da352810e7686b56eb2b57.tar.bz2
poezio-7ee5f251d927a5e0d5da352810e7686b56eb2b57.tar.xz
poezio-7ee5f251d927a5e0d5da352810e7686b56eb2b57.zip
Restaure that
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 88d8ad7f..2a7c3dc2 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -1002,6 +1002,7 @@ class PrivateTab(ChatTab):
#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.on = True
@@ -1033,6 +1034,21 @@ class PrivateTab(ChatTab):
"""
self.core.close_tab()
+ def command_version(self, arg):
+ """
+ /version
+ """
+ def callback(res):
+ if not res:
+ return self.core.information('Could not get the software version from %s' % (jid,), 'Warning')
+ version = '%s is running %s version %s on %s' % (jid,
+ res.get('name') or _('an unknown software'),
+ res.get('version') or _('unknown'),
+ res.get('os') or _('on an unknown platform'))
+ self.core.information(version, 'Info')
+ jid = self.get_room().name
+ self.core.xmpp.plugin['xep_0092'].get_version(jid, callback=callback)
+
def resize(self):
if self.core.information_win_size >= self.height-3 or not self.visible:
return