From 96670133041dc6c0f6dd3453b4e6e2ab38b92cdf Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Wed, 10 Dec 2014 18:53:51 +0100 Subject: =?UTF-8?q?Fix=20command=5Fname=E2=80=99s=20arguments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tabs/rostertab.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tabs/rostertab.py b/src/tabs/rostertab.py index 3fbeefb0..52a3a88c 100644 --- a/src/tabs/rostertab.py +++ b/src/tabs/rostertab.py @@ -77,7 +77,7 @@ class RosterInfoTab(Tab): desc=_('Add the specified JID to your roster, ask him to allow you to see his presence, and allow him to see your presence.'), shortdesc=_('Add an user to your roster.')) self.register_command('name', self.command_name, - usage=_(' '), + usage=_(' [name]'), shortdesc=_('Set the given JID\'s name.'), completion=self.completion_name) self.register_command('groupadd', self.command_groupadd, @@ -407,7 +407,7 @@ class RosterInfoTab(Tab): roster.modified() self.core.information('%s was added to the roster' % jid, 'Roster') - @command_args_parser.quoted(2) + @command_args_parser.quoted(1, 1) def command_name(self, args): """ Set a name for the specified JID in your roster @@ -416,7 +416,7 @@ class RosterInfoTab(Tab): if not iq: self.core.information('The name could not be set.', 'Error') log.debug('Error in /name:\n%s', iq) - if not args: + if args is None: return self.core.command_help('name') jid = safeJID(args[0]).bare name = args[1] if len(args) == 2 else '' -- cgit v1.2.3