From 060092a53eeecbf59e3cf6f3d397f56e842f884e Mon Sep 17 00:00:00 2001 From: Thomas Prescott Date: Fri, 3 Mar 2023 21:55:02 -0600 Subject: [PATCH 1/3] add ability to disable forfeits --- MultiServer.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MultiServer.py b/MultiServer.py index 4108b8dd..cf9cd952 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -46,6 +46,9 @@ class Context: self.lookup_name_to_id = {} self.lookup_id_to_name = {} + self.disable_client_forfeit = False + + async def send_msgs(websocket, msgs): if not websocket or not websocket.open or websocket.closed: return @@ -281,6 +284,9 @@ async def process_client_cmd(ctx : Context, client : Client, cmd, args): if args.startswith('!players'): notify_all(ctx, get_connected_players_string(ctx)) if args.startswith('!forfeit'): + if ctx.disable_client_forfeit: + notify_client(client, 'Forfeit is currently disabled server-side.') + return forfeit_player(ctx, client.team, client.slot) if args.startswith('!countdown'): try: From 35e7784445dc2b67dd50a4393e10617b481094a9 Mon Sep 17 00:00:00 2001 From: Thomas Prescott Date: Mon, 6 Mar 2023 23:21:24 -0600 Subject: [PATCH 2/3] clarify forfeit disabled --- MultiServer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MultiServer.py b/MultiServer.py index cf9cd952..a9f9e9e2 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -285,9 +285,9 @@ async def process_client_cmd(ctx : Context, client : Client, cmd, args): notify_all(ctx, get_connected_players_string(ctx)) if args.startswith('!forfeit'): if ctx.disable_client_forfeit: - notify_client(client, 'Forfeit is currently disabled server-side.') - return - forfeit_player(ctx, client.team, client.slot) + notify_client(client, 'Client-initiated forfeits are disabled. Please ask the host of this game to forfeit on your behalf.') + else: + forfeit_player(ctx, client.team, client.slot) if args.startswith('!countdown'): try: timer = int(args.split()[1]) From 1bb4d5f03b7fa5a1dda2a9d1925abc9e27355078 Mon Sep 17 00:00:00 2001 From: aerinon Date: Thu, 9 Mar 2023 11:14:13 -0700 Subject: [PATCH 3/3] Version bump and note --- Main.py | 2 +- RELEASENOTES.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Main.py b/Main.py index 11138c65..7d3ae0eb 100644 --- a/Main.py +++ b/Main.py @@ -31,7 +31,7 @@ from Utils import output_path, parse_player_names from source.item.FillUtil import create_item_pool_config, massage_item_pool, district_item_pool_config from source.tools.BPS import create_bps_from_data -__version__ = '1.1.4-dev' +__version__ = '1.1.5-dev' from source.classes.BabelFish import BabelFish diff --git a/RELEASENOTES.md b/RELEASENOTES.md index fd66faff..4c65204f 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -181,6 +181,8 @@ Same as above but both small keys and bigs keys of the dungeon are not allowed o # Bug Fixes and Notes +* 1.1.5 + * MultiServer can not disable forfeits if desired * 1.1.4 * Removed a Triforce text * Fix for Desert Tiles 1 key door