mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Fix crash if a custom error message is provided to somethingWithoutSpaces
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
parent
c73ead8aef
commit
e421722960
@ -504,11 +504,12 @@ def getSomething(irc, msg, args, state, errorMsg=None, p=None):
|
|||||||
else:
|
else:
|
||||||
state.args.append(args.pop(0))
|
state.args.append(args.pop(0))
|
||||||
|
|
||||||
def getSomethingNoSpaces(irc, msg, args, state, *L):
|
def getSomethingNoSpaces(irc, msg, args, state, errorMsg=None):
|
||||||
def p(s):
|
def p(s):
|
||||||
return len(s.split(None, 1)) == 1
|
return len(s.split(None, 1)) == 1
|
||||||
errmsg = 'You must not give a string containing spaces as an argument.'
|
if errorMsg is None:
|
||||||
getSomething(irc, msg, args, state, p=p, errorMsg=errmsg, *L)
|
errorMsg='You must not give a string containing spaces as an argument.'
|
||||||
|
getSomething(irc, msg, args, state, errorMsg=errorMsg, p=p)
|
||||||
|
|
||||||
def private(irc, msg, args, state):
|
def private(irc, msg, args, state):
|
||||||
if irc.isChannel(msg.args[0]):
|
if irc.isChannel(msg.args[0]):
|
||||||
|
Loading…
Reference in New Issue
Block a user