From 12aeaef250cb16b9405d26b2ea35838989157634 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 12 Nov 2025 23:01:19 -0800 Subject: [PATCH] fix hop doh hops! --- mesh_bot.py | 4 ++-- pong_bot.py | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mesh_bot.py b/mesh_bot.py index a012fd6..af83915 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -287,9 +287,9 @@ def handle_ping(message_from_id, deviceID, message, hop, snr, rssi, isDM, chann #flood msg += " [F]" - if (float(snr) != 0 or float(rssi) != 0) and "Hops" not in hop: + if (float(snr) != 0 or float(rssi) != 0) and "Hop" not in hop: msg += f"\nSNR:{snr} RSSI:{rssi}" - elif "Hops" in hop: + elif "Hop" in hop: # janky, remove the words Gateway or MQTT if present hop = hop.replace("Gateway", "").replace("Direct", "").replace("MQTT", "").strip() msg += f"\n{hop} " diff --git a/pong_bot.py b/pong_bot.py index 55b3c16..de0efe0 100755 --- a/pong_bot.py +++ b/pong_bot.py @@ -104,14 +104,12 @@ def handle_ping(message_from_id, deviceID, message, hop, snr, rssi, isDM, chann #flood msg += " [F]" - if (float(snr) != 0 or float(rssi) != 0) and "Hops" not in hop: + if (float(snr) != 0 or float(rssi) != 0) and "Hop" not in hop: msg += f"\nSNR:{snr} RSSI:{rssi}" - elif "Hops" in hop: + elif "Hop" in hop: # janky, remove the words Gateway or MQTT if present hop = hop.replace("Gateway", "").replace("Direct", "").replace("MQTT", "").strip() msg += f"\n{hop} " - else: - msg += "\nflood route" if "@" in message: msg = msg + " @" + message.split("@")[1]