From 9f8c5acf525754eda6025abe6333de81180ba595 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 21 Nov 2019 10:39:26 +0000 Subject: add a way to execute commands through bitbotd (use for master-password) --- src/Control.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Control.py') diff --git a/src/Control.py b/src/Control.py index 6f864303..ed5a5351 100644 --- a/src/Control.py +++ b/src/Control.py @@ -104,6 +104,13 @@ class Control(PollSource.PollSource): keepalive = False elif command == "stop": self._bot.stop() + elif command == "command" and data: + subcommand, _, data = data.partition(" ") + output = self._bot._events.on("control").on(subcommand + ).call_for_result(data=data) + if not output == None: + response_data = output + keepalive = False self._send_action(client, response_action, response_data, id) if not keepalive: -- cgit v1.3.1-10-gc9f91