diff --git a/example.json b/example.json index aa7543c..f7ba8a9 100644 --- a/example.json +++ b/example.json @@ -7,13 +7,12 @@ "UsePassword": true, "ConnectOnCreate": false, "HighlightNotifications": true, + "DistEnabled": true, "Password": "s", "Default": { "password": null, "username": null, "authtype": null }, - "Keywords": [], - "KeywordsExcept": {}, "Master": [] } diff --git a/help.json b/help.json index 64e2207..1e77914 100644 --- a/help.json +++ b/help.json @@ -10,5 +10,7 @@ "enable": "enable ", "list": "list", - "rehash": "rehash" + "rehash": "rehash", + "rekey": "rekey", + "dist": "dist" } diff --git a/threshold b/threshold index e53a25a..4764701 100755 --- a/threshold +++ b/threshold @@ -8,6 +8,7 @@ from twisted.words.protocols.irc import IRCClient from json import load, dump, loads from sys import exit +from subprocess import run, PIPE listener = None connections = {} @@ -467,6 +468,14 @@ class Helper(object): log("Keyword configuration rehashed") success("Keyword configuration rehashed successfully") + elif cmd == "dist": + if config["DistEnabled"]: + rtrn = run(["./dist.sh"], shell=True, stdout=PIPE) + info("Exit code: %s -- Stdout: %s" % (rtrn.returncode, rtrn.stdout)) + else: + failure("The dist command is not enabled") + return + elif cmd == "pass": info("You are already authenticated") return