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 <[email protected]>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user