aboutsummaryrefslogtreecommitdiff
path: root/bitbotctl
diff options
context:
space:
mode:
authorGravatar jesopo2019-11-21 10:39:26 +0000
committerGravatar jesopo2019-11-21 10:39:26 +0000
commit9f8c5acf525754eda6025abe6333de81180ba595 (patch)
tree09d9a620797ba0bfbd09ebf62635b9273b51e18c /bitbotctl
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 'bitbotctl')
-rwxr-xr-xbitbotctl4
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbotctl b/bitbotctl
index 86790c0f..7e8425e8 100755
--- a/bitbotctl
+++ b/bitbotctl
@@ -24,6 +24,8 @@ SIMPLE = ["rehash", "reload", "stop"]
if args.command == "log":
arg_parser.add_argument("--level", "-l", help="Log level",
default="INFO")
+elif args.command == "command":
+ arg_parser.add_argument("subcommand")
elif args.command in SIMPLE:
pass
else:
@@ -53,6 +55,8 @@ _send("0 version 0")
if args.command == "log":
_send("1 log %s" % args.level)
+elif args.command == "command":
+ _send("1 command %s" % args.subcommand)
elif args.command in SIMPLE:
_send("1 %s" % args.command)