mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Somehow the p-testing was removed.
This commit is contained in:
parent
5fc347f3f0
commit
803997ee78
@ -169,6 +169,9 @@ def _int(s):
|
|||||||
def getInt(irc, msg, args, state, type='integer', p=None):
|
def getInt(irc, msg, args, state, type='integer', p=None):
|
||||||
try:
|
try:
|
||||||
i = _int(args[0])
|
i = _int(args[0])
|
||||||
|
if p is not None:
|
||||||
|
if not p(i):
|
||||||
|
irc.errorInvalid(type, args[0])
|
||||||
state.args.append(i)
|
state.args.append(i)
|
||||||
del args[0]
|
del args[0]
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
Loading…
Reference in New Issue
Block a user