Implement the backend for automatically provisioning relays

This commit is contained in:
2019-01-26 01:57:24 +00:00
parent 6046329a83
commit 4efea3f535
15 changed files with 356 additions and 160 deletions

View File

@@ -7,15 +7,17 @@ class Alias:
def alias(self, addr, authed, data, obj, spl, success, failure, info, incUsage, length):
if authed:
if length == 6:
if length == 8:
if spl[1] == "add":
if spl[2] in main.alias.keys():
failure("Alias already exists: %s" % spl[2])
return
else:
main.alias[spl[2]] = {"nick": spl[3],
"ident": spl[4],
"realname": spl[5]}
"altnick": spl[4],
"ident": spl[5],
"realname": spl[6],
"password": spl[7]}
success("Successfully created alias: %s" % spl[2])
main.saveConf("alias")
return