mirror of
https://github.com/TheCommsChannel/TC2-BBS-mesh.git
synced 2025-08-07 14:12:19 -04:00
Add ability to add "x" to commands
This is to allow web client users to use the BBS since the web client doesn't allow you to send single characters
This commit is contained in:
parent
ddc3fbf1f1
commit
e9709fd781
3 changed files with 34 additions and 10 deletions
|
@ -55,9 +55,13 @@ board_action_handlers = {
|
|||
|
||||
def process_message(sender_id, message, interface, is_sync_message=False):
|
||||
state = get_user_state(sender_id)
|
||||
message_lower = message.lower()
|
||||
message_lower = message.lower().strip()
|
||||
bbs_nodes = interface.bbs_nodes
|
||||
|
||||
# Handle repeated characters for single character commands using a prefix
|
||||
if len(message_lower) == 2 and message_lower[1] == 'x':
|
||||
message_lower = message_lower[0]
|
||||
|
||||
if is_sync_message:
|
||||
if message.startswith("BULLETIN|"):
|
||||
parts = message.split("|")
|
||||
|
@ -164,11 +168,10 @@ def process_message(sender_id, message, interface, is_sync_message=False):
|
|||
handle_js8call_steps(sender_id, message, step, interface, state)
|
||||
elif command == 'GROUP_MESSAGES':
|
||||
handle_group_message_selection(sender_id, message, step, state, interface)
|
||||
else:
|
||||
handle_help_command(sender_id, interface)
|
||||
else:
|
||||
handle_help_command(sender_id, interface)
|
||||
|
||||
|
||||
def on_receive(packet, interface):
|
||||
try:
|
||||
if 'decoded' in packet and packet['decoded']['portnum'] == 'TEXT_MESSAGE_APP':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue