!fwait: Allow arbitrary wait durations

We indeed don't have all day, but people with access to fwait should
know as much already anyway. Additionally, this interfered with undoing
a long fwait; !fwait 9999 was possible, !fwait -9999 was not.
This commit is contained in:
Janik Kleinhoff 2014-10-26 02:10:52 +01:00
parent 52b0ea061c
commit 5965848bcf

View File

@ -5194,11 +5194,7 @@ def fwait(cli, nick, chann_, rest):
rest = re.split(" +", rest.strip(), 1)[0] rest = re.split(" +", rest.strip(), 1)[0]
if rest and (rest.isdigit() or (rest[0] == '-' and rest[1:].isdigit())): if rest and (rest.isdigit() or (rest[0] == '-' and rest[1:].isdigit())):
if len(rest) < 4: extra = int(rest)
extra = int(rest)
else:
cli.msg(chan, "{0}: We don't have all day!".format(nick))
return
else: else:
extra = var.EXTRA_WAIT extra = var.EXTRA_WAIT