From 611f4d3fb28ccc47e7e3d0cfcb7926f28641e18e Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 8 Mar 2020 02:18:55 +0100 Subject: [PATCH] no longer try patching if it's the wrong rom. People ignore the warning. --- MultiClient.py | 2 +- MultiServer.py | 4 +++- Patch.py | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/MultiClient.py b/MultiClient.py index 7719c2bc..cef4dd99 100644 --- a/MultiClient.py +++ b/MultiClient.py @@ -747,7 +747,7 @@ async def server_auth(ctx: Context, password_requested): ctx.awaiting_rom = False ctx.auth = ctx.rom.copy() await send_msgs(ctx.socket, [['Connect', { - 'password': ctx.password, 'rom': ctx.auth, 'version': [1, 1, 0], 'tags': ['Berserker'] + 'password': ctx.password, 'rom': ctx.auth, 'version': [1, 2, 0], 'tags': ['Berserker'] }]]) async def console_input(ctx : Context): diff --git a/MultiServer.py b/MultiServer.py index 3bed3c05..5d485f89 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -170,7 +170,9 @@ async def on_client_disconnected(ctx: Context, client: Client): await on_client_left(ctx, client) async def on_client_joined(ctx: Context, client: Client): - notify_all(ctx, "%s (Team #%d) has joined the game" % (client.name, client.team + 1)) + notify_all(ctx, "%s (Team #%d) has joined the game. Client(%s, %s)." % (client.name, client.team + 1, + ".".join(str(x) for x in client.version), + client.tags)) async def on_client_left(ctx: Context, client: Client): notify_all(ctx, "%s (Team #%d) has left the game" % (client.name, client.team + 1)) diff --git a/Patch.py b/Patch.py index fec037e4..a404ff54 100644 --- a/Patch.py +++ b/Patch.py @@ -22,8 +22,8 @@ def get_base_rom_bytes() -> bytes: basemd5 = hashlib.md5() basemd5.update(base_rom_bytes) if JAP10HASH != basemd5.hexdigest(): - logging.warning('Supplied Base Rom does not match known MD5 for JAP(1.0) release.' - ' Will try to patch anyway.') + raise Exception('Supplied Base Rom does not match known MD5 for JAP(1.0) release. ' + 'Get the correct game and version, then dump it') return base_rom_bytes