Implement removing servers and rename some commands
This commit is contained in:
parent
587c3bb87c
commit
12be21fb4e
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
"pass": "pass [password]",
|
"pass": "pass [password]",
|
||||||
"logout": "logout",
|
"logout": "logout",
|
||||||
"connect": "connect [name] [address] [port] [ssl|plain] [nickname]",
|
"add": "add [name] [address] [port] [ssl|plain] [nickname]",
|
||||||
|
"del": "del [name",
|
||||||
"list": "list",
|
"list": "list",
|
||||||
"rehash": "rehash"
|
"rehash": "rehash"
|
||||||
}
|
}
|
||||||
|
|
18
threshold
18
threshold
|
@ -171,7 +171,7 @@ class Helper(object):
|
||||||
info("\n".join(poolMap))
|
info("\n".join(poolMap))
|
||||||
return
|
return
|
||||||
|
|
||||||
elif cmd == "connect":
|
elif cmd == "add":
|
||||||
if length == 6:
|
if length == 6:
|
||||||
|
|
||||||
if spl[1] in pool.keys():
|
if spl[1] in pool.keys():
|
||||||
|
@ -193,7 +193,21 @@ class Helper(object):
|
||||||
self.savePool()
|
self.savePool()
|
||||||
return
|
return
|
||||||
else:
|
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
|
return
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue