From 26f39e76e688c9e234c962e9b5aa14deb3c60e09 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 28 Sep 2025 17:41:13 -0700 Subject: [PATCH] somdays tabs killl me --- mesh_bot.py | 9 +++++---- pong_bot.py | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/mesh_bot.py b/mesh_bot.py index d7a0ef2..4d2a37e 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -304,12 +304,13 @@ def handle_echo(message, message_from_id, deviceID, isDM, channel_number): parts = message.split("echo ", 1) if len(parts) > 1 and parts[1].strip() != "": echo_msg = parts[1] + if echoChannel and channel_number != echoChannel: + echo_msg = "@" + get_name_from_number(message_from_id, 'short', deviceID) + " " + echo_msg + return echo_msg else: return "Please provide a message to echo back to you. Example:echo Hello World" - if echoChannel and channel_number != echoChannel: - echo_msg = "@" + get_name_from_number(message_from_id, 'short', deviceID) + " " + echo_msg - # return the echo message - return echo_msg + else: + return "Please provide a message to echo back to you. Example:echo Hello World" def handle_wxalert(message_from_id, deviceID, message): if use_meteo_wxApi: diff --git a/pong_bot.py b/pong_bot.py index 7fed940..f4f6712 100755 --- a/pong_bot.py +++ b/pong_bot.py @@ -182,12 +182,13 @@ def handle_echo(message, message_from_id, deviceID, isDM, channel_number): parts = message.split("echo ", 1) if len(parts) > 1 and parts[1].strip() != "": echo_msg = parts[1] + if echoChannel and channel_number != echoChannel: + echo_msg = "@" + get_name_from_number(message_from_id, 'short', deviceID) + " " + echo_msg + return echo_msg else: return "Please provide a message to echo back to you. Example:echo Hello World" - if echoChannel and channel_number != echoChannel: - echo_msg = "@" + get_name_from_number(message_from_id, 'short', deviceID) + " " + echo_msg - # return the echo message - return echo_msg + else: + return "Please provide a message to echo back to you. Example:echo Hello World" def sysinfo(message, message_from_id, deviceID): if "?" in message: