diff --git a/help.json b/help.json index a470e49..ef6f7a5 100644 --- a/help.json +++ b/help.json @@ -1,7 +1,8 @@ { "pass": "pass [password]", "logout": "logout", - "connect": "connect [name] [address] [port] [ssl|plain] [nickname]", + "add": "add [name] [address] [port] [ssl|plain] [nickname]", + "del": "del [name", "list": "list", "rehash": "rehash" } diff --git a/pool.json b/pool.json index e69de29..9e26dfe 100644 --- a/pool.json +++ b/pool.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/threshold b/threshold index 19c24ef..08e83a4 100755 --- a/threshold +++ b/threshold @@ -171,7 +171,7 @@ class Helper(object): info("\n".join(poolMap)) return - elif cmd == "connect": + elif cmd == "add": if length == 6: if spl[1] in pool.keys(): @@ -193,7 +193,21 @@ class Helper(object): self.savePool() return else: - incUsage("connect") + incUsage("add") + return + + elif cmd == "del": + if length == 2: + + if not spl[1] in pool.keys(): + failure("Name does not exist: %s" % spl[1]) + return + del pool[spl[1]] + success("Successfully removed bot") + self.savePool() + return + else: + incUsage("del") return else: