MultiServer: Split InvalidSlot out into InvalidGame and document all error codes.

This commit is contained in:
Fabian Dill
2021-09-17 04:32:09 +02:00
parent a82bf1bb32
commit b82e3f2a8a
3 changed files with 14 additions and 4 deletions

View File

@@ -1096,8 +1096,8 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict):
else:
team, slot = ctx.connect_names[args['name']]
game = ctx.games[slot]
if args['game'] != game:
errors.add('InvalidSlot')
if "IgnoreGame" in args["tags"] and args['game'] != game:
errors.add('InvalidGame')
# this can only ever be 0 or 1 elements
clients = [c for c in ctx.endpoints if c.auth and c.slot == slot and c.team == team]
if clients: