aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar jesopo2019-11-21 10:39:26 +0000
committerGravatar jesopo2019-11-21 10:39:26 +0000
commit9f8c5acf525754eda6025abe6333de81180ba595 (patch)
tree09d9a620797ba0bfbd09ebf62635b9273b51e18c /src
parentsupport "$$" as a literal "$" in alias arg replacements (diff)
signature
add a way to execute commands through bitbotd (use for master-password)
Diffstat (limited to 'src')
-rw-r--r--src/Control.py7
1 files changed, 7 insertions, 0 deletions
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: