From a233d8c7b34b6f30f01f5fce34f3d7660e4b3c07 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sun, 19 Oct 2025 12:57:37 -0700 Subject: [PATCH] Update mesh_bot.py --- mesh_bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesh_bot.py b/mesh_bot.py index 8699a54..6501a46 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -147,14 +147,14 @@ def auto_response(message, snr, rssi, hop, pkiStatus, message_from_id, channel_n playing, game = isPlayingGame(message_from_id)[0], isPlayingGame(message_from_id)[1] # Block restricted commands if not DM - if (cmds[0]['cmd'] in restrictedCommands and not isDM) or (cmds[0]['cmd'] in restrictedCommands and playing): + if (cmds[0]['cmd'] in restrictedCommands and not isDM) or (cmds[0]['cmd'] in restrictedCommands and playing) or playing: logger.debug(f"System: Bot restricted Command:{cmds[0]['cmd']} From: {get_name_from_number(message_from_id)} isDM:{isDM} playing:{playing}") if playing: bot_response = f"🤖You are already playing {game}, finish that first." else: bot_response = restrictedResponse else: - logger.debug(f"System: Bot detected Commands:{cmds} From: {get_name_from_number(message_from_id)} isDM:{isDM}") + logger.debug(f"System: Bot detected Commands:{cmds} From: {get_name_from_number(message_from_id)} isDM:{isDM} playing:{playing}") # run the first command after sorting bot_response = command_handler[cmds[0]['cmd']]() # append the command to the cmdHistory list for lheard and history