MultiServer: Validate CreateHints status arg #5408
This commit is contained in:
@@ -1961,6 +1961,16 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict):
|
|||||||
if not locations:
|
if not locations:
|
||||||
await ctx.send_msgs(client, [{"cmd": "InvalidPacket", "type": "arguments",
|
await ctx.send_msgs(client, [{"cmd": "InvalidPacket", "type": "arguments",
|
||||||
"text": "CreateHints: No locations specified.", "original_cmd": cmd}])
|
"text": "CreateHints: No locations specified.", "original_cmd": cmd}])
|
||||||
|
return
|
||||||
|
|
||||||
|
try:
|
||||||
|
status = HintStatus(status)
|
||||||
|
except ValueError as err:
|
||||||
|
await ctx.send_msgs(client,
|
||||||
|
[{"cmd": "InvalidPacket", "type": "arguments",
|
||||||
|
"text": f"Unknown Status: {err}",
|
||||||
|
"original_cmd": cmd}])
|
||||||
|
return
|
||||||
|
|
||||||
hints = []
|
hints = []
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user