diff --git a/modules/commands/multitest_command.py b/modules/commands/multitest_command.py index 17dcb5c..5aae165 100644 --- a/modules/commands/multitest_command.py +++ b/modules/commands/multitest_command.py @@ -617,9 +617,9 @@ class MultitestCommand(BaseCommand): return self.translate('commands.multitest.help', fallback="Listens for 6 seconds and collects all unique paths from incoming messages") def matches_keyword(self, message: MeshMessage) -> bool: - """Check if message matches multitest keyword""" + """Check if message matches multitest keyword""" content_lower = self.cleanup_message_for_matching(message) - + # Check for exact match or keyword followed by space for keyword in self.keywords: if content_lower == keyword or content_lower.startswith(keyword + ' '): diff --git a/modules/commands/path_command.py b/modules/commands/path_command.py index aad2aec..ce66ad3 100644 --- a/modules/commands/path_command.py +++ b/modules/commands/path_command.py @@ -181,7 +181,7 @@ class PathCommand(BaseCommand): def matches_keyword(self, message: MeshMessage) -> bool: """Check if message starts with 'path' keyword or 'p' shortcut (if enabled)""" content_lower = self.cleanup_message_for_matching(message) - + # Handle "p" shortcut if enabled if self.enable_p_shortcut: if content_lower == "p": diff --git a/modules/commands/prefix_command.py b/modules/commands/prefix_command.py index ee52bd5..6132dae 100644 --- a/modules/commands/prefix_command.py +++ b/modules/commands/prefix_command.py @@ -134,7 +134,7 @@ class PrefixCommand(BaseCommand): def matches_keyword(self, message: MeshMessage) -> bool: """Check if message starts with 'prefix' keyword""" - content_lower = self.cleanup_message_for_matching(message) + content_lower = self.cleanup_message_for_matching(message) return content_lower == 'prefix' or content_lower.startswith('prefix ') async def _parse_location_to_lat_lon(self, location: str) -> tuple[Optional[float], Optional[float], Optional[str]]: diff --git a/modules/commands/roll_command.py b/modules/commands/roll_command.py index 2032094..826d0e7 100644 --- a/modules/commands/roll_command.py +++ b/modules/commands/roll_command.py @@ -74,7 +74,7 @@ class RollCommand(BaseCommand): bool: True if the message matches the roll command syntax, False otherwise. """ content_lower = self.cleanup_message_for_matching(message) - + # Check for exact "roll" match if content_lower == "roll": return True diff --git a/modules/commands/sports_command.py b/modules/commands/sports_command.py index 037c478..9744913 100644 --- a/modules/commands/sports_command.py +++ b/modules/commands/sports_command.py @@ -111,9 +111,9 @@ class SportsCommand(BaseCommand): """Check if this command matches the message content - sports must be first word""" if not self.keywords: return False - + content_lower = self.cleanup_message_for_matching(message) - + # Split into words and check if first word matches any keyword words = content_lower.split() if not words: