summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorauric <auric@japegames.com>2026-02-21 14:59:07 -0600
committerauric <auric@japegames.com>2026-02-21 14:59:07 -0600
commitfc10d8a0818bb87001a64a72552ed28fe60931ee (patch)
tree357ec1f0ec75779fc945d3b7460e976fe677ae31 /Makefile
parentaa73b0d955b603f623a191cc745b0173f230f02e (diff)
Add A2S probing, sd-bus state, tail/broadcast, and bot audit logclaude/trusting-dirac
State detection: - Add STATE_STOPPING to ProcessState enum - Replace system("systemctl is-active") with libsystemd sd-bus API for accurate starting/stopping/crashed state reporting; works for any unit type (RCON or STDIN) that declares a service: field - Implement real A2S_INFO UDP queries (src/console/a2s.c) for units with health.type = a2s (Valve games: TF2, GMod); differentiates running / hibernating (0 players) / changing_map (A2S down, RCON up) / unreachable; includes player count and map name in responses - Refactor probe_rcon_state() into probe_unit_state() returning a ProbeResult struct with state, players, max_players, map fields - status and list responses now include players/max_players/map fields New daemon commands: - tail <unit>: return ring buffer snapshot as a single response - broadcast <message>: send broadcast_cmd-formatted message to all running units; works for both RCON and STDIN console types New YAML field: - broadcast_cmd: command template (e.g. "say {msg}") — opt-in per unit; units without it are skipped by broadcast CLI (umbrella-cli): - Add tail subcommand (non-interactive output snapshot) - Add broadcast subcommand - status shows Players and Map when available - list adds PLAYERS and MAP columns Bot (umbrella-bot): - Replace !attach / !detach with !tail (shows last 30 lines, no streaming) - Add !broadcast command - Write per-!cmd audit entries to /var/log/umbrella/bot-audit.log - !units and !status responses include player counts when available Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 7cfa4a1..e10a476 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
CC = gcc
CFLAGS = -Wall -Wextra -Wpedantic -std=c11 -D_GNU_SOURCE \
-O2 -g
-LDFLAGS = -lyaml
+LDFLAGS = -lyaml -lsystemd
DAEMON_SRCS = \
src/main.c \
@@ -13,7 +13,8 @@ DAEMON_SRCS = \
src/client.c \
src/log.c \
src/log_tail.c \
- src/console/rcon.c
+ src/console/rcon.c \
+ src/console/a2s.c
CLI_SRCS = clients/umbrella-cli/main.c