Repository navigation
Add the activity command: weekly player activity totals for a region group - #104
Conversation
…group <key>activity (Ambassador, Admin) reads <group root>/player-activity-weekly.json, which the Civ13 host writes beside its player activity database, and replies with totals only (active and new players, sessions, deaths, trips, hours per region). Unexpected fields, bad numbers and odd region names are dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WTP2USzsPRACAXT87D6UA
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
|
2026-11-16, head 9b0e273: adds Generated by Claude Code |
Change
Last step of the Civ13 player activity plan. New staff message command
<key>activity(Ambassador, Admin) for a server that heads a region group (region_group). It reads<group root>/player-activity-weekly.json, which the Civ13 host writes beside its activity database, and replies with totals only: active players today/week/month, new players this week, play sessions and median length, deaths, trips between lands and hours per region. No player names, research or recipe ids are in the file, andPlayerActivityTotals::cleandrops anything unexpected, negative or non-numeric values and odd region names. Read-only; the bot never opens the database. Documented in docs/shard-group.md.Verification
php tests/local/player-activity-totals.php: PASS (missing file, no group, broken JSON, oversized file, filtered fields and region names, message text)php -lon the four touched PHP files: no syntax errorsphp tests/local/heartbeat-roster.php: passedNot run against a live bot or Discord.
Generated by Claude Code
Summary by CodeRabbit
activitycommand to view weekly player activity totals for a server’s region group, including active and new players, sessions, deaths, trips, and hours.