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