From 62b40806354cfd9267a98f993251b306ab6f0d08 Mon Sep 17 00:00:00 2001 From: nin0dev Date: Mon, 17 Jun 2024 19:24:40 -0400 Subject: [PATCH] Bombed HI command --- README.md | 1 - main.py | 7 ------- 2 files changed, 8 deletions(-) diff --git a/README.md b/README.md index 88f5e54..de902bb 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ You run the server by: You can send raw text to the WS server. This text is in form of commands: -- `HI` will reply with a message response; - `GET` will reply with a message response too; - `MSG {token} {message}` will set the message and broadcast it to all logged-in clients; - `CLEAR {token}` will clear the current message. diff --git a/main.py b/main.py index 6ac1daa..31df4c6 100644 --- a/main.py +++ b/main.py @@ -17,13 +17,6 @@ async def handle(websocket): if websocket not in CONNECTIONS: CONNECTIONS.add(websocket) async for message in websocket: - # parse message - if message == "HI": - # new client said hi - if message == "": - await websocket.send("HI") - else: - await websocket.send(f"HI {EAS_MESSAGE}") if message == "GET": await websocket.send(f"MSG {EAS_MESSAGE}") if message.startswith(f"MSG {TOKEN} "):