diff --git a/MultiServer.py b/MultiServer.py index ce132e93..88a4a4f0 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -1244,6 +1244,9 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict): game = ctx.games[slot] if "IgnoreGame" not in args["tags"] and args['game'] != game: errors.add('InvalidGame') + minver = ctx.minimum_client_versions[slot] + if minver > args['version']: + errors.add('IncompatibleVersion') # only exact version match allowed if ctx.compatibility == 0 and args['version'] != version_tuple: @@ -1259,9 +1262,7 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict): client.auth = False # swapping Team/Slot client.team = team client.slot = slot - minver = ctx.minimum_client_versions[slot] - if minver > args['version']: - errors.add('IncompatibleVersion') + ctx.client_ids[client.team, client.slot] = args["uuid"] ctx.clients[team][slot].append(client) client.version = args['version'] diff --git a/SNIClient.py b/SNIClient.py index 121e3653..a4f9ba2c 100644 --- a/SNIClient.py +++ b/SNIClient.py @@ -889,10 +889,10 @@ async def game_watcher(ctx: Context): if not ctx.rom: ctx.finished_game = False - gameName = await snes_read(ctx, SM_ROMNAME_START, 2) - if gameName is None: + game_name = await snes_read(ctx, SM_ROMNAME_START, 2) + if game_name is None: continue - elif gameName == b"SM": + elif game_name == b"SM": ctx.game = GAME_SM else: ctx.game = GAME_ALTTP