Implement removing servers and rename some commands

This commit is contained in:
Mark Veidemanis 2017-11-23 18:45:18 +00:00
parent 587c3bb87c
commit 12be21fb4e
3 changed files with 19 additions and 3 deletions

View File

@ -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"
}

View File

@ -0,0 +1 @@
{}

View File

@ -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: