[PR #5166] [MERGED] horizon-server: players, kick, ban, pardon, ban-ip and pardon-ip commands #6113

Closed
opened 2026-11-03 06:12:06 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5166
Author: @ludovic111
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: server-admin/cli


📝 Commits (1)

  • 928cc15 horizon-server: players, kick, ban, pardon, ban-ip and pardon-ip commands

📊 Changes

6 files changed (+147 additions, -5 deletions)

View changed files

📝 crates/horizon-server/src/cli.rs (+113 -0)
📝 crates/horizon-server/src/main.rs (+8 -0)
📝 docs/api/server-reference.md (+4 -0)
📝 docs/api/server.md (+3 -2)
📝 docs/server.md (+2 -2)
📝 tools/server_admin_e2e.py (+17 -1)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Roadmap server-admin: the CLI side of #5163 (merged). Rebased on main after #5165.

  • horizon-server players [--json]: who is online (ping, op level), the operators, the whitelist (on/off) and the bans with their reasons. A stopped server's lists are read from its files.
  • horizon-server kick NAME [REASON], ban NAME [REASON], pardon NAME, ban-ip ADDRESS|NAME [REASON], pardon-ip ADDRESS: the running server's vanilla command through the control API (POST /api/v1/players/...), printing the console's reply. These were "planned" in docs/server.md section 5 (cmd ban … was the way until now).
$ horizon-server ban Kim0 griefing again
Banned Kim0: griefing again
$ horizon-server players
Online (0/20): none
Operators: none
Whitelist (off): none
Banned: Kim0 (griefing again)
Banned addresses: none

Tests: tools/server_admin_e2e.py runs ban, players, pardon and players --json on the real server after the API checks; passed on the Mac mini.

pr_ready (tools/pr_ready.py on ludovics-mac-mini, against origin/main at 125875b84, 1 min 45 s)

Check Result
Scope ✅ 6 files, +147 −5
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 495 passed (1 min 14 s)
rustfmt ✅ (5 s)
clippy ✅ (11 s)
tests: horizon-server ✅ 64 passed (11 s)
doc tests ➖ no library touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ✅ 1 affected, all passed already with these inputs (2 s)
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/5166 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `server-admin/cli` --- ### 📝 Commits (1) - [`928cc15`](https://github.com/horizon-rust/horizon/commit/928cc155fb40d619afcd4c5ff864c0cd31b5fa34) horizon-server: players, kick, ban, pardon, ban-ip and pardon-ip commands ### 📊 Changes **6 files changed** (+147 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-server/src/cli.rs` (+113 -0) 📝 `crates/horizon-server/src/main.rs` (+8 -0) 📝 `docs/api/server-reference.md` (+4 -0) 📝 `docs/api/server.md` (+3 -2) 📝 `docs/server.md` (+2 -2) 📝 `tools/server_admin_e2e.py` (+17 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Roadmap `server-admin`: the CLI side of #5163 (merged). Rebased on main after #5165. - `horizon-server players [--json]`: who is online (ping, op level), the operators, the whitelist (on/off) and the bans with their reasons. A stopped server's lists are read from its files. - `horizon-server kick NAME [REASON]`, `ban NAME [REASON]`, `pardon NAME`, `ban-ip ADDRESS|NAME [REASON]`, `pardon-ip ADDRESS`: the running server's vanilla command through the control API (`POST /api/v1/players/...`), printing the console's reply. These were "planned" in docs/server.md section 5 (`cmd ban …` was the way until now). ``` $ horizon-server ban Kim0 griefing again Banned Kim0: griefing again $ horizon-server players Online (0/20): none Operators: none Whitelist (off): none Banned: Kim0 (griefing again) Banned addresses: none ``` Tests: `tools/server_admin_e2e.py` runs `ban`, `players`, `pardon` and `players --json` on the real server after the API checks; passed on the Mac mini. **pr_ready** (`tools/pr_ready.py` on ludovics-mac-mini, against origin/main at 125875b84, 1 min 45 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +147 −5 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 495 passed (1 min 14 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (11 s) | | tests: horizon-server | ✅ 64 passed (11 s) | | doc tests | ➖ no library touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ✅ 1 affected, all passed already with these inputs (2 s) | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:12:06 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#6113
No description provided.