Update client.py

This commit is contained in:
2026-02-20 13:54:26 +01:00
parent 0b29202d62
commit 8e1396ac31

View File

@@ -97,16 +97,23 @@ while not current_user:
clear()
w, _ = term_size()
print(blauw_bg + wit + "Terminal Chat ".center(w) + reset)
print( groen + "========================================")
print("Welkom bij De Terminal Chat")
print("========================================" + reset)
print()
print_white("1. inloggen")
print_white("2. nieuw account")
print()
keuze = input(wit + " > " + reset)
print()
if keuze == "1":
current_user = login()
elif keuze == "2":
signup()
host = "192.168.254.36"
port = 44703
host = "127.0.0.1"
port = 44705
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port))
@@ -221,7 +228,7 @@ def chat_session(chatkeuze):
}).encode("utf-8"))
while True:
print_white("Beschikbare chats:")
print_white(" --- Beschikbare chats: --- ")
for i, chat in enumerate(chat_names, start=1):
print_white(f"{i}. {chat}")
print_white(f"{len(chat_names)+1}. Nieuwe chat aanmaken")