1
0

add handling of plugin commands

This commit is contained in:
f321x
2025-03-06 11:43:50 +01:00
committed by ThomasV
parent 2763e14bb3
commit ae64583ebc
4 changed files with 112 additions and 27 deletions

View File

@@ -349,7 +349,9 @@ class CommandsServer(AuthenticatedServer):
async def run_cmdline(self, config_options):
cmdname = config_options['cmd']
cmd = known_commands[cmdname]
cmd = known_commands.get(cmdname)
if not cmd:
return f"unknown command: {cmdname}"
# arguments passed to function
args = [config_options.get(x) for x in cmd.params]
# decode json arguments