Proof of concept mechanical port of ircnet/ircd to Rust as part of a bit about C being insecure for network services
0

Configure Feed

Select the types of activity you want to include in your feed.

docs(memory): note umode self-settable set and is_oper are single-sourced

Update the user-mode-wiring checklist: the self-settable char arm and
umode_diff echo table are no longer two hardcoded letter lists but derive
from UserMode::is_self_settable / is_client_settable, and the operator
check is now mode::is_oper. Reflects the wave-2 review cleanups so future
umode work targets the predicates instead of re-pairing allowlists.

Assisted-by: Claude Fable 5 via Claude Code
Signed-off-by: Xe Iaso <me@xeiaso.net>

+12 -4
+12 -4
docs/claude-memory/leveva-user-mode-wiring.md
··· 16 16 `Secure` `0x1000`), `flag_name`, `from_char`, `from_bit`, and the `Display` impl (yes, a separate 17 17 match from `as_char`). Add a pure predicate `pub fn is_<x>(modes) -> bool` as the enforcement + 18 18 fuzz seam (mirror `is_secure`/`is_restricted`/`is_deaf`). 19 - 2. **`command/mode.rs` `umode`** — if client-settable, add the letter to the self-settable group 20 - (`'i' | 'w' | 'B' | 'x' | 'g' | 'G' | 'D'`) AND to the `umode_diff` table (else the `±` echo is 21 - silent). Oper-gated modes go in the `'s'` arm style; server-set-only modes go in the silently- 22 - ignored `'o' | 'O' | 'r' | 'a' | 'W' | 'Z'` arm. 19 + 2. **`command/mode.rs` `umode`** — if client-settable, the self-settable char arm and the `umode_diff` 20 + echo table are **NO LONGER two hardcoded letter lists** (post-review cleanup 2026-07-04, commit 21 + `e9975613`): both now derive from predicates on `UserMode` in `mode.rs`. Add your mode to the right 22 + predicate instead: `is_self_settable` = the plain freely-settable set (`iwBxgGDRQC`), used by the 23 + char arm's `c if UserMode::from_char(c).is_some_and(|m| m.is_self_settable())` guard; `is_client_settable` 24 + = `is_self_settable() || matches!(self, ServerNotice | Operwall | LocOps)` (the `s/z/l` oper-gated 25 + modes that still echo), used by `umode_diff`'s `UserMode::ALL.into_iter().filter(|m| m.is_client_settable())`. 26 + Invariant `is_self_settable ⇒ is_client_settable` (a self-settable mode must echo) is pinned by 27 + `self_settable_and_client_settable_letter_sets`. Oper-gated modes still keep their own `'s'|'z'|'l'` 28 + match arms; server-set-only modes go in the silently-ignored `'o' | 'O' | 'r' | 'a' | 'W' | 'Z'` arm. 29 + NB: the operator check `modes & (Oper.bit() | LocalOp.bit())` is likewise now `mode::is_oper(modes)` 30 + (commit `3888aded`) — use the helper, don't re-inline the compound. 23 31 3. **enforcement** — wire the predicate where the behavior lives (for `+D`: skip deaf local members 24 32 in BOTH channel→local delivery loops in `command/message.rs` *and* `command/tagmsg.rs` — the 25 33 normal `CanSend::Ok` fan-out AND the `+z` op-redirect loop).