og-cod-plutainer/scripts
Amos 71c93d5443
Stop eating the first line of every rcon reply
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.
2026-08-20 18:37:19 +01:00
..
games feat!: replace T7x with Ezz BOIII as the Black Ops III client 2026-08-19 11:54:16 +01:00
lib Refuse the published boiii.exe instead of hanging on it 2026-08-20 18:01:29 +01:00
protocols Stop eating the first line of every rcon reply 2026-08-20 18:37:19 +01:00
entrypoint.sh SteamCMD family: generalise 7DTD support, add CS2/L4D2/HL2:DM, unify the CoD side (#9) 2026-08-16 17:12:31 +01:00
healthcheck.sh fix: a map name in the reply is not proof a map is hosted 2026-08-19 22:07:21 +01:00
log-watcher.sh SteamCMD family: generalise 7DTD support, add CS2/L4D2/HL2:DM, unify the CoD side (#9) 2026-08-16 17:12:31 +01:00
migrate-v1-to-v2.sh feat!: replace T7x with Ezz BOIII as the Black Ops III client 2026-08-19 11:54:16 +01:00
rcon-cli SteamCMD family: generalise 7DTD support, add CS2/L4D2/HL2:DM, unify the CoD side (#9) 2026-08-16 17:12:31 +01:00