mirror of
https://github.com/Ayymoss/Plutainer
synced 2026-08-24 14:32:06 -04:00
parse_packet split the response into type and payload at the first newline.
That is right for query replies, which are framed "statusResponse\n\key\value",
and wrong for rcon replies, which are framed "print <text>" with the first line
of the answer on the same line as the token. The token therefore swallowed it.
How much that cost depended on the command, and the worst case was silent:
status lost its "map: <name>" banner - cosmetic
<dvar> lost the value line, which is the entire answer. Querying a
dvar printed only " Domain is any text"
<typo> lost 'Unknown command "..."' completely, so rcon-cli printed
nothing at all and a mistyped command was indistinguishable
from a server that had stopped answering
Split on the first whitespace of any kind instead, since the separator is
framing rather than payload and which one appears varies by reply. A reply with
no separator at all - t5 zombies answers an unexpected connectionless packet
with a bare "disconnect" - still parses as "type, empty body".
This was never BOIII-specific. Measured on 10.10.1.22 across t6zm, iw5mp, iw4x,
t4mp, cod4x and boiii: all six now print the first line that was being dropped
("map: zm_buried", "hostname: My Server Name"), and all six still pass the
health check afterwards - including iw5, which answers getinfo rather than
getstatus, and so exercises the fallback path the same parser backs.
|
||
|---|---|---|
| .. | ||
| games | ||
| lib | ||
| protocols | ||
| entrypoint.sh | ||
| healthcheck.sh | ||
| log-watcher.sh | ||
| migrate-v1-to-v2.sh | ||
| rcon-cli | ||