From ca4c258d07aebc98450f1324676f23be22d687a7 Mon Sep 17 00:00:00 2001 From: Ben de Roo Date: Tue, 17 Feb 2026 11:04:28 +0100 Subject: [PATCH] Update client.py --- client.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/client.py b/client.py index 1402b47..a19e677 100644 --- a/client.py +++ b/client.py @@ -185,18 +185,13 @@ def chat_session(chatkeuze): if bericht.lower() == "/quit": exit() - elif bericht.lower().startswith("/rm "): - # verwacht: /rm 3 → verwijdert bericht index 3 - try: - index = int(bericht.split(" ", 1)[1]) - s.sendall(json.dumps({ - "action": "remove_message", - "chat_name": chatkeuze, - "index": index, - "by": current_user - }).encode("utf-8")) - except: - print("Ongeldige index") + elif bericht.lower() == "/rm": + s.sendall(json.dumps({ + "action": "remove_message", + "chat_name": chatkeuze, + "by": current_user + }).encode("utf-8")) + elif bericht.lower() == "/break": break elif bericht.lower() == "/users":