From dd751ea14d00708edcb0dd7ad1e72a9a7b8595eb Mon Sep 17 00:00:00 2001 From: mathieui Date: Wed, 18 Apr 2012 00:13:09 +0200 Subject: Do not split on command_version as it is unnecessary --- src/tabs.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') 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): -- cgit v1.2.3