[PR #114] [MERGED] SMP 0.13.0: nicknames (/nick, /realname) #115

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

📋 Pull Request Information

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

Base: main ← Head: feat/smp-nick


📝 Commits (1)

  • c86a738 SMP 0.13.0: nicknames (/nick, /realname)

📊 Changes

9 files changed (+571 additions, -18 deletions)

View changed files

📝 native/smp/Cargo.lock (+1 -1)
📝 native/smp/Cargo.toml (+1 -1)
📝 native/smp/README.md (+16 -4)
📝 native/smp/compatibility.json (+2 -2)
📝 native/smp/mixins/smp/glue.rs (+108 -4)
📝 native/smp/mixins/smp/horizon-mixin.toml (+9 -3)
➕ native/smp/mixins/smp/smp_nick.rs (+388 -0)
📝 native/smp/proof.py (+44 -3)
📝 native/smp/src/lib.rs (+2 -0)

📄 Description

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

Why

Ludovic asked for nicknames on the official server.

What (SMP 0.13.0)

  • Players: /nick <name>, /nick off. Operators: /nick <player> <name|off>, /realname <nick>.
  • The nickname shows in chat (/me, /msg too) and in the Tab list. Hovering a name shows the real one. The log,
    the anticheat and the Discord bridge keep the real name. The GameProfile (name, UUID) never changes.
  • Rules:
    • 3 to 16 letters, digits or _;
    • never a known player's name (economy accounts, usercache.json), an operator's (ops.json) or another
      player's nickname (any case);
    • must pass the server's chat filter;
    • a 10-minute cooldown (nicks.cooldown_seconds), which operators skip.
  • Saved in world/horizon-smp/nicks.json. A player's nickname comes back when they rejoin.
  • Cost: once a second the tick applies the changes that are waiting; it reads the name files only when a change is
    waiting. Players with nothing pending cost one map lookup.
  • Pinned to horizon c348d5d (#5504, API 62: native_set_nickname, native_text_allowed from horizon#5466).
  • Also removes the eco give * <amount> literal, which the engine dropped (* isn't a command word);
    <player:word> already takes *. The startup warning is gone.

Proof

  • cargo test (native/smp): 62 passed.
  • native.py proof smp at the pinned revision: "ok": true. A dedicated server with two real clients.
    • Steve /nick Alex → Alex is a player's name.; /nick ab and /nick bad-name → A nickname is 3 to 16 letters, digits or _.
    • Steve /nick Rocky → Steve now goes by Rocky.; Alex's chat shows <Rocky> hello from rocky.
    • Alex's Tab list shows Alex, Rocky (proof screenshot nick-tab.png).
    • /realname rocky → Rocky is Steve.; Alex /nick rocky → rocky is someone else's nickname.
    • Steve /nick Pebble → wait 10 more minute(s).
    • Alex /nick Steve off → Steve goes by their name again.
    • The other steps (economy, shop, places, claims, board, presence) still pass.

🤖 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-mods/pull/114 **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:** `feat/smp-nick` --- ### 📝 Commits (1) - [`c86a738`](https://github.com/horizon-rust/horizon-mods/commit/c86a73887aa28146470f62b17b839cc09a1b910d) SMP 0.13.0: nicknames (/nick, /realname) ### 📊 Changes **9 files changed** (+571 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `native/smp/Cargo.lock` (+1 -1) 📝 `native/smp/Cargo.toml` (+1 -1) 📝 `native/smp/README.md` (+16 -4) 📝 `native/smp/compatibility.json` (+2 -2) 📝 `native/smp/mixins/smp/glue.rs` (+108 -4) 📝 `native/smp/mixins/smp/horizon-mixin.toml` (+9 -3) ➕ `native/smp/mixins/smp/smp_nick.rs` (+388 -0) 📝 `native/smp/proof.py` (+44 -3) 📝 `native/smp/src/lib.rs` (+2 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## Why Ludovic asked for nicknames on the official server. ## What (SMP 0.13.0) - Players: `/nick <name>`, `/nick off`. Operators: `/nick <player> <name|off>`, `/realname <nick>`. - The nickname shows in chat (`/me`, `/msg` too) and in the Tab list. Hovering a name shows the real one. The log, the anticheat and the Discord bridge keep the real name. The GameProfile (name, UUID) never changes. - Rules: - 3 to 16 letters, digits or `_`; - never a known player's name (economy accounts, `usercache.json`), an operator's (`ops.json`) or another player's nickname (any case); - must pass the server's chat filter; - a 10-minute cooldown (`nicks.cooldown_seconds`), which operators skip. - Saved in `world/horizon-smp/nicks.json`. A player's nickname comes back when they rejoin. - Cost: once a second the tick applies the changes that are waiting; it reads the name files only when a change is waiting. Players with nothing pending cost one map lookup. - Pinned to horizon `c348d5d` (#5504, API 62: `native_set_nickname`, `native_text_allowed` from horizon#5466). - Also removes the `eco give * <amount>` literal, which the engine dropped (`*` isn't a command word); `<player:word>` already takes `*`. The startup warning is gone. ## Proof - `cargo test` (native/smp): 62 passed. - `native.py proof smp` at the pinned revision: `"ok": true`. A dedicated server with two real clients. - Steve `/nick Alex` → `Alex is a player's name.`; `/nick ab` and `/nick bad-name` → `A nickname is 3 to 16 letters, digits or _.` - Steve `/nick Rocky` → `Steve now goes by Rocky.`; Alex's chat shows `<Rocky> hello from rocky`. - Alex's Tab list shows `Alex`, `Rocky` (proof screenshot `nick-tab.png`). - `/realname rocky` → `Rocky is Steve.`; Alex `/nick rocky` → `rocky is someone else's nickname.` - Steve `/nick Pebble` → `wait 10 more minute(s)`. - Alex `/nick Steve off` → `Steve goes by their name again.` - The other steps (economy, shop, places, claims, board, presence) still pass. 🤖 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 04:03:22 +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-mods#115
No description provided.