Make object hook more dynamic; ignoring unknown arguments

This commit is contained in:
Fabian Dill
2021-02-28 20:32:15 +01:00
parent 612c3c23c0
commit 1849693353
2 changed files with 30 additions and 29 deletions

View File

@@ -331,7 +331,7 @@ class Context(Node):
await on_client_disconnected(self, endpoint)
# separated out, due to compatibilty between clients
# separated out, due to compatibility between clients
def notify_hints(ctx: Context, team: int, hints: typing.List[Utils.Hint]):
cmd = ctx.dumper([{"cmd": "Hint", "hints" : hints}])
texts = ([format_hint(ctx, team, hint)] for hint in hints)
@@ -369,8 +369,6 @@ async def server(websocket, path, ctx: Context):
await ctx.disconnect(client)
async def on_client_connected(ctx: Context, client: Client):
await ctx.send_msgs(client, [{
'cmd': 'RoomInfo',