Files
2026-09-24 15:30:45 -03:00

39 lines
2.0 KiB
Plaintext

bestestserver - CLI management / reliability update
==================================================
Management changes
------------------
- Added a real terminal Admin CLI; SDL is no longer needed for normal server administration.
- build.bat now explicitly builds with BUILD_UI=OFF.
- CLI supports: servers, use, status, players, ban, ban-key, bans, unban,
kick/timeout, timeouts, untimeout, op, ops, deop, say, lobby, win, help, quit.
- Connected-player list exposes ID, IP, UDID, OP state, in-game state and ping.
- Player-controlled text is sanitized before printing in management tables so control
characters cannot trash the admin terminal.
- --no-cli runs as a service/daemon until a signal; --cli forces CLI even if stdin is redirected.
- When stdin is not a TTY the CLI is automatically disabled, preventing service launches
from immediately exiting on EOF.
Reliability fixes
-----------------
- Fixed timeout_check() using g_opMut instead of g_timeoutMut.
- Removed the multi-worker race that initialized the global IP/UDID table inside server_worker().
- Server worker run flags are now C11 atomics, making CLI/signal shutdown reliable under -O3.
- Split server start/wait lifecycle so administration can run on the main thread while
game/network workers stay independent.
Performance changes
-------------------
- Reduced the hot server-loop per-peer drain scratch buffer from 4096 uint16_t entries
to MAX_SUPPORTED_PLAYERS+1 uint8_t entries (100-player cap), avoiding repeated ~8 KiB
zeroing every loop.
- Enabled Release link-time optimization (IPO/LTO) when the compiler supports it.
- Network protocol/packet encoding was intentionally left unchanged for client compatibility.
Build verification
------------------
- Clean Release headless build tested with GCC/Ninja on Linux.
- CLI command flow tested, including offline ban add/list/remove and clean shutdown.
- Multi-instance startup and server selection tested with two instances.
- Signal-driven --no-cli shutdown tested.