0407 1001
This commit is contained in:
@@ -17,12 +17,16 @@ def login_logic():
|
||||
if login_choice == "1":
|
||||
while True:
|
||||
login_username = input("Username > ")
|
||||
if login_username.isalnum:
|
||||
if login_username.isalnum():
|
||||
break
|
||||
else:
|
||||
print("Your username contains spaces or symbols! Check again.")
|
||||
|
||||
login_password = input("Password > ")
|
||||
while True:
|
||||
login_password = input("Password > ")
|
||||
if login_password.isalnum():
|
||||
break
|
||||
else:
|
||||
print("Only 1-9, A-Z and a-z are allowed!")
|
||||
|
||||
# Get current time (request identifier)
|
||||
timestamp_ms = int(time.time() * 1000)
|
||||
@@ -42,13 +46,26 @@ def login_logic():
|
||||
print("Cannot include spaces or symbols!")
|
||||
|
||||
while True:
|
||||
signup_password = input("Password > ")
|
||||
signup_password_rep = input("Repeat Password > ")
|
||||
while True:
|
||||
signup_password = input("Password > ")
|
||||
if signup_password.isalnum():
|
||||
break
|
||||
else:
|
||||
print("Only 1-9, A-Z and a-z are allowed!")
|
||||
while True:
|
||||
signup_password_rep = input("Repeat Password > ")
|
||||
if signup_password_rep.isalnum():
|
||||
break
|
||||
else:
|
||||
print("Only 1-9, A-Z and a-z are allowed!")
|
||||
if signup_password == signup_password_rep:
|
||||
break
|
||||
else:
|
||||
print("Passwords are not the same!")
|
||||
|
||||
# Get current time (request identifier)
|
||||
timestamp_ms = int(time.time() * 1000)
|
||||
|
||||
with open(script_dir / "requests" / f"{timestamp_ms}.txt", "w") as request:
|
||||
request.write(f"CREATEUSER:{signup_username}:{signup_password}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user