From 53d68beb2601ede812d2e5c9430ca9ef095dfbc8 Mon Sep 17 00:00:00 2001 From: p7mj Date: Tue, 7 Apr 2026 10:00:45 -0400 Subject: [PATCH] 0407 1001 --- CHATTER/login_client.py | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/CHATTER/login_client.py b/CHATTER/login_client.py index de11c7e..f9289c9 100644 --- a/CHATTER/login_client.py +++ b/CHATTER/login_client.py @@ -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}")