From c7fbc4eb5f3465d6ae4a36c1019428c8ea089459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TC=C2=B2?= <130875305+TheCommsChannel@users.noreply.github.com> Date: Thu, 11 Jul 2024 08:07:20 -0400 Subject: [PATCH] Fix CM,, issue Fix issue where CM,, does not display the command format help message --- command_handlers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/command_handlers.py b/command_handlers.py index ee5e92d..3869429 100644 --- a/command_handlers.py +++ b/command_handlers.py @@ -480,12 +480,13 @@ def handle_post_bulletin_command(sender_id, message, interface, bbs_nodes): def handle_check_bulletin_command(sender_id, message, interface): try: - parts = message.split(",,", 2) - if len(parts) != 2: + # Split the message only once + parts = message.split(",,", 1) + if len(parts) != 2 or not parts[1].strip(): send_message("Check Bulletins Quick Command format:\nCB,,{board_name}", sender_id, interface) return - _, board_name = parts + board_name = parts[1].strip() bulletins = get_bulletins(board_name) if not bulletins: send_message(f"No bulletins available on {board_name} board.", sender_id, interface)