From d049ea753497a255e0554e37c4c81e15541ed08f Mon Sep 17 00:00:00 2001 From: mathieui Date: Wed, 18 Apr 2012 00:10:57 +0200 Subject: Do not split args in command_info as it is not needed --- src/tabs.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/tabs.py b/src/tabs.py index 9a8f3794..9f67ab29 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -693,18 +693,20 @@ class MucTab(ChatTab): self.input.refresh() def command_info(self, arg): - args = common.shell_split(arg) - if len(args) != 1: - return self.core.information("Info command takes only 1 argument") - user = self.get_user_by_name(args[0]) + """ + /info + """ + if not arg: + return self.command_help('info') + user = self.get_user_by_name(arg) if not user: - return self.core.information("Unknown user: %s" % args[0]) - info = '%s%s: show: %s, affiliation: %s, role: %s%s' % (args[0], - ' (%s)' % user.jid if user.jid else '', - user.show or 'Available', - user.role or 'None', - user.affiliation or 'None', - '\n%s' % user.status if user.status else '') + return self.core.information("Unknown user: %s" % arg) + info = '%s%s: show: %s, affiliation: %s, role: %s%s' % (arg, + ' (%s)' % user.jid if user.jid else '', + user.show or 'Available', + user.role or 'None', + user.affiliation or 'None', + '\n%s' % user.status if user.status else '') self.core.information(info, 'Info') def command_configure(self, arg): -- cgit v1.2.3