Disallow !quit immediately after starting to avoid accidents

This commit is contained in:
Janik Kleinhoff 2015-01-01 05:20:52 +00:00
parent 7d509e7c1d
commit 09b5a62a9b
2 changed files with 5 additions and 0 deletions

View File

@ -2731,6 +2731,10 @@ def leave_game(cli, nick, chan, rest):
else:
population = (" New player count: \u0002{0}\u0002").format(lpl)
else:
dur = (datetime.now() - var.GAME_START_TIME).total_seconds()
if var.START_QUIT_DELAY and dur < var.START_QUIT_DELAY:
cli.notice(nick, "The game already started!")
return
population = ""
if nick not in var.list_players() or nick in var.DISCONNECTED.keys(): # not playing
cli.notice(nick, "You're not currently playing.")

View File

@ -39,6 +39,7 @@ PM_WARN_IDLE_TIME = 240
PART_GRACE_TIME = 30
QUIT_GRACE_TIME = 30
ACC_GRACE_TIME = 30
START_QUIT_DELAY = 10
# controls how many people it does in one /msg; only works for messages that are the same
MAX_PRIVMSG_TARGETS = 4
LEAVE_STASIS_PENALTY = 1