Change alias definitions to be global, so aliases can be reused across different networks

This commit is contained in:
2019-09-29 22:45:16 +01:00
parent 355a80b19b
commit 32309ecec2
15 changed files with 68 additions and 33 deletions

View File

@@ -2,6 +2,9 @@ import main
import random
import re
def generate_password():
return "".join([chr(random.randint(0, 74) + 48) for i in range(32)])
def generate_alias():
nick = random.choice(main.aliasdata["stubs"])
rand = random.randint(1, 2)
@@ -60,6 +63,6 @@ def generate_alias():
if rand == 3 or rand == 4:
realname = realname.capitalize()
password = "".join([chr(random.randint(0, 74) + 48) for i in range(32)])
password = generate_password()
return {"nick": nick, "altnick": altnick, "ident": ident, "realname": realname, "password": password}