name: leveva-elemental-channel-modes description: "P11 slice 158 — leveva-native owner/admin/halfop channel modes (~&@%+ / qaohv), the rank hierarchy, and the MemberStatus-is-a-bitmask shape" metadata: node_type: memory type: project originSessionId: bb80754e-5735-47b8-9140-a9af7917f5c6#
P11 slice 158 added leveva-native elemental channel-membership modes: owner
+q ~ (rank 5), admin +a & (rank 4), halfop +h % (rank 2), alongside
op @ (3) and voice + (1). No C oracle (like +O/+B/+x), so leveva-only — no
differential; the proptest model is the oracle.
The rank model (three rules every gate enforces):
- Management threshold — any channel-state change (flags/key/limit/list masks,
+ttopic,+iinvite, KICK) needs actor rank ≥ halfop (2), else482. - Min-rank-to-set — grant/revoke a membership mode needs actor rank ≥ that mode's threshold: voice→halfop(2), halfop/op→op(3), admin→4, owner→5.
- Protection — can't strip a mode from / KICK a strictly higher rank. Self-removal
(
uid == actor) always allowed. Granting is NOT protection-gated.
Bit assignments (leveva-native, past the oracle range): q=0x100000, a=0x200000,
h=0x400000. a was IRCnet's dead anonymous flag, repurposed → admin (so MODE #c +a
is no longer 472; r reop stays 472).
Shape that matters: MemberStatus is now a ChanMode-bit bitmask (bits: u32),
not two bools — has/with/set/rank + bool accessors (op()/voice()/owner()/…) +
prefix() (single highest sigil) / prefixes(multi) returns String (the stack can
be ~&@%+) / mode_letters(). mode.rs has MEMBERSHIP_BY_RANK (~&@%+ descending) —
the single source the renderers, the PREFIX=(qaohv)~&@%+ ISUPPORT token, and the S2S
wire all derive from. ModeChange::Member names a ChanMode (was op: bool).
The gate lives in the shared Channels::apply_changes(chan, changes, gate: Option<(actor_rank, &actor)>) — Some enforces rules 1–3 and collects refusals into the
new ApplyOutcome::Applied.denied bucket (→ 482); None is the ungated path for
apply_modes_oper (SAMODE, [[leveva-channel-mode-rework-slice77]]'s sibling) and
apply_modes_as_server. KICK gained KickGate::Ok{kicker_rank} + KickVictim::Protected.
S2S MemberPrefix carries the full ~&@%+ (any-order peel split, String wire,
from_status/to_status; legacy @@ uniqop decodes→op but is never emitted).
Creator bootstraps as op, NOT owner — the deliberate services-less consequence (no
ChanServ); +q/+a enter only via an existing higher rank, an S2S burst, or SAMODE.
Changing this is a one-line Channels::join change, deliberately not made.
Source plan: gist 2026-06-13-elemental-channel-modes.md. Recorded per
[[leveva-slice-recording]] ([[commit-one-test-per-commit]], [[work-on-master-directly]]).
Related: [[leveva-live-join-njoin]] (NJOIN wire), [[leveva-channel-mode-rework-slice77]].