From d188c6a50633acfebe3e5e55878095335206c2b4 Mon Sep 17 00:00:00 2001 From: Debian Date: Wed, 16 Sep 2026 23:07:41 +0200 Subject: [PATCH] Match RCON output shapes on color-stripped text so status rows hide correctly Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- main.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 09c9193..6f4c364 100644 --- a/main.py +++ b/main.py @@ -112,14 +112,16 @@ def is_command_output(message): """ Detect console output produced by RCON commands: cvar dumps and status tables. These are hidden; the 'zmq RCON command' echo lines still show - which client ran what. + which client ran what. Shape checks run on color-stripped text because + the server sprinkles Quake color codes into status rows. """ - if CVAR_RESPONSE_PATTERN.search(message): + clean = strip_color_codes(message) + if CVAR_RESPONSE_PATTERN.search(clean): return True - if 'num score ping' in message: + if 'num score ping' in clean: return True - if (STATUS_ROW_PATTERN.search(message) or STATUS_SEP_PATTERN.search(message) - or STATUS_MAP_PATTERN.search(message)): + if (STATUS_ROW_PATTERN.search(clean) or STATUS_SEP_PATTERN.search(clean) + or STATUS_MAP_PATTERN.search(clean)): return True return False