Add Client warning when forfeit is set to automatic and client can't send required information

This commit is contained in:
Fabian Dill 2021-01-04 22:41:18 +01:00
parent bd86a07115
commit e03841794b
1 changed files with 7 additions and 0 deletions

View File

@ -400,6 +400,13 @@ async def on_client_joined(ctx: Context, client: Client):
ctx.notify_all(
f"{ctx.get_aliased_name(client.team, client.slot)} (Team #{client.team + 1}) has joined the game. "
f"Client({version_str}), {client.tags}).")
if client.version < [2, 1, 0] and "auto" in ctx.forfeit_mode:
ctx.notify_client(
client,
"Your client is too old to send game beaten information. "
"The automatic forfeit feature will not work."
)
ctx.client_connection_timers[client.team, client.slot] = datetime.datetime.now(datetime.timezone.utc)
async def on_client_left(ctx: Context, client: Client):