From 066aef3c39f62d90f4c411ca539e19b974e2f474 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Wed, 18 Mar 2026 16:06:44 -0400 Subject: [PATCH] Fix [Not Secure] chat regex for online-mode=false Chat patterns updated to handle optional [Not Secure] prefix that Paper/vanilla adds when online-mode=false. Co-Authored-By: Claude Opus 4.6 (1M context) --- mc_aigod.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mc_aigod.py b/mc_aigod.py index 8ca8700..0db522d 100644 --- a/mc_aigod.py +++ b/mc_aigod.py @@ -24,19 +24,19 @@ log = logging.getLogger(__name__) CONFIG_PATH = '/etc/mc_aigod.json' PRAY_PATTERNS = [ - re.compile(r'\[.*?\]: <(\w+)> [Pp]ray (.+)'), + re.compile(r'\[.*?\]: (?:\[Not Secure\] )?<(\w+)> [Pp]ray (.+)'), ] BIBLE_PATTERNS = [ - re.compile(r'\[.*?\]: <(\w+)> [Bb]ible\s*$'), + re.compile(r'\[.*?\]: (?:\[Not Secure\] )?<(\w+)> [Bb]ible\s*$'), ] SUDO_PATTERNS = [ - re.compile(r'\[.*?\]: <(\w+)> [Ss]udo (.+)'), + re.compile(r'\[.*?\]: (?:\[Not Secure\] )?<(\w+)> [Ss]udo (.+)'), ] BUG_LOG_PATTERNS = [ - re.compile(r'\[.*?\]: <(\w+)> [Bb]ug[_ ]?[Ll]og(?:\s+(.+))?\s*$'), + re.compile(r'\[.*?\]: (?:\[Not Secure\] )?<(\w+)> [Bb]ug[_ ]?[Ll]og(?:\s+(.+))?\s*$'), ] JOIN_PATTERN = re.compile(r'\[.*?\]: (\w+) joined the game')