MultiServer: remove message that could never trigger in current protocol

This commit is contained in:
Fabian Dill 2021-07-12 15:40:31 +02:00
parent 768ae584d3
commit 50a21fbd74
1 changed files with 1 additions and 5 deletions

View File

@ -984,17 +984,13 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict):
cmd: str = args["cmd"]
except:
logging.exception(f"Could not get command from {args}")
await ctx.send_msgs(client, [{"cmd": "InvalidCmd", "text": f"Could not get command from {args} at `cmd`"}])
raise
if type(cmd) is not str:
await ctx.send_msgs(client, [{"cmd": "InvalidCmd", "text": f"Command should be str, got {type(cmd)}"}])
return
if args is not None and type(args) != dict:
await ctx.send_msgs(client, [{"cmd": "InvalidArguments",
'text': f'Expected Optional[dict], got {type(args)} for {cmd}'}])
return
if cmd == 'Connect':
if not args or 'password' not in args or type(args['password']) not in [str, type(None)] or \
'game' not in args: