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]