commands.py: Fix error message of getSomethingWithoutSpaces.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
Valentin Lorentz 2013-07-16 20:20:08 +00:00 committed by James McCoy
parent 5b329df6f0
commit 960e1da61c

View File

@ -507,7 +507,8 @@ def getSomething(irc, msg, args, state, errorMsg=None, p=None):
def getSomethingNoSpaces(irc, msg, args, state, *L): def getSomethingNoSpaces(irc, msg, args, state, *L):
def p(s): def p(s):
return len(s.split(None, 1)) == 1 return len(s.split(None, 1)) == 1
getSomething(irc, msg, args, state, p=p, *L) errmsg = 'You must not give a string containing spaces as an argument.'
getSomething(irc, msg, args, state, p=p, errorMsg=errmsg, *L)
def private(irc, msg, args, state): def private(irc, msg, args, state):
if irc.isChannel(msg.args[0]): if irc.isChannel(msg.args[0]):