Change alias definitions to be global, so aliases can be reused across different networks
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user