Add Client warning when forfeit is set to automatic and client can't send required information
This commit is contained in:
parent
bd86a07115
commit
e03841794b
|
@ -400,6 +400,13 @@ async def on_client_joined(ctx: Context, client: Client):
|
||||||
ctx.notify_all(
|
ctx.notify_all(
|
||||||
f"{ctx.get_aliased_name(client.team, client.slot)} (Team #{client.team + 1}) has joined the game. "
|
f"{ctx.get_aliased_name(client.team, client.slot)} (Team #{client.team + 1}) has joined the game. "
|
||||||
f"Client({version_str}), {client.tags}).")
|
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)
|
ctx.client_connection_timers[client.team, client.slot] = datetime.datetime.now(datetime.timezone.utc)
|
||||||
|
|
||||||
async def on_client_left(ctx: Context, client: Client):
|
async def on_client_left(ctx: Context, client: Client):
|
||||||
|
|
Loading…
Reference in New Issue