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.

ircd.rs / docs / claude-memory / leveva-channel-mode-rework-slice77.md
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 no ChanMode → a client ±a/±r gets 472, a server burst ignores them. Do not re-add ChanMode::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 on reop_masks.is_empty(), never on the dropped +r flag, so removing +r was inert for +R.
  • +O was REPURPOSED. It was IRCnet MODE_UNIQOP (ChanMode::Creator, a membership mode; leveva never supported ! safe channels so it was dead → 472). It is now ChanMode::OperOnly, a leveva-native plain flag (kind Flag, bit 0x40000, mode_name "MODE_OPERONLY"): only IRC operators (+o global or +O usermode) may JOIN, else 520 ErrCantjoinopersonly (InspIRCd convention). The gate is in Channels::check_join's new is_oper param, 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 +O like 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 psmntiarovObeIRklpsmntiOovbeIRkl; 005 CHANMODES flags group psmntiarpsmntiO. 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.