Proof of concept mechanical port of ircnet/ircd to Rust as part of a bit about C being insecure for network services
2.3 kB
name: leveva-channel-mode-rework-slice77 description: "leveva P11 slice 77 ripped out channel +a/+r and repurposed +O from uniqop to oper-only-join; what's gone, what stayed, and the gotchas" metadata: node_type: memory type: project originSessionId: d962f181-a30b-48fe-a111-4b88fd7367ec#
P11 slice 77 (2026-06-10) reworked leveva's channel modes (NOT user modes — the
UserMode +a away / +r restricted / +O localop are untouched):
+a(anonymous) and+r(reop) channel flags are DELETED. Those letters now name noChanMode→ a client±a/±rgets472, a server burst ignores them. Do not re-addChanMode::Anonymous/ChanMode::Reop.+R(ReopList) reop masks + the eager auto-reop (slice 54) STAYED — the user ruled "Only +r flag" when asked. Auto-reop (Channels::apply_reop) gates onreop_masks.is_empty(), never on the dropped+rflag, so removing+rwas inert for+R.+Owas REPURPOSED. It was IRCnetMODE_UNIQOP(ChanMode::Creator, a membership mode; leveva never supported!safe channels so it was dead →472). It is nowChanMode::OperOnly, a leveva-native plain flag (kindFlag, bit0x40000,mode_name "MODE_OPERONLY"): only IRC operators (+oglobal or+Ousermode) may JOIN, else520 ErrCantjoinopersonly(InspIRCd convention). The gate is inChannels::check_join's newis_operparam, checked first (before the invite override) so it is a HARD gate — an INVITE/key does not let a non-oper in. A chanop sets+Olike any flag (op-gated; the oper restriction is on joining, not setting).
Gotcha: the NJOIN @@ (CHFL_UNIQOP) member-prefix decode in s2s/mod.rs
(MemberPrefix::uniqop) is a SEPARATE wire concern (collapses @@→op on inbound bursts) and
was deliberately left untouched — uniqop there ≠ the +O channel mode.
Surfaces that moved: 004 MYINFO chan modes psmntiarovObeIRkl→psmntiOovbeIRkl; 005
CHANMODES flags group psmntiar→psmntiO. Added oper_only_proptest.rs (fuzzes the join
gate) + golden_operonly.rs. See [[leveva-next-step-s2s-completeness]],
[[leveva-ircv3-track]]. Plan: docs/superpowers/plans/2026-06-10-p11-slice77-channel-mode-rework.md.