aboutsummaryrefslogtreecommitdiff
path: root/bitbotctl
diff options
context:
space:
mode:
authorGravatar jesopo2019-10-14 14:52:58 +0100
committerGravatar jesopo2019-10-14 14:52:58 +0100
commit88ffa421c15bb2ec53154dd5aaf6cf932d96be4b (patch)
treeb2be9671afcb1f0de2510c0b72e8a6a02c1509aa /bitbotctl
parentrun Control callbacks on main thread (diff)
signature
add `bitbotctl reload` command to reload all modules
Diffstat (limited to 'bitbotctl')
-rwxr-xr-xbitbotctl6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbotctl b/bitbotctl
index c1630101..a5cda7aa 100755
--- a/bitbotctl
+++ b/bitbotctl
@@ -21,7 +21,7 @@ def _die(s):
if args.command == "log":
arg_parser.add_argument("--level", "-l", help="Log level",
default="INFO")
-elif args.command == "rehash":
+elif args.command in ["rehash", "reload"]:
pass
else:
_die("Unknown command '%s'" % args.command)
@@ -52,6 +52,8 @@ if args.command == "log":
_send("1 log %s" % args.level)
elif args.command == "rehash":
_send("1 rehash")
+elif args.command == "reload":
+ _send("1 reload")
read_buffer = b""
@@ -67,3 +69,5 @@ while True:
line = json.loads(line)
if line["action"] == "log":
print(line["data"])
+ elif line["action"] == "ack" and line["data"]:
+ print(line["data"])