Browse Source

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.
master
zamabe 13 years ago
parent
commit
603f955a00
  1. 4
      modules/wolfgame.py
  2. 1
      settings/wolfgame.py

4
modules/wolfgame.py

@ -273,6 +273,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)
cli.who(chan) cli.who(chan)

1
settings/wolfgame.py

@ -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

Loading…
Cancel
Save