MultiServer: fix IncompatibleVersion not triggering
This commit is contained in:
parent
fbd5bfd382
commit
26b336d6db
|
@ -1244,6 +1244,9 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict):
|
||||||
game = ctx.games[slot]
|
game = ctx.games[slot]
|
||||||
if "IgnoreGame" not in args["tags"] and args['game'] != game:
|
if "IgnoreGame" not in args["tags"] and args['game'] != game:
|
||||||
errors.add('InvalidGame')
|
errors.add('InvalidGame')
|
||||||
|
minver = ctx.minimum_client_versions[slot]
|
||||||
|
if minver > args['version']:
|
||||||
|
errors.add('IncompatibleVersion')
|
||||||
|
|
||||||
# only exact version match allowed
|
# only exact version match allowed
|
||||||
if ctx.compatibility == 0 and args['version'] != version_tuple:
|
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.auth = False # swapping Team/Slot
|
||||||
client.team = team
|
client.team = team
|
||||||
client.slot = slot
|
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.client_ids[client.team, client.slot] = args["uuid"]
|
||||||
ctx.clients[team][slot].append(client)
|
ctx.clients[team][slot].append(client)
|
||||||
client.version = args['version']
|
client.version = args['version']
|
||||||
|
|
|
@ -889,10 +889,10 @@ async def game_watcher(ctx: Context):
|
||||||
|
|
||||||
if not ctx.rom:
|
if not ctx.rom:
|
||||||
ctx.finished_game = False
|
ctx.finished_game = False
|
||||||
gameName = await snes_read(ctx, SM_ROMNAME_START, 2)
|
game_name = await snes_read(ctx, SM_ROMNAME_START, 2)
|
||||||
if gameName is None:
|
if game_name is None:
|
||||||
continue
|
continue
|
||||||
elif gameName == b"SM":
|
elif game_name == b"SM":
|
||||||
ctx.game = GAME_SM
|
ctx.game = GAME_SM
|
||||||
else:
|
else:
|
||||||
ctx.game = GAME_ALTTP
|
ctx.game = GAME_ALTTP
|
||||||
|
|
Loading…
Reference in New Issue