From afb02602fdb63a498593bd4394079da51390cf03 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Tue, 14 Oct 2025 10:53:44 -0700 Subject: [PATCH] Update radio.py --- modules/radio.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/radio.py b/modules/radio.py index 309daf8..019dba7 100644 --- a/modules/radio.py +++ b/modules/radio.py @@ -191,9 +191,11 @@ async def voxMonitor(): else: traps = voxTrapList if any(trap.lower() in text.lower() for trap in traps): - #remove the trap words from the text for trap in traps: - text = text.replace(trap, '') + idx = text.lower().find(trap.lower()) + if idx != -1: + # Remove everything before and including the trap word + text = text[idx + len(trap):] text = text.strip() if text: logger.debug(f"RadioMon: VOX 🎙️Trapped {voxTrapList} in: {text}")