Require "!leave -force" to quit during a game
This commit is contained in:
parent
b67043d25f
commit
dccfd9de38
@ -238,7 +238,7 @@
|
||||
"player_missing": "\u0002{0}\u0002 has gone missing.",
|
||||
"leave_death": "\u0002{0}\u0002 died due to falling off a cliff. The \u0002{1}\u0002 is lost to the ravine forever.",
|
||||
"leave_death_no_reveal": "\u0002{0}\u0002 died due to falling off a cliff.",
|
||||
"quit_new_game": "The game already started! If you still want to quit, try again in {0} second{1}.",
|
||||
"leave_game_ingame_safeguard": "The game already started! If you still want to quit, use \"{0}leave -force\".",
|
||||
"static_quit": "\u0002{0}\u0002, a \u0002{1}\u0002, has died of an unknown disease.",
|
||||
"static_quit_no_reveal": "\u0002{0}\u0002 has died of an unknown disease.",
|
||||
"villagers_lynch": "The villagers must now vote for whom to lynch. Use \"{0}lynch <nick>\" to cast your vote. {1} votes are required to lynch.",
|
||||
|
@ -3639,16 +3639,14 @@ def leave_game(cli, nick, chan, rest):
|
||||
else:
|
||||
population = messages["new_player_count"].format(lpl)
|
||||
else:
|
||||
dur = int(var.START_QUIT_DELAY - (datetime.now() - var.GAME_START_TIME).total_seconds())
|
||||
if var.START_QUIT_DELAY and dur > 0:
|
||||
cli.notice(nick, messages["quit_new_game"].format(dur, "" if dur == 1 else "s"))
|
||||
if not rest.startswith("-force"):
|
||||
reply(cli, nick, chan, messages["leave_game_ingame_safeguard"].format(botconfig.CMD_CHAR), private=True)
|
||||
return
|
||||
population = ""
|
||||
elif chan == nick:
|
||||
if var.PHASE in var.GAME_PHASES and nick not in list_players() and nick in var.DEADCHAT_PLAYERS:
|
||||
leave_deadchat(cli, nick)
|
||||
return
|
||||
|
||||
else:
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user