From a69b046a989c8c3bc1dfa14c011a7f9089819c6d Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Tue, 25 Jun 2024 15:37:25 -0700 Subject: [PATCH] larping --- mesh-bot.py | 4 ++-- pong-bot.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mesh-bot.py b/mesh-bot.py index 685e2aa..e2e39fc 100755 --- a/mesh-bot.py +++ b/mesh-bot.py @@ -19,7 +19,7 @@ interface = meshtastic.serial_interface.SerialInterface() #serial interface #interface=meshtastic.ble_interface.BLEInterface("AA:BB:CC:DD:EE:FF") # BLE interface #A list of strings to trap and respond to -trap_list = ("ping","ack","testing","pong","motd","help","sun","solar","hfcond","lheard","whereami","tide","moon","wx","joke") +trap_list = ("ping","ack","testing","pong","motd","help","sun","solar","hfcond","lheard","sitrep","whereami","tide","moon","wx","joke") welcome_message = "MeshBot, here for you like a friend who is not. Try sending: ping @foo or, help" help_message = "Commands are: ack, hfcond, joke, Lheard, moon, motd, ping, solar, sun, tide, whereami, wx" @@ -75,7 +75,7 @@ def auto_response(message, snr, rssi, hop, message_from_id): bot_response = hf_band_conditions() elif "solar" in message.lower(): bot_response = drap_xray_conditions() + "\n" + solar_conditions() - elif "lheard" in message.lower(): + elif "lheard" in message.lower() or "sitrep" in message.lower(): bot_response = "Last 5 nodes heard:\n" + str(get_node_list()) elif "whereami" in message.lower(): location = get_node_location(message_from_id) diff --git a/pong-bot.py b/pong-bot.py index 3d9d03e..fc0fb82 100755 --- a/pong-bot.py +++ b/pong-bot.py @@ -15,7 +15,7 @@ interface = meshtastic.serial_interface.SerialInterface() #serial interface #interface=meshtastic.tcp_interface.TCPInterface(hostname="192.168.0.1") # IP of your device #interface=meshtastic.ble_interface.BLEInterface("AA:BB:CC:DD:EE:FF") # BLE interface -trap_list = ("ping","ack","testing","pong","motd","help","lheard") #A list of strings to trap and respond to +trap_list = ("ping","ack","testing","pong","motd","help","lheard","sitrep") #A list of strings to trap and respond to welcome_message = "PongBot, here for you like a friend who is not. Try sending: ping @foo or, help" help_message = "Commands are: ping, ack, motd, Lheard. Use 'motd $foo' to set MOTD." RESPOND_BY_DM_ONLY = True # Set to True to respond messages via DM only (keeps the channel clean) @@ -62,7 +62,7 @@ def auto_response(message, snr, rssi, hop): bot_response = MOTD elif "help" in message.lower(): bot_response = help_message - elif "lheard" in message.lower(): + elif "lheard" in message.lower() or "sitrep" in message.lower(): bot_response = "Last 5 nodes heard:\n" + str(get_node_list()) else: bot_response = "I'm sorry, I'm afraid I can't do that."