mirror of
https://github.com/TheCommsChannel/TC2-BBS-mesh.git
synced 2024-11-09 22:24:06 -08:00
Fix CM,, issue
Fix issue where CM,, does not display the command format help message
This commit is contained in:
parent
8946a81760
commit
c7fbc4eb5f
|
@ -480,12 +480,13 @@ def handle_post_bulletin_command(sender_id, message, interface, bbs_nodes):
|
||||||
|
|
||||||
def handle_check_bulletin_command(sender_id, message, interface):
|
def handle_check_bulletin_command(sender_id, message, interface):
|
||||||
try:
|
try:
|
||||||
parts = message.split(",,", 2)
|
# Split the message only once
|
||||||
if len(parts) != 2:
|
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)
|
send_message("Check Bulletins Quick Command format:\nCB,,{board_name}", sender_id, interface)
|
||||||
return
|
return
|
||||||
|
|
||||||
_, board_name = parts
|
board_name = parts[1].strip()
|
||||||
bulletins = get_bulletins(board_name)
|
bulletins = get_bulletins(board_name)
|
||||||
if not bulletins:
|
if not bulletins:
|
||||||
send_message(f"No bulletins available on {board_name} board.", sender_id, interface)
|
send_message(f"No bulletins available on {board_name} board.", sender_id, interface)
|
||||||
|
|
Loading…
Reference in a new issue