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) <noreply@anthropic.com>
This commit is contained in:
Claude Code
2026-03-18 16:06:44 -04:00
parent 31be504f69
commit 066aef3c39
+4 -4
View File
@@ -24,19 +24,19 @@ log = logging.getLogger(__name__)
CONFIG_PATH = '/etc/mc_aigod.json' CONFIG_PATH = '/etc/mc_aigod.json'
PRAY_PATTERNS = [ PRAY_PATTERNS = [
re.compile(r'\[.*?\]: <(\w+)> [Pp]ray (.+)'), re.compile(r'\[.*?\]: (?:\[Not Secure\] )?<(\w+)> [Pp]ray (.+)'),
] ]
BIBLE_PATTERNS = [ BIBLE_PATTERNS = [
re.compile(r'\[.*?\]: <(\w+)> [Bb]ible\s*$'), re.compile(r'\[.*?\]: (?:\[Not Secure\] )?<(\w+)> [Bb]ible\s*$'),
] ]
SUDO_PATTERNS = [ SUDO_PATTERNS = [
re.compile(r'\[.*?\]: <(\w+)> [Ss]udo (.+)'), re.compile(r'\[.*?\]: (?:\[Not Secure\] )?<(\w+)> [Ss]udo (.+)'),
] ]
BUG_LOG_PATTERNS = [ 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') JOIN_PATTERN = re.compile(r'\[.*?\]: (\w+) joined the game')