forked from pwgen2155/dawdle
Simplify dawdle.py setup to pull owner from config and use default class
This commit is contained in:
parent
046729ad6d
commit
9aa90a3a0e
|
@ -35,17 +35,15 @@ import dawdle.log as dawdlelog
|
|||
|
||||
def first_setup(db: bot.GameDB) -> None:
|
||||
"""Perform initialization of game."""
|
||||
pname = input(f"Initializing dbfile {bot.datapath(conf.get('dbfile'))}. Give an account name that you would like to have admin access [{conf.get('owner')}]: ")
|
||||
if pname == "":
|
||||
pname = conf.get("owner")
|
||||
pclass = input("Enter a character class for this account: ")
|
||||
pname = conf.get("owner")
|
||||
pclass = "Hidden Master"
|
||||
pclass = pclass[:conf.get("max_class_len")]
|
||||
try:
|
||||
old = termios.tcgetattr(sys.stdin.fileno())
|
||||
new = old.copy()
|
||||
new[3] = new[3] & ~termios.ECHO
|
||||
termios.tcsetattr(sys.stdin.fileno(), termios.TCSADRAIN, new)
|
||||
ppass = input("Password for this account: ")
|
||||
ppass = input("Password for owner account: ")
|
||||
finally:
|
||||
termios.tcsetattr(sys.stdin.fileno(), termios.TCSADRAIN, old)
|
||||
|
||||
|
|
Loading…
Reference in a new issue