Allow players to join the game after being pinged.

Check for and enforce a minimum wait time when ping command is used
to avoid leaving players behind after pinging them.
This commit is contained in:
zamabe 2012-02-20 14:49:27 -06:00
parent 776be63679
commit fbaeb31455
2 changed files with 5 additions and 0 deletions

View File

@ -272,6 +272,10 @@ def pinger(cli, nick, chan, rest):
cli.msg(chan, "PING! "+" ".join(TO_PING)) cli.msg(chan, "PING! "+" ".join(TO_PING))
var.PINGING = False var.PINGING = False
minimum = datetime.now() + timedelta(seconds=var.PING_MIN_WAIT)
if var.CAN_START_TIME < minimum:
var.CAN_START_TIME = minimum
decorators.unhook(HOOKS, 800) decorators.unhook(HOOKS, 800)

View File

@ -1,4 +1,5 @@
PING_WAIT = 300 # Seconds PING_WAIT = 300 # Seconds
PING_MIN_WAIT = 30
MINIMUM_WAIT = 60 MINIMUM_WAIT = 60
EXTRA_WAIT = 20 EXTRA_WAIT = 20
MAXIMUM_WAITED = 2 # limit for amount of !wait's MAXIMUM_WAITED = 2 # limit for amount of !wait's