summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-04-18 00:13:09 +0200
committermathieui <mathieui@mathieui.net>2012-04-18 00:13:09 +0200
commitdd751ea14d00708edcb0dd7ad1e72a9a7b8595eb (patch)
tree48745ec59784b5527293c064835ae72c78b64dc6 /src
parent13a9811cf6768a0819d6157468f07619ee4ca22b (diff)
downloadpoezio-dd751ea14d00708edcb0dd7ad1e72a9a7b8595eb.tar.gz
poezio-dd751ea14d00708edcb0dd7ad1e72a9a7b8595eb.tar.bz2
poezio-dd751ea14d00708edcb0dd7ad1e72a9a7b8595eb.tar.xz
poezio-dd751ea14d00708edcb0dd7ad1e72a9a7b8595eb.zip
Do not split on command_version as it is unnecessary
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/tabs.py b/src/tabs.py
index d0ade8f5..258b1bc8 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -770,18 +770,18 @@ class MucTab(ChatTab):
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'))
+ 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')
- args = common.shell_split(arg)
- if len(args) < 1:
- return
- if args[0] in [user.nick for user in self.users]:
- jid = self.name + '/' + args[0]
+ if not arg:
+ return self.command_help('version')
+ if arg in [user.nick for user in self.users]:
+ jid = JID(self.name)
+ jid.resource = arg
else:
- jid = args[0]
+ jid = JID(arg)
self.core.xmpp.plugin['xep_0092'].get_version(jid, callback=callback)
def command_nick(self, arg):