leveva/../Cargo.lock:15: "colorchoice",
leveva/../Cargo.lock:212:name = "colorchoice"
leveva/../PLAN-P5-progress.md:1:# P5 — Command handlers (bulk): sub‑phase progress log
leveva/../PLAN-P5-progress.md:20:- **P5i DONE: `s_user.c` PING/PONG cluster** (`m_ping` + `m_pong`) — same `s_user_link.o` partial port; pure routing handlers (no statics).
leveva/../PLAN-P5-progress.md:29:- **P5r DONE: `s_user.c` m_user** (the USER registration handler — `make_user`/numeric `sip`, the `+/-`/RFC‑bit umode‑in‑USER parse, real‑name `info` capping, then the `register_user` (P5q) tail‑call) — same `s_user_link.o` partial port; a handler (msgtab `USER`=`[m_nop,m_reg,m_reg,m_nop,m_user]` → unregistered col only) reached on the registration path; the registration banner is the L2 gate (drives `make_user` + the "no flags" umode path).
leveva/../PLAN-P5-progress.md:40:- **P5cc DONE: `channel.c` display cluster — `m_names` handler + the file‑static `names_channel`** (the NAMES command + the per‑channel `353 RPL_NAMREPLY`/`366 RPL_ENDOFNAMES` emitter) via the existing `channel_link.o` partial port (`‑DPORT_CHANNEL_P5`). `names_channel` is still called by the C `m_join` (the JOIN echo) → **P5u/P5x extern‑prototype switch** (its `static` forward decl + body guarded out, an `extern` forward decl added so the C remnant resolves to the Rust def); `m_names` is a plain `#ifndef` guard (msgtab `NAMES`=`[m_nop,m_names,m_names,m_nop,m_unreg]` → its decl parse.rs imports resolves to Rust). Every callee is already Rust (`find_channel_link`/`find_channel`/`clean_channelname`/`strtoken`) or a C extern (`hunt_server`, the variadic `sendto_one`). Both share the module `BUF` (the C `buf[BUFSIZE]`): `names_channel` fills+flushes it in‑call and `m_names` only writes `buf` itself after all its `names_channel` calls → one `BUF` is faithful (the still‑C `m_join` keeps its own C `buf`; its `!`‑autocreate `name=buf` cross‑call aliasing is a documented residual that vanishes when m_join ports). No socket‑free data op (read‑only + wire) → **L2/L2‑S2S are the gates, no L1** (cf. m_list/m_topic). L2 `golden_channel_names` (`NAMES #pub` `= #pub :@alice bob` 353+366; secret‑channel member `@ #secret` marker; **inverse** — a non‑member's `NAMES #secret` yields only 366; bare `NAMES` all‑channels + `* * :` remaining‑users section) + JOIN‑echo regression via `golden_channel`; **S2S `golden_s2s_names`** (the `parc>2` `hunt_server` forwarding short‑circuit: `NAMES #chan peer.test` → the peer receives the forwarded command, byte‑identical).
leveva/../PLAN-P5-progress.md:41:- **P5dd DONE: `channel.c` JOIN cluster — `m_join` handler + the file‑static `can_join`** (the JOIN command + its access‑control predicate) via the existing `channel_link.o` partial port (`‑DPORT_CHANNEL_P5`). `can_join` is file‑static and its only caller (`m_join`) ports here too → no C caller remains, so it is a **private Rust `unsafe fn`** (no `cref_can_join` oracle → L2‑tested via m_join's reject numerics); both its forward decl + body are plainly guarded out. `m_join` is a plain `#ifndef` guard (msgtab `JOIN`=`[m_nop,m_join,m_join,m_nop,m_unreg]` → client+server cols; its decl parse.rs imports resolves to Rust). Every callee is already Rust (`strtoken`/`check_channelmask`/`clean_channelname`/`find_channel`/`hash_find_channels`/`check_chid`/`get_chid`/`del_invite`/`add_user_to_channel`/`remove_user_from_channel`/`names_channel`/`exit_client`/`match_modeid`/`mycmp`) or a C extern (`get_channel` [extern‑switched by P5aa], the variadic senders `sendto_serv_v`/`sendto_channel_butone` added to the block). m_join's function‑`static jbuf[BUFSIZE]` → a module‑private `JBUF` (distinct from the shared `BUF` it uses as the `!`‑channel‑id `sprintf` scratch — resolving the P5cc‑documented `m_join`/`buf` residual). No socket‑free data op (membership via the already‑L1'd `add_user_to_channel`, then wire) → **L2/L2‑S2S are the gates, no L1** (cf. m_names/m_list). L2 `golden_channel_join` (`+k` wrong‑key 475 then keyed join, `+i` 473 then INVITE override, `+l 1` full 471, duplicate‑JOIN no‑op, `JOIN 0` part‑all + NAMES inverse) + the `golden_channel` JOIN/part/rejoin regression; **S2S `golden_s2s_join`** ((a) a local client's JOIN of a federated `#chan` propagates `:000A NJOIN #chan :000AAAAAA` to the peer [`sendto_serv_v` SV_UID, local SID + joiner UID]; (b) the `IsServer(cptr)` head — a peer‑sourced `:<uid> JOIN 0` relays the remote user's PART to a local co‑member). `m_njoin`/`reop_channel`/the mode cluster stay C.
leveva/../PLAN-P5-progress.md:42:- **P5ee DONE: `channel.c` `m_njoin` handler** (the server‑only NJOIN channel‑membership burst command) via the existing `channel_link.o` partial port (`‑DPORT_CHANNEL_P5`). Twelfth channel.c sub‑phase; a **handler with no standalone client path** (msgtab `NJOIN`=`[m_njoin,m_nop,m_nop,m_nop,m_unreg]` → col 0 only, server‑reachable) → **L2‑S2S is its only gate** (no L2, no L1). Plain `#ifndef` guard (its decl parse.rs imports resolves to Rust; not anyone's static callee). Every callee already Rust (`check_channelmask`/`find_person`/`find_uid`/`add_user_to_channel`/`get_client_name`) or a C extern (`get_channel` [extern‑switched by P5aa, CREATE], the variadic senders). The shared `modebuf`/`parabuf` file‑statics (the synthetic‑MODE scratch) → module‑private `MODEBUF`/`PARABUF` (pure in‑call scratch — faithful, cf. P5aa's `BUF`); `uidbuf`/`mbuf` are C autos → Rust stack arrays. New `is_bursting` helper (`!(flags & FLAGS_EOB)`). L2‑S2S `golden_s2s_njoin` (the `@+` op+voice MODE‑burst the membership test doesn't cover: a peer NJOINs carol `@+` onto a #chan a local member is on → the relayed JOIN + the synthetic `:peer.test MODE #chan +ov carol carol` burst, exercising the `mbuf[1]` double‑param path) + the existing `golden_s2s_membership` (plain add/remove) now drives the Rust m_njoin as a regression; the other NJOIN‑driving goldens (join/kick/topic) stay byte‑identical.
leveva/../PLAN-P5-progress.md:43:- **P5ff DONE: `channel.c` mode‑id list layer** (`check_string` + `make_bei`/`free_bei` + `add_modeid`/`del_modeid` — the ban/exception/invite `+b`/`+e`/`+I` list‑item alloc + `mlist` add/del, the connected component over the file‑static `asterix` var) via the existing `channel_link.o` partial port (`‑DPORT_CHANNEL_P5`). Thirteenth channel.c sub‑phase; all five are file‑`static` in C → the **P5u/P5x extern‑prototype switch** on each (the still‑C `set_mode` calls `check_string`/`make_bei`/`add_modeid`/`del_modeid`; `set_mode`+`free_channel` call `free_bei` — so each `static` forward decl flips to `extern` under the guard; `check_string` had none → a new `extern` decl added). `asterix` is **module‑private** in Rust (`static mut ASTERIX`): C never references it outside the now‑ported `check_string`/`make_bei`/`free_bei`, so the pointer identity stays self‑consistent (make_bei stores it, free_bei compares it, C only ever passes the resulting `aListItem`). Every callee already Rust (`collapse`/`mycmp` P1, `make_link`/`free_link` P2, `istat` P2 with `wrapping_add/sub` — cf. P5u add_invite) or libc (`MyMalloc`/`free`/`strncpy`/`isspace`). **No L1** — all five file‑statics → no `cref_` oracle (cf. P5v `match_modeid`/P5dd `can_join`); L2 byte‑identity through the still‑C `set_mode` is the faithfulness gate. L2 `golden_channel_ban` (local chanop `+b`/`+e`/`+I` add → make_bei split + add_modeid store, ban‑list query `367`/`348`/`346` reads the Rust‑built `mlist`, duplicate `+b` BanExact dedup, then `-b` → del_modeid + free_bei + **inverse** re‑query the ban is gone) + **S2S `golden_s2s_ban`** (a peer **server** sets `+b` → the **non‑MyClient** add_modeid arm — the pure list‑add that skips every `sendto_one`, reachable only over a link — then server `-b` → del_modeid; alice's query confirms the round‑trip).
leveva/../PLAN-P5-progress.md:45:- **P5hh DONE: `channel.c` lifecycle group** (`get_channel`/`free_channel`/`reop_channel`/`setup_server_channels`/`collect_channel_garbage` + the `channel` global list head) — the **15th and final channel.c sub‑phase**, so **`channel.o` is now dropped outright** (added to `PORTED`; the P5t…P5gg `channel_link.o` second‑compile + its `-DPORT_CHANNEL_P5` substitution removed entirely; the cref oracle keeps the unguarded `channel.o`). `get_channel`/`free_channel` were file‑static (extern‑switched P5aa/P5x) and `reop_channel` purely file‑static (`collect_channel_garbage`'s only caller → private Rust `unsafe fn`); `setup_server_channels`/`collect_channel_garbage` are channel_ext.h exports called from `ircd.c` (boot / io_loop timer). **Classification: utility/callee TU** (no `msgtab` handler). **L1** (`channel_lifecycle_diff.rs`, the two exported entries have `cref_` oracles; the three statics are transitively covered): `setup_server_channels` create‑cluster (14 server channels under USE_IAUTH‑on/CLIENTS_CHANNEL‑off — chname/topic/mode/lone‑chanop walk identical) + the **inverse** (oracle'd `remove_user_from_channel` on `&ERRORS` → `free_channel` unlinks it from list+hash, the other 13 survive) + `collect_channel_garbage` (hand‑built `&dead` empty+expired vs `&live` → identical return `now+CHECKFREQ` + free/keep; pinned `timeofday` so free_channel's clock re‑check fires). **No new L2‑S2S** — none of the six has an `IsServer(cptr)` dispatch branch or formats remote‑user fields; `get_channel`/`free_channel` are already L2/S2S‑covered transitively by every JOIN/PART golden (`golden_channel*`, `golden_s2s_membership`), and `collect_channel_garbage`/`reop_channel` are timer‑driven (300 s, unreachable in a short golden — the `myrand` reop arm is review‑covered). **channel.c is now FULLY ported to Rust.**
leveva/../PLAN-P5-progress.md:46:- **P5ii DONE: `s_serv.c` informational query foundation cluster** (`m_version` + `m_time` + `m_admin` — the three leaf informational query handlers: each a `hunt_server` forward + a few `sendto_one(replies[…])` replies, with **no file‑static of its own**) — the **first `s_serv.c` sub‑phase**, establishing the `s_serv_link.o` partial port (`‑DPORT_SERV_P5`, carrying the per‑object `‑DIRCDMOTD_PATH` for the still‑C `m_motd`; mirrors `s_user_link.o`) for the last/largest P5 TU. Plain `#ifndef` guards (none is a file‑static or anyone's static callee). Every callee already resolves: `hunt_server`/`find_admin`/`sendto_one` (C externs), `replies` (P3), `date` (P5c), `serveropts` (P5b), `me`/`me.serv->sid`/`IRC_VERSION`. **Classification: handler cluster** (msgtab col 1, min‑params 0 → client‑reachable) with a **server‑reachable `hunt_server` forward** branch → L2 + L2‑S2S, **no L1** (pure wire handlers, no socket‑free data op — cf. `m_list`/`m_topic`/`m_names`). L2 `golden_s_serv_info` (local VERSION→351 / TIME→391 [localtime masked] / ADMIN→256‑259 via minimal.conf's `A` line) + **S2S `golden_s2s_s_serv_info`** (the `hunt_server` forwarding short‑circuit: `VERSION/TIME/ADMIN peer.test` → the peer receives the forwarded command, byte‑identical).
leveva/../PLAN-P5-progress.md:47:- **P5jj DONE: `s_serv.c` network‑info query cluster** (`m_info` + `m_links` + the file‑static `check_link`) via the same `s_serv_link.o` partial port (`‑DPORT_SERV_P5`). Second s_serv.c sub‑phase; **first s_serv.c extern‑prototype switch**: `check_link` (file‑static, still called by the C `m_stats`/`m_motd`) flips its forward decl `static`→`extern` under the guard so the C remnant resolves to the Rust def (P5u/P5x mechanism); `m_info`/`m_links` take plain `#ifndef` guards. Every callee already resolves (`hunt_server`/`sendto_one` C externs; `infotext`/`creation`/`generation` version.c externs; `myctime`/`collapse`/`match_`/`svrtop`/`ircstp` Rust; `CHREPLLEN`=8192 baked). **Classification: handler cluster, no L1** (pure wire handlers; `check_link`'s counter‑mutating load branches are file‑static → no `cref_` oracle + non‑deterministic over a loaded link → review‑covered, the return‑0 local path is L2‑covered). Two new canonicalizer masks for m_info's volatile `371` trailers (`:Birth Date:` build stamp + `:On‑line since` boot clock). L2 `golden_s_serv_info_links` (INFO `371`/`374` + bare LINKS `364`/`365`) + **S2S `golden_s2s_s_serv_info_links`** (INFO/LINKS `hunt_server` forwards to the peer + the bare‑LINKS tree walk before/after the link — the positive/inverse pair exercising `m_links`'s remote `up->name`/`sid`/`info` formatting).
leveva/../PLAN-P5-progress.md:48:- **P5kk DONE: `s_serv.c` informational stub cluster** (`m_users` + the file‑static `send_users` + `m_summon` + `m_help`) via the same `s_serv_link.o` partial port (`‑DPORT_SERV_P5`). Third s_serv.c sub‑phase; three leaf handlers with no file‑static of their own. Config‑resolved: `USERS_RFC1459` off → `m_users` forwards (`parc>1`) then calls `send_users` (`265`/`266`); `ENABLE_SUMMON` off → `m_summon` → `445`; `m_help` lists `msgtab[].cmd` as NOTICEs. **`send_users` is `static` in C but has a *remaining* C caller** (the still‑C `m_lusers`, s_serv.c:2386) → the **P5u/P5x extern‑prototype switch** on its forward decl (s_serv.c:52) so that caller resolves to the `#[no_mangle]` Rust def. **No L1** (pure wire handlers; `send_users` has no `cref_` oracle — GCC inlined it as `.isra.0`). L2 `golden_s_serv_stubs` (USERS `265`/`266` + SUMMON `445` + HELP NOTICE list anchored on the final `:ETRACE`) + **S2S `golden_s2s_s_serv_stubs`** (the `hunt_server` forwarding short‑circuit: `USERS peer.test` / `SUMMON nobody peer.test` → the peer receives the forwarded command; `m_help` has no forward path → not in the S2S scenario).
leveva/../PLAN-P5-progress.md:50:- **P5mm DONE: `s_serv.c` map‑display cluster** (`m_map` + the two recursive file‑statics `dump_map` [plain names] / `dump_map_sid` [names + usercount + SID + version]) via the same `s_serv_link.o` partial port (`‑DPORT_SERV_P5`). Fifth s_serv.c sub‑phase; a handler + its two tree‑renderer statics, all under one plain `#ifndef` guard (the statics have no remaining C caller → private Rust `unsafe fn`s, no `cref_` oracle; `m_map`'s decl resolves via the parse.rs `msgtab` imports). The shared `buf[BUFSIZE]` → a module‑private `BUF` (filled+flushed in‑call → faithful, cf. P5aa/P5cc); the recursive tree walk over `serv->down`/`->right` accumulates the output line via raw pointer arithmetic (`pbuf + 4` per nesting, backward tree‑char cleanup), each leaf flushing the whole `buf` with `015 RPL_MAP`. `me` is `SetEOB`'d at boot → `dump_map_sid(&me)` always takes the deterministic non‑bursting branch. **Classification: handler cluster, no L1** (pure wire handlers; `m_map` has no `hunt_server` forward but `dump_map`/`dump_map_sid` format remote‑server fields → L2 + L2‑S2S). L2 `golden_s_serv_map` (`MAP` → 018/015/017 single‑server + `MAP s` → local usercount/SID/version) + **S2S `golden_s2s_s_serv_map`** (the multi‑server tree walk: bare `MAP` before/after the peer links — `: \`- peer.test` appears — then `MAP s` adds `: \`- peer.test 0 001B 0211030000`, the peer sent an `EOB` first so the non‑bursting branch is deterministic).
leveva/../PLAN-P5-progress.md:51:- **P5nn DONE: `s_serv.c` TRACE cluster** (`m_trace` + `m_etrace` + the file‑static `trace_one` + the internal‑linkage `count_servers_users`) via the same `s_serv_link.o` partial port (`‑DPORT_SERV_P5`). Sixth s_serv.c sub‑phase; a handler pair + their shared per‑client renderer. `trace_one` (file‑static, only callers `m_trace`×2 port here) → private Rust `unsafe fn`; `count_servers_users` (the `static` forward decl gives it internal linkage despite the non‑`static` def → GCC inlined it, no symbol) is still called by the C `report_myservers` → **extern‑prototype switch** (its forward decl flips `static`→`extern` under the guard so the C remnant resolves to the `#[no_mangle]` Rust def). HUB off → `count_servers_users` uses the `istat`‑only branch (`is_serv‑1`, `is_user[0]+is_user[1]‑is_myclnt`); XLINE off → `m_etrace`'s user2/user3 are the `"-","-"` literals; ENABLE_SIDTRACE off → `m_sidtrace` not compiled, not ported. The volatile `200 RPL_TRACELINK` uptime/sendQ ported faithfully but only diffed peer‑side (the forwarded command) in S2S. **Classification: handler cluster, no L1** — pure wire handlers terminating in `sendto_one`; `count_servers_users` is a data op but has no `cref_` oracle (internal linkage in the oracle archive too), so it is L2‑S2S‑covered via the `206` servers/users it feeds (cf. P5jj `check_link`). L2 `golden_s_serv_trace` (bare TRACE → 205/262 plain client; OPER+ETRACE → 709/759 via new `trace_oper.conf` `t`/ACL_TRACE oper) + **S2S `golden_s2s_s_serv_trace`** (bare TRACE after a peer links → `206 RPL_TRACESERVER` from `trace_one`+`count_servers_users` with the remote `serv->version`/`by`/`user` fields; `TRACE peer.test` → the `IsServer` passthru forwards the command, diffed peer‑side).
leveva/../PLAN-P5-progress.md:54:- **P5qq DONE: `s_serv.c` server‑registration data‑structure cluster** (`find_server_string`/`find_server_num` [the `server_name[]` string‑interning pair], `add_server_to_tree`/`remove_server_from_tree` [the `aServer`‑tree pointer rewiring], `check_servername`) via the same `s_serv_link.o` partial port (`‑DPORT_SERV_P5`). **Ninth `s_serv.c` sub‑phase** — the first s_serv.c **utility/callee** cluster (no `msgtab` row; pure data ops, no socket/wire). The `server_name`/`server_max`/`server_num` file‑statics → module‑private Rust `static mut`; `check_servername_errors[3][2]` **stays C** (the s_serv_ext.h decl is a tentative definition under `EXTERN`‑empty → a Rust `#[no_mangle]` strong def would collide with the C BSS symbol, and `check_servername` never reads the table — only its callers index it; ported when `s_serv.o` is dropped). All five take a plain `#ifndef PORT_SERV_P5` guard (every caller stays C — `m_server`/`m_server_estab` s_serv.c, `exit_server` s_misc.c, boot ircd.c, `register_user` s_user.c — and resolves to the Rust defs at link). **Classification: utility/callee TU → L1 is the gate** (`s_serv_servtree_diff`: `server_name[]` interning round‑trip incl. the `MyRealloc`/`server_max+=50` growth boundary + the no‑duplicate‑slot re‑intern inverse; the `aServer`‑tree add/remove/re‑add with the leaf **and** head unlink inverses + the `servers` count; `check_servername` rc corpus + the exported error table — all zero‑diff vs `cref_`). **No new L2/S2S** — none has an `IsServer(cptr)` dispatch branch of its own (they are unconditional callees of the still‑C link handler); every symbol runs on the existing 13 `golden_s2s_*` peer‑link/SQUIT scenarios (link → `find_server_num`+`add_server_to_tree`+`check_servername`; remote users → `find_server_string`; SQUIT → `remove_server_from_tree`), which stay byte‑identical as the regression gate.
leveva/../PLAN-P5-progress.md:55:- **P5rr DONE: `s_serv.c` oper‑maintenance cluster** (`m_close` + `m_rehash`) via the same `s_serv_link.o` partial port (`‑DPORT_SERV_P5`). **Tenth `s_serv.c` sub‑phase** — two leaf oper handlers with no file‑static of their own (plain `#ifndef` guards; their `msgtab` decls resolve to the Rust defs at link). Config‑resolved: **DELAY_CLOSE on** → `m_close`’s trailing `is_delayclosewait`/`delay_close(-2)` block ported; **USE_SYSLOG off** → `m_rehash`’s `syslog()` line not compiled/ported. Faithful: the `for(i=highest_fd;i;i--)` walk never touches `local[0]`, `RPL_CLOSING` carries `acptr->status` as the `%d` arg, `exit_client(..,&me,..)` (P5c) closes each UNKNOWN/CONNECTING/HANDSHAKE fd, `m_rehash` returns `rehash(cptr,sptr, parc>1?parv[1][0]:0)` (C extern). **Classification: handler cluster** (dispatch col 2/STAT_OPER only — a non‑oper client hits the col‑1 `m_nopriv`/481 at the parse table), **no L1** (pure wire handlers terminating in `sendto_one`/`sendto_flag`, no socket‑free data op), **no S2S** (neither has an `IsServer(cptr)` dispatch branch nor formats remote‑user fields). L1: none. L2 `golden_s_serv_maint` (success via the new `maint_oper.conf` O‑line flags `lr`: REHASH → 382 RPL_REHASHING, CLOSE → 363 RPL_CLOSEEND; **inverse** via `oper.conf` no‑flags: the handler‑internal `is_allowed` reject → 481).
leveva/../PLAN-P5-progress.md:56:- **P5ss DONE: `s_serv.c` end‑of‑burst cluster** (`m_eob` + `m_eoback`) via the same `s_serv_link.o` partial port (`‑DPORT_SERV_P5`). **Eleventh `s_serv.c` sub‑phase** — the thematic end‑of‑burst pair: a linked server's `EOB` (burst complete) + the `EOBACK` ack. Both **server‑only** (`msgtab` col 0 — a local client/oper hits `m_nop`; `m_eob`'s first guard is `IsServer(sptr)`) with no file‑static of their own (`m_eob`'s `eobbuf[BUFSIZE]` is a function‑local stack scratch → a Rust `let mut` array, not a module static) → plain `#ifndef` guards; their `msgtab` decls resolve to the Rust defs at link. Every callee already resolves: `strtoken` (P1), `find_sid` (P4), `exit_client`/`check_split` (P5c), `istat` (P2), the C variadic `sendto_one`/`sendto_flag`/`sendto_serv_v(SV_UID)`; `SetEOB` is a new inline flag helper. Faithful: the `IsBursting(sptr)` branch (MyConnect → wall‑clock "after %d seconds" SCH_NOTICE / remote → un‑masked "End of burst" notice), `SetEOB`+`is_eobservers++`, the hopcount‑1 `:000A EOBACK` reply, the `parc<2` bare‑EOB `sendto_serv_v` propagation, the `parc≥2` mass‑SID `strtoken`/`find_sid` loop (unknown‑SID/wrong‑direction → `exit_client` link drop; the `eobbuf` comma‑SID builder + `eobmaxlen` flush via raw‑pointer walk + `memcpy`), then `check_split`; `m_eoback` clears `FLAGS_CBURST`+`byuid[0]`. **Classification: handler cluster, server‑reachable → L2‑S2S is the only gate** (no L1 — pure server‑protocol handlers with no socket‑free `cref_` oracle; no plain L2 — a local client can't present a STAT_SERVER prefix; cf. m_njoin P5ee). L2‑S2S `golden_s2s_eob` (a bursting peer's `EOB` → `:000A EOBACK` reply on the peer socket; **inverse** — a second EOB now finds `!IsBursting` → no reply, proving SetEOB changed state; `m_eoback` → link survives a follow‑up remote introduce+WHOIS) + `golden_s2s_s_serv_map` (which drives a peer EOB) the regression. The mass‑SID multi‑server loop is review‑covered (the single‑peer harness reaches only the directly‑linked bare‑EOB path).
leveva/../PLAN-P5-progress.md:57:- **P5tt DONE: `s_serv.c` `m_set` handler** (the SET oper command — read/change the runtime tunables POOLSIZE/ACONNECT/CACCEPT, echoing each value back as a NOTICE) via the same `s_serv_link.o` partial port (`‑DPORT_SERV_P5`). **Twelfth `s_serv.c` sub‑phase** — a single leaf oper handler with no file‑static of its own (plain `#ifndef` guard; its `msgtab` decl resolves to the Rust def at link). Config‑resolved: `set_table[]` is unconditional (POOLSIZE/ACONNECT/CACCEPT); `TSET_SHOWALL` = `(int)~0` = ‑1 (bindgen drops the cast macro → baked as `const TSET_SHOWALL: c_int = -1`, all bits set so the no‑arg form's three `acmd & TSET_*` echoes all fire). Faithful: the C `switch`/`break`‑to‑bottom‑echo control flow refactored into a `set_finish` helper (the two "Illegal value" arms `break` out of the switch straight to the trailing `if(acmd)` echo block → ported as an early `return set_finish(...)`, acmd unchanged so the echo still fires); `poolsize > tmp` keeps the C signed→unsigned promotion (`tmp as c_uint`); `poolsize`/`tmp` passed to `%d` width‑matched (`as c_int`). **Classification: handler cluster** (dispatch col 2/STAT_OPER — a non‑oper client hits the col‑1 `m_nopriv`/481 at the parse table; the body re‑gates on `is_allowed(ACL_SET)`), **no L1** (pure wire handler terminating in `sendto_one`/`sendto_flag`, no socket‑free data op), **no S2S** (no `IsServer(cptr)` dispatch branch, no remote‑user fields — reads/writes local tunables only). L2 `golden_s_serv_set` (new `set_oper.conf` O‑line flag `e` = ACL_SET → no‑arg SET showall POOLSIZE/ACONNECT/CACCEPT echoes, `SET ACONNECT OFF` apply+echo, `SET BOGUS` → "Invalid option BOGUS" with **no** trailing echo [acmd stays 0, the inverse of a hit]; the `oper.conf` no‑flags **inverse** → handler‑internal is_allowed reject → 481).
leveva/../PLAN-P5-progress.md:58:- **P5uu DONE: `s_serv.c` `m_wallops` handler** (the WALLOPS broadcast — relay an operwall to every other server [origin link excluded] + emit the `!from!` framing to local `&WALLOPS` watchers via `sendto_flag(SCH_WALLOP)`) via the same `s_serv_link.o` partial port (`‑DPORT_SERV_P5`). **Thirteenth `s_serv.c` sub‑phase** — a leaf server‑only handler (msgtab `WALLOPS`=`[m_wallops, m_nop, m_nop, m_nop, m_unreg]` → col 0/STAT_SERVER only; a local client/oper hits `m_nop`) with no file‑static of its own → a plain `#ifndef` guard; its `msgtab` decl resolves to the Rust def at link. The whole body is `sendto_ops_butone(IsServer(cptr)?cptr:NULL, parv[0], "%s", parv[1])` (the C variadic imported from bindings, P8); USE_SERVICES off → the `check_services_butone` block not compiled (sptr/parc unused). **Classification: handler cluster, server‑reachable → L2‑S2S the only gate** (no L1 — pure wire handler terminating in the variadic; no plain L2 — a local client can't present a STAT_SERVER prefix). L2‑S2S `golden_s2s_wallops` (a peer `:001B WALLOPS` → a local `&WALLOPS` member receives `:irc.test NOTICE &WALLOPS :!peer.test! …`; **inverse 1** a non‑member gets nothing [PING‑fenced]; **inverse 2** the originating peer does *not* get its own WALLOPS echoed back [PRIVMSG‑to‑remote fenced] — proving the `IsServer(cptr)?cptr:NULL` origin‑link exclusion).
leveva/../PLAN-P5-progress.md:59:- **P5vv DONE: `s_serv.c` `m_error` handler** (the server‑protocol ERROR message — pass an error received over a server link on to local `&ERRORS` watchers via `sendto_flag(SCH_ERROR)`) via the same `s_serv_link.o` partial port (`‑DPORT_SERV_P5`). **Fourteenth `s_serv.c` sub‑phase** — a leaf server‑only handler (msgtab `ERROR`=`[m_error, m_nop, m_nop, m_nop, m_unreg]` → col 0/STAT_SERVER only; a registered client hits `m_nop`, an unregistered connection `m_unreg`) with no file‑static of its own → a plain `#ifndef` guard; its `msgtab` decl resolves to the Rust def at link. Faithful: `para = (parc>1 && *parv[1]) ? parv[1] : "<>"`; the reachable server branch emits `:irc.test NOTICE &ERRORS :from %s -- %s` (cptr==sptr, `get_client_name(cptr,FALSE)`) / `from %s via %s -- %s` (the "via" form) via the C variadic `sendto_flag` (P8); returns 2 (not FLUSH_BUFFER → link survives). DEBUGMODE off → the `Debug()` line not compiled; the `IsPerson||IsUnknown||IsService → return 2` ignore guard ported for faithfulness but unreachable via the col‑0‑only dispatch. New private `is_service` helper. **Classification: handler cluster, server‑reachable → L2‑S2S the only gate** (no L1 — pure wire handler terminating in the variadic; no plain L2 — a local client can't present a STAT_SERVER prefix). L2‑S2S `golden_s2s_error` (a peer `:001B ERROR :the disk is full` → a local oper `&ERRORS` member receives `:irc.test NOTICE &ERRORS :from peer.test -- the disk is full`; **inverse** a non‑member gets nothing [PING‑fenced]). The boot‑created `&ERRORS` channel is +i (`can_join` admits only opers, channel.c:2091) → new `s2s_oper.conf` fixture (s2s.conf + an O‑line) and alice OPERs before subscribing; the `cptr != sptr` "via" form (needs a server introduced behind the peer) review‑covered.
leveva/../PLAN-P5-progress.md:61:- **P5xx DONE: `s_serv.c` operator CONNECT cluster** (`m_connect` — the oper command to force a server link) via the same `s_serv_link.o` partial port (`-DPORT_SERV_P5`). **Sixteenth `s_serv.c` sub-phase.** A `msgtab` handler row `CONNECT { m_nop, m_nopriv, m_connect, m_nop, m_unreg }` — col 2 (STAT_OPER) only: a plain client hits `m_nopriv` (481) at the parse table. Self-contained handler (no file-statics shared with other clusters; only a local port var), so dropped via a fresh `#ifndef PORT_SERV_P5` guard with no extern-prototype switch (every caller already resolves to the Rust def at link). Faithful port: `is_allowed(sptr, parc>3 ? ACL_CONNECTREMOTE : ACL_CONNECTLOCAL)` gate → `m_nopriv`; `BOOT_STANDALONE` short-circuit; `hunt_server` HUNTED_ISME routing; `find_name`/`find_mask` "already exists"; the two-pass `conf` walk (server names, then `user@host` hostnames via `index(host,'@')+1` — replicated with `strchr(...).wrapping_add(1)` to mirror C's NULL+1 when there is no `@`); port resolution (`atoi`/`abs`); the `!IsAnOper(cptr)` "Remote CONNECT … from …" ops notice; and the `connect_server` retval switch (0/-1/-2/default with `strerror`). `USE_SYSLOG`/`SYSLOG_CONNECT` off → the syslog line not compiled. New libc externs `abs`/`strerror`; the local `me_name()` binding renamed `myname` (can't shadow the static `me`). **Classification: handler cluster with a server-reachable path → L1 N/A (needs a live server/socket; no pure data op), L2 + L2-S2S the gates.** L2 `golden_s_serv_connect` (local opered client): new `connect_oper.conf` fixture (O-line flags `C` = ACL_CONNECT) → `CONNECT nosuch.invalid` → `NOTICE alice :Connect: Host nosuch.invalid not listed in ircd.conf` (no `connect_server` call); **inverse** via plain `oper.conf` (no flags) → handler-internal `is_allowed` reject → 481 — both byte-identical vs reference-C. L2-S2S `golden_s2s_s_serv_connect` (`boot_s2s` + `Peer`): a remote oper (`+o` → STAT_OPER) behind the peer issues a remote-form `CONNECT nosuch.invalid 0 irc.test` → reaches `m_connect` over the server link (`IsServer(cptr)` true) → the "not listed" reply routes back out the peer; **inverse** a plain remote client (col 1 → `m_nopriv` at parse) produces no such notice — both byte-identical. **The `!IsAnOper(cptr)` ops notice + `connect_server` tail run only once a real C-line matches (a live outbound socket) → no deterministic golden form; faithful C-call passthroughs covered by review.** Regression: `golden_s2s_link` / `golden_s2s_squit` / `golden_s_serv_maint` stay byte-identical; workspace builds 0 warnings.
leveva/../PLAN-P5-progress.md:62:- **P5yy DONE: `s_serv.c` `m_squit` handler** (the SQUIT command — remove a server from the network) via the `s_serv_link.o` partial port (`-DPORT_SERV_P5`). A **self-contained** cluster: its only module-local state is the function-local `static char comment2[TOPICLEN+1]` (private scratch → a module-private `static mut COMMENT2`, not ABI); it touches none of the server-introduction file-statics (`introduce_server`/`send_server`/`get_version`), so it ports cleanly without dragging in the big server cluster. Every callee is already Rust (`is_allowed` P5o, `exit_client` P5c, `find_sid`/`find_server`/`next_client` P2, `m_nopriv` P4, `replies[]` P3) or a C extern (`get_client_name`/`my_name_for_link`/`mycmp`, the variadic `sendto_one`/`sendto_ops_butone`/`sendto_flag` trampolines). Config-resolved: the `#if defined(USE_SYSLOG) && defined(SYSLOG_SQUIT)` line is out (`USE_SYSLOG` `#undef`); a local oper reaches `m_squit` (col 2) only because `OPER_SQUIT`+`OPER_SQUIT_REMOTE` are defined and the O-line carries flag letter `S` (→ ACL_SQUIT). L2 `golden_s_serv_squit` (local oper: `SQUIT irc.test` → "you cannot SQUIT me" notice + `SQUIT nosuch.invalid` → 402; inverse no-flag oper → handler-internal 481, no 402) + **S2S `golden_s2s_s_serv_squit`** (remote oper's `SQUIT nosuch.invalid` → 402 routed back out the peer link; inverse plain remote client → no 402, proving col-2 prefix-is-oper gating). The `exit_client` link-teardown tail stays faithful passthrough, covered by the existing `golden_s2s_squit` peer-EOF netsplit net.
leveva/../PLAN-P5-progress.md:64:- **P5aaa DONE: `s_serv.c` ENCAP/SDIE server-broadcast stub cluster** (`m_encap` + `m_sdie`) via the `s_serv_link.o` partial port (`-DPORT_SERV_P5`) — two server-only leaf handlers (msgtab col 0) that rebuild + `sendto_serv_v(cptr, SV_UID, …)`-propagate a line to every *other* server (origin link excluded); plain `#ifndef` guards, no file-static. **No L1** (pure wire/broadcast, no socket-free data op), **L2-S2S the only gate** (`golden_s2s_encap`: a peer's `:001B ENCAP …`/`:001B SDIE` is NOT echoed back to its origin link + the link survives a follow-up routed PRIVMSG fence — byte-identical ref-C vs Rust). The forward-to-an-additional-server arm needs a 2nd direct peer link the harness lacks → review-covered.
leveva/../PLAN-P5-progress.md:65:- **P5bbb DONE: `s_serv.c` server‑introduction / link‑establishment / burst cluster** (`m_server` + `m_server_estab` + `m_smask` + `check_version`/`get_version` + `send_server`/`introduce_server`/`send_server_burst` + the `check_servername_errors[3][2]` table) — the **final `s_serv.c` sub‑phase**, so **`s_serv.o` is now dropped outright** (added to `PORTED`; the P5ii…P5aaa `s_serv_link.o` second‑compile + `‑DPORT_SERV_P5` removed; the cref oracle keeps the unguarded `s_serv.o`). **`s_serv.c` is now FULLY ported to Rust.** Config‑resolved (all OFF): USE_SERVICES (no `check_services_butone`), ZIP_LINKS (no `zip_init`/FLAGS_ZIP arms — `encr = cptr->passwd`), JAPANESE, CRYPT_LINK_PASSWORD, HUB (the `#ifndef HUB` leaf‑check IS compiled), USE_SYSLOG. `check_servername_errors` (kept C through P5qq to avoid a BSS‑symbol collision) is now a `#[no_mangle] pub static mut` (raw‑pointer table → the `replies[]`‑in‑s_err.rs pattern) since the C def is gone and `ircd.c:1056` reads it. **Classification: handler cluster, server‑reachable.** **L1** (`s_serv_version_diff`): `check_version` (transitively `get_version`) vs `cref_` on parallel `make_client`'d clients with empty conf — the `0210`‑beta `991199`/`991200` boundary, the `021x` fast‑path, else→`SV_OLD`, the in‑place `info` split, the `Z`→`FLAGS_ZIPRQ` flag (with a `P` flag so the faithful `BOOT_STRICTPROT` "Unsafe mode" exit isn't taken — `bootopt` defaults to `BOOT_PROT|BOOT_STRICTPROT`, ircd.c:47), and the `DefInfo` early‑return — the only gate on the version branches the fixed‑`PEER_VERSION` S2S harness can't reach. **L2‑S2S**: the **entire existing 37‑test `golden_s2s_*` suite is the regression gate** — every test's `Peer::link()` PASS/SERVER handshake drives `m_server`(local)→`check_version`→`m_server_estab`→`send_server_burst`→EOB, and `golden_s2s_reject` drives `m_server`'s reject path; all byte‑identical (the lone `golden_s2s_s_serv_stats` red is the documented pre‑existing reference‑C uninitialized‑sendq flake, not a regression). New **`golden_s2s_server`** covers the gap — `m_server`'s `IsServer(cptr)` remote‑server‑introduction branch (a peer `:001B SERVER sub.test 1 002C …` → remote `aServer` creation + `introduce_server`, observed via `LINKS`). The server‑removal inverse + `m_smask` + multi‑server `send_server`/`introduce_server` are review/`golden_s2s_squit`‑covered (the single‑peer harness can't host a fully‑formed sub‑server — SQUITting one **segfaults even reference‑C**).
leveva/../PLAN-P5-progress.md:68:- **P5hash DONE: `hash.c` `m_hash` (HAZH) handler** — ports the last C remnant of hash.c (P2 left `m_hash` in `hash_link.o`) into `ircd-common/hash.rs` → **`hash.o` dropped outright** (added to `PORTED`; the P2d `hash_link.o` second-compile deleted). A **handler cluster** reachable only from a local oper (msgtab `HAZH` col 2 = `STAT_OPER`, re-gated on `is_allowed(ACL_HAZH)`); DEBUGMODE off → `show`/`list`/`show_hash_bucket` not compiled. Faithful `%f` stat lines via `(expr as f32) as f64` (C `(float)(double)` + varargs promotion). **L2 `golden_s_hash`** (oper `HAZH`/`HAZH c` usage+statistics; non-oper `HAZH c` → 481 m_nopriv, the dispatch-column inverse) byte-identical. **No S2S** (no `IsServer` branch / remote-user fields).
leveva/../PLAN.md:18:3. **iauth rewritten first**, standalone greenfield Rust binary speaking the identical pipe protocol.
leveva/../PLAN.md:52:| **Mutable dispatch table**             | `msgtab[]` entries are `struct Cmd{handler;count;rcount;bytes;rbytes}` **mutated every dispatch**, read by STATS.                                                                                    | Rust `static mut msgtab: [Message; …]` of the bindgen type, exact field order; handlers point at still‑C `m_*` until ported; L1 test asserts identical `count/bytes` after N dispatches.                                                                                                                                                                                                 |
leveva/../PLAN.md:86:| **P4 — Parser & dispatch ✅ DONE**                      | `common/parse.c` (tokenizer, `msgtab[]`, all 11 `find_*` wrappers, `getfield`, `m_nop`/`m_nopriv`/`m_unreg`/`m_reg`, `find_sender`/`cancel_clients`/`remove_unknown`)        | Faithful; `msgtab` as `#[no_mangle] static mut [Message; 66]` (config‑resolved: TKLINE on, SERVSET/KLINE/SIDTRACE off, MOTD→m_unreg; mutable counters); the ~60 real `m_*` handlers stay C and are referenced as fn pointers; **`parse.o` dropped outright** (every symbol ported — no `parse_link.o`). Rust **calls** the C variadic senders (`sendto_one`/`sendto_flag`/`sendto_serv_butone`) via bindgen decls (the s_numeric.rs pattern). Exact tokenize semantics (512 trunc, leading/trailing colon, empty trailing param, `MPAR` cap). **Deliverable:** per‑handler‑file static‑symbol cluster map (`specs/2026-06-02-p5-handler-cluster-map.md`).                            | **MET (L1):** zero‑diff vs `cref_` on the `msgtab[]` structure (cmd/min/max per row + row count), `getfield` (delimiter/escape/trailing/empty), `find_mask`/`find_name` fallbacks, and `parse()`'s no‑server paths (IsDead, empty, unknown‑cmd, numeric, ENCAP→m_nop dispatch — return code + `cptr.flags` + `ircstp` deltas). **Full `parse()` post‑state + hash‑populated `find_*` = L3/L2** (need the server fixture). |
leveva/../PLAN.md:87:| **P5 — Command handlers (bulk) ✅ DONE (all `m_*` handlers; `s_auth.c` socket/ident/iauth‑pipe I/O → P7)** | `channel.c`, `s_user.c`+`s_auth.c`, `s_serv.c`+`s_service.c`+`s_zip.c` (zlib→flate2, **bit‑exact**), `s_misc.c` (`exit_client`), `s_debug.c`. <br>**Per‑cluster sub‑phase progress log (P5a–P5whowas, 56 clusters): see [`PLAN-P5-progress.md`](PLAN-P5-progress.md).** **`channel.c` (P5hh), `s_serv.c` (P5bbb) and `s_user.c` (P5ccc) are now FULLY ported → all three `.o`s dropped.** The P2‑deferred `m_whowas` handler is also ported (P5whowas) → **`whowas.o` dropped, whowas.c fully Rust**; the P2‑deferred `m_hash` (HAZH) handler is ported (P5hash) → **`hash.o` dropped, the `hash_link.o` partial‑compile gone**. Of the P5 TUs, only `s_auth.c` remains C (no `m_*` handlers; pure socket/ident/iauth‑pipe I/O → deferred to P7/P‑IAUTH). | Faithful, but **cluster‑based, not per‑function**: `channel.c` has 37 file‑statics (`set_mode`, `can_join`, `get_channel`, …); migrate each **connected component over shared statics** as a unit via the `msgtab` fn‑pointer seam. **s_zip.o is empty (ZIP_LINKS off) → drop for free, no port.** | Per‑cluster L2 golden + L4 conformance byte‑identical incl. WHO/WHOIS/WHOX, full server‑burst/netsplit; zlib bytes match.                                                                                                      |
leveva/../PLAN.md:92:| **P10 — `leveva` greenfield foundations 🔶 IN PROGRESS** ([`docs/progress-log/p10.md`](docs/progress-log/p10.md)) | new `leveva` crate (lib) + `leveva-integration` differential tests                                                                                                        | The idiomatic‑Rust product, built from scratch (not transformed from the port). **Done so far:** RFC 1459 case‑folding (`casemap`); typed identifier strings (`IrcStr`/`IrcString` + `Nick`/`ChanName`/`Uid`/`Sid`/`Cid`/`ServerName`/`UserName`/`HostName` validating newtypes via `ident_newtype!`); `Message`/`MessageBuilder`; the full `Numeric` reply/error enum (184 codes, discriminant = wire code); a generic safe `patricia` trie; glob `matching`; `mode`; KDL `config` (model/parse/password/privilege); `rustls`/`tokio` `tls` endpoint with hot reload; `ident`. The async boot path (`main.rs`) binds listeners + watches certs but currently drops accepted connections — no protocol layer yet. Idiomatic Rust allowed everywhere; pulls real crates (tokio/rustls/kdl/nom/clap). | `cargo test -p leveva` green + clippy clean per module; `leveva-integration` pins each greenfield reimplementation against `ircd-common` (the oracle) within their shared domain (documented divergences asserted explicitly). |
leveva/../PLAN.md:93:| **P11 — `leveva` protocol layer → feature parity 🔶 IN PROGRESS** ([`docs/progress-log/p11.md`](docs/progress-log/p11.md)) | `leveva` (client/server state machine + handlers) | The bulk of the remaining work: the connection + registration state machine (`NICK`/`USER` → `001`–`004`/`375`–`376` welcome burst), command handlers (JOIN/PRIVMSG/MODE/KICK/TOPIC/WHO/WHOIS/…), channels, the S2S link/burst protocol (UID‑based: UNICK/NJOIN/SAVE/EOB), and spawning `iauth-rs` over a socketpair. Each slice is built idiomatically (owned per‑connection state, typed identifiers end‑to‑end, `Result`/`thiserror`, `format!`/typed builders — **no** `sprintf`/global `buf`), tested by leveva's own boot‑level golden snapshot + proptest fuzzing, and **differentially pinned against `ircd-common`** (structural skeleton + documented divergences, since leveva emits a clean modern burst rather than a byte copy). **Done (24 slices) — full per‑slice detail in [`docs/progress-log/p11.md`](docs/progress-log/p11.md):** (1) connection + registration + welcome burst; (2) post‑registration dispatch; (3) shared client registry (nick uniqueness / `433`); (4) message delivery (per‑connection mailbox; `PRIVMSG`/`NOTICE`); (5) channels (`JOIN`/`PART` + fan‑out + `NICK`/`QUIT` relay); (6) UID identity (`UidGenerator`; UID‑keyed membership); (7) channel metadata (creation TS + `TOPIC`); (8) channel modes (`MODE` + op model + `+nmtipsklovb`); (9) `KICK`; (10) `INVITE` (`+i` one‑shot tokens); (11) `NAMES`/`LIST` (+ `+s`/`+p` visibility); (12) `WHOIS`; (13) `WHO` — this last preceded by splitting the `command.rs` monolith into a `command/` folder (one client handler per file, tests local); (14) **user modes** (`MODE <nick>` → `+i`/`+w` with `send_umode` echo + `221`/`501`/`502`), a config‑driven default user mode (`default-user-modes`, default `+iw`) seeded at registration, and `+i` invisible wired into the `WHO` user sweeps; (15) **`AWAY`** (`306`/`305`, the server‑managed `+a` bit) with the away message stored in the shared registry record + the three observers wired — PRIVMSG `301` to the sender (not NOTICE), WHO `G`/`H` flag, WHOIS `301` after `312`; (16) **`OPER`** (operator login) — authenticate `OPER <name> <password>` against the configured `operator` blocks (name IRC‑fold + `user@host` mask glob + `Password::verify`, the new pure‑Rust `pwhash` crypt path for hashed credentials), granting `+o`/`+O` with a `MODE` echo + `381`, mirrored into the registry so WHOIS shows `313` (after the `301` away slot); the `491`‑vs‑`464` split (no O‑line vs wrong password); (17) **`WALLOPS`** (operator broadcast) — `WALLOPS <text>` from an operator (`+o`/`+O`) fans `:nick!user@host WALLOPS :text` to every connected `+w` user (consuming the `UserMode::Wallops` bit that has existed since slice 14 with no consumer); non‑oper → `481`, no text → `461`. Deliberate divergence from the IRCnet 2.11 oracle (whose `m_wallops` `msgtab` row routes *client* WALLOPS to `m_nop` — it is server‑sourced only there): leveva adopts the RFC 2812 §4.7 / modern‑ircd oper‑issued form, documented; (18) **ping‑timeout keepalive** (the server‑side half of PING/PONG) — a new pure [`heartbeat`](leveva/src/heartbeat.rs) module (`Heartbeat`/`Beat`/`evaluate`) drives the IRCnet 2.11 `check_pings` policy: an idle connection is pinged once (`PING :<server>`) at one `ping-freq` and dropped (`ERROR :Closing Link: (Ping timeout)` + a `QUIT :Ping timeout` relayed to channel co‑members) if still silent at `2·ping-freq`; any inbound line (incl. the client's `PONG`) resets the timer; `ping-freq 0` disables it. The interval is the connection's **class `ping-freq`** (`heartbeat::default_ping_freq(&classes)`); since leveva does not yet match `allow → class`, every client uses the default (first) class, documented. Wired into `Session` (`start_heartbeat`/`record_activity`/`check_ping`, injected‑time so it stays pure/deterministic) and a third `select!` arm in the `main.rs` serve loop. No pure oracle entry point exists (the C `check_pings` walks `local[]` with global sender buffers) → no `leveva-integration` test; verified by unit + injected‑time session tests + a 2‑property `heartbeat_proptest` schedule fuzzer + a live boot (`ping-freq 1`: PING then timeout; answering PONG survives). (19) **`KILL`** (operator forced disconnect) — `KILL <nick> <comment>` from an operator (`+o`/`+O`) forcibly disconnects a **local** client: the victim receives `:<killer> KILL <victim> :<killerhost>!<killer> (<comment>)` + `ERROR :Closing Link: …`, then its serve loop closes and relays `QUIT :Local Kill by <killer> (<comment>)` to channel co‑members (faithful to the oracle's local‑oper `exit_client` comment, which leaves `FLAGS_KILLED` unset so the channel QUIT fires); non‑oper → `481`, missing target/comment → `461`, target = server → `483`, unknown nick → `401`. This is the first leveva command that **forces another connection to close**, so it introduces the cross‑connection control plane: the per‑connection mailbox payload becomes `Envelope::{Wire,Eject}` (the eject rides the same `mpsc` so it can never overtake queued wire frames), `Registry::eject_uid` queues the disconnect, and `Session::force_close` records the kill reason for `release()`'s QUIT relay. Out of scope (documented): the local‑oper server‑notice (`SCH_KILL`) broadcast, `FLAGS_KILLED`/S2S propagation, `+O` remote kill, WHOWAS kill‑chasing. No pure oracle entry point (the C `m_kill` calls `exit_client`/global sender buffers) → no `leveva-integration` test; verified by unit + injected‑state session tests + a 2‑property `kill_proptest` (privilege/outcome + per‑victim eject conservation + arbitrary‑bytes panic‑freedom) + a boot golden (`golden_kill`). (20) **`USERHOST`/`ISON`** (the two RFC "query a list of nicks" commands, ported as a pair) — `USERHOST` answers a single `302 RPL_USERHOST` listing up to **five** resolvable nicks as `<nick>[*]=<sign><user>@<host>` (`*` iff oper `+o`/`+O`, sign `-` iff away `+a`, else `+`), faithful to the oracle `m_userhost`'s 5‑token cap and byte layout; `ISON` answers a single `303 RPL_ISON` echoing exactly the online subset in query order as canonical (fold‑resolved) nicks, dropping absent names and stopping before the wire budget overflows (the oracle's `BUFSIZE‑4` early break). Both flatten middle params + trailing to one token stream (`a b` ≡ `:a b`) and emit `461` with no parameter. Documented divergence: leveva emits a single `302` line (the oracle re‑heads on `BUFSIZE` fill, unreachable under the 5‑nick cap within 512 bytes). No pure oracle entry point (both call `sendto_one` into global buffers) → no `leveva-integration` differential; verified by unit (with inverses: away→back sign round‑trip, quit makes a nick disappear, the 6th present user dropped by the cap) + a 3‑property `userhost_ison_proptest` (online‑subset‑in‑order model for ISON, first‑five‑resolvable model for USERHOST, arbitrary‑query panic‑freedom + wire‑budget) + a boot golden (`golden_userhost_ison`). (21) **`WHOWAS`** (nick‑history query) — a new pure [`whowas`](leveva/src/whowas.rs) module (bounded newest‑first ring) records a vacated identity on every `NICK`‑change and disconnect; `WHOWAS <nicklist> [count] [target]` answers `314`+`312` per matched entry (newest first, capped at `count`), `406` on a miss, one closing `369`, `431` with no nick. Divergences: no server routing/remote‑cap (single‑server), and the `312` time renders as unix **seconds** (leveva's wire‑time convention, like `333`). No pure oracle entry point → no `leveva-integration` test; verified by unit (store + handler, with inverses) + a session integration test (disconnect→WHOWAS finds it) + a 3‑property `whowas_proptest` (newest‑first model, comma‑list structure, arbitrary‑query panic‑freedom) + a boot golden (`golden_whowas`); (22) **`TIME`/`ADMIN`/`INFO`** (server‑information query commands, ported as a pure read‑only trio) — `TIME`→a single `391` (time as unix **seconds**, leveva's wire convention), `ADMIN`→the `256`/`257`/`258`/`259` block from a new `ServerContext.admin` config field (`423` when empty, unreachable since the `admin` block is mandatory), `INFO`→leveva's own `371`* description block (with `On-line since <created>`) then `374`; all three reach client+oper columns (no oper gate) and ignore the single‑server `hunt_server` target arg; verified by unit + a `golden_time_admin_info` boot golden + a 4‑property `server_query_proptest` (the canonicalizer gained a `391`‑seconds + `On-line since` mask); (23) **`LINKS`/`MAP`** (server‑topology query commands, ported as a read‑only pair) — on single‑server leveva the network is one node, so `LINKS`→one `364 RPL_LINKS` (this server as its own upstream, hopcount `0`, SID + description; empty description → `(Unknown Location)`) then `365 RPL_ENDOFLINKS`, and `MAP`→`018 RPL_MAPSTART`/one `015 RPL_MAP`/`017 RPL_MAPEND`, with the trailing literal `s` selecting the verbose `dump_map_sid` variant (header `Server users SID version`; the `015` body carries `<name> <users> <sid> <version>`). An optional server `<mask>` filters the (single) server by glob against its name — a non‑match drops the `364`/`015`, leaving just the terminator block. Documented divergences (single‑server): `LINKS`'s three‑arg `<remote> <mask>` remote‑forward form (`hunt_server`) can't resolve elsewhere with no peers, so leveva drops the remote target and answers locally using the second token as the mask; no `RPL_TRYAGAIN` flood throttle; `MAP` draws no tree connectors (no children) and never shows the `s`‑variant "bursting" annotation. No `leveva-integration` differential (`m_links`/`m_map` `sendto_one` into global buffers — no pure oracle entry point, as with every recent slice); verified by unit (each command + the inverse non‑matching‑mask suppression + the empty‑description branch) + a 3‑property `server_topology_proptest` (LINKS = optional `364`‑iff‑mask‑matches then one `365`; MAP = `018`/optional `015`/`017` with the verbose header keyed on a trailing `s`; arbitrary args/nick panic‑freedom + no stray numerics) + a boot golden (`golden_links_map`); (24) **`STATS`** (config‑introspection query) — `STATS <letter> [<target>]` dumps the parsed config blocks one numeric per block, closed by a `219 RPL_ENDOFSTATS` echoing the selector char (`*` for bare/unknown, faithful to the oracle's default‑arm downgrade). The selector is the **first char** of the first arg (oracle `parv[1][0]`), case‑insensitive; the `<target>` `hunt_server` arg is dropped (single server). leveva maps the **config‑introspection** letters directly onto its KDL config: `o`→`243` per `operator`, `y`→`218` per `class`, `i`→`215` per `allow`, `c`→`213` per `connect`, `u`→`242` uptime. A new bundled `ServerContext.stats_conf` ([`StatsConf`](leveva/src/server.rs): classes/allows/links + a boot `Instant`) carries the data (operators stay the top‑level field `OPER` already consumes; `STATS o` reads them there). Documented divergences (clean modern burst): named class instead of a numeric id + per‑host limits as separate params (not the oracle's `%d.%d` packing) + live‑links `0`; no oper/I‑line privilege‑flag trailer + port `0`; the **state‑dependent** letters the oracle implements but leveva has no state for (`m`/`l`/`p`/`t`/`?`/`f`/`z`/`k`/`a`) produce no body, just the terminator. No `leveva-integration` differential (`m_stats` `sendto_one` into global buffers — no pure oracle entry point). Verified by unit (each letter + the **inverse** empty‑config‑yields‑terminator‑only, the `O`/`o` case echo, first‑char‑only selector, ignored target) + a 3‑property `stats_proptest` (terminator always last/singular with the modeled selector char; recognized‑letter body count = configured‑block count; arbitrary args/nick panic‑freedom + only STATS numerics) + a boot golden (`golden_stats`, with the `242` uptime masked by the canonicalizer; `minimal.kdl` gained a `connect` block to exercise `STATS c`). Each slice is unit‑tested + boot‑golden + proptest‑fuzzed, and — where a pure oracle entry point exists — differentially pinned against `ircd-common`. | Per‑slice: leveva boots and serves the slice; leveva golden snapshot + proptest green; the `leveva-integration` differential agrees with `ircd-common` on the shared skeleton with divergences asserted. Across the eventual matrix: registration, channels, WHO/WHOIS/WHOX, OPER/STATS, server burst, netsplit, rehash, restart; iauth end‑to‑end. |
leveva/../PLAN.md:107:- [P5 — Command handlers](docs/progress-log/p5.md)
leveva/../PLAN.md:112:- [P11 — leveva protocol layer → feature parity](docs/progress-log/p11.md)
leveva/../PLAN-P8-progress.md:61:  and `from` is a Person, the `:%s` prefix arg `par` collapses to
leveva/../PLAN-P8-progress.md:72:  special-collapse, special-no-collapse, non-special server-`to` verbatim, collapse >510
leveva/../PLAN-P8-progress.md:103:  the Rust symbols. `prep_preprep` gains the C `from == &anon` disjunct (collapse to
leveva/../PLAN-P8-progress.md:107:  recipient lands in the else-path `:par`, a MyClient recipient collapses). 7 call sites
leveva/../PLAN-P8-progress.md:113:  `sendto_channel_butone_diff.rs` (4 cases: broadcast collapse/verbatim/IsMe-skip,
leveva/../PLAN-P8-progress.md:114:  `one` exclusion + inverse, self-send-not-doubled, anonymous-channel collapses to anon) +
leveva/../PLAN-P8-progress.md:201:  collapses to suffix: &[u8]) with all quirks (the maxplen+slen>512 suffix truncation, the
leveva/../PLAN-P8-progress.md:313:  syms via `link_anchor()`; no `cref_`, no `ircd_testkit`). Dual-World diffs collapse to a
leveva/../PLAN-P6-progress.md:6:- **P6a DONE: `s_conf.c` TKLINE cluster** (`m_tkline`/`m_untkline`/`prep_kline`/`do_kline`/`wdhms2sec`/`tkline_expire` + the `tkconf` list) — the oper temporary-kill family ported to `ircd-common/s_conf.rs` via an `s_conf_link.o` partial port (`-DPORT_TKLINE_P6`; the rest of `s_conf.c`'s config grammar stays C). Handler cluster, not server-reachable (msgtab col 2/3; do_kline emits only local `SCH_NOTICE`→`&NOTICES` notices + reaps local clients). Gates: L1 (`s_conf_tkline_diff`: wdhms2sec corpus + tkconf add/dedup/expire lifecycle with inverses, highest_fd pinned -1) + L2 (`golden_s_conf_tkline`: oper TKLINE notice/UNTKLINE/bad-format, the two-client reap → 465+disconnect, non-oper 481 inverse). No S2S (no IsServer/remote-field/propagation path).
leveva/../PLAN-P6-progress.md:7:- **P6b DONE: `res.c` `m_dns`** (the resolver/cache debug command — the *last* command handler still in C) — ported to `ircd-common/res.rs` via a `res_link.o` partial port (`-DPORT_DNS_M_DNS`, de-static'ing `cachetop`/`cainfo`/`reinfo`); the resolver proper stays C. **Every `msgtab` handler is now Rust.** Handler cluster, msgtab col 2 (STAT_OPER) only + the `is_allowed(ACL_DNS)` O-line `d` gate. L2 (`golden_s_dns`, `dns_oper.conf`): oper `DNS` stats + `DNS l` empty cache dump, non-oper 481 inverse. No S2S.
leveva/../PLAN-P6-progress.md:31:- **P6z DONE: `res.c` `query_name`** (the DNS query builder/sender — the leaf above the P6y `send_res_msg`: `do_query_name`/`do_query_number`/`resend_query`/`get_res` call it) — ported to `ircd-common/res.rs` via the `res_link.o` partial port (`-DPORT_RES_QUERY_P6z`; a new three-way `RES_QUERY_LINKAGE` seam de-statics it: extern in res_link.o so the still-C callers resolve the Rust def at link, GLOBAL in the cref oracle for `cref_query_name`). Builds the query into a `MAXPACKET` buffer via the Rust `ircd_res_mkquery` (P6o), picks a DNS id that doesn't collide with the outstanding-request queue (`do { nstmp = ntohs(hptr->id)+k + (tv.tv_usec & 0xffff); … } while (find_id(...))` — LRAND48 off → `gettimeofday`-seeded), records `id`/`sends++`/`sent` on the `ResRQ`, and fans the packet via `send_res_msg` (P6y); `r<=0` → `h_errno=NO_RECOVERY` return `r`, send `-1` → `h_errno=TRY_AGAIN` (with `sends` already bumped). Utility/callee (not in `msgtab`). Gate: L1 (`res_query_name_diff`: two isolated `World`s each with own loopback `::1` UDP recv+send sockets + `ircd_res`/`reinfo`/`resfd`/`first` base pointers; a **strong interposed `gettimeofday`** pins the id randomization so packets are byte-identical between worlds + the `find_id` collision loop is deterministic — A-record/PTR queries, a forced one-collision id advance vs the no-collision inverse, mkquery-failure NO_RECOVERY no-send, send-failure TRY_AGAIN with `sends` still bumped; diffed on `{ret, datagram bytes, rptr.{id,sends,sent}, re_sent delta, h_errno}`). No L2 (DNS path disabled project-wide via `NO_DNS_LOOKUP`; boot goldens `golden_registration`/`golden_s_dns` stay byte-identical — the still-C resolver calls the Rust `query_name`), no S2S. **Still C in `res.c`:** the answer parser + socket I/O (`do_query_name`/`do_query_number`/`resend_query`/`proc_answer`/`get_res`/`gethost_*`/`init_resolver`).
leveva/../PLAN-P6-progress.md:39:- **P6hh DONE: `chkconf.c` → standalone `chkconf-rs` binary** (the IRCnet config-file checker; the last C in P6) — faithful byte-for-byte port of every path compiled under the locked config (`M4_PREPROC`/`CONFIG_DIRECTIVE_INCLUDE`/`DEBUGMODE`/`XLINE` OFF): `main`+arg-parse, `new_class`/`get_class`, `dgets`, `getfield` (incl. the escape-loop quirk), `initconf`, `validate`, `confchar`, `checkSID`, `config_error` (CHKCONF non-CDI branch), `mycmp`. Standalone crate (no `ircd-sys` dep, like `iauth-rs`); the single-file config collapses the `mywc`/`files`/`findConfLineNumber` machinery to the constant per-line location (`"ircd.conf"`, line `nr`). `config_read.c` needs no separate Rust lib (ircd uses `config_parse.rs` from P6f; `chkconf-rs` reimplements `config_error`). **Gate:** L1 black-box differential (`tests/differential.rs`) — builds the reference C `chkconf` oracle (`make -C cbuild chkconf`) and diffs stdout+stderr+exit byte-identical over 13 fixtures × {none,-d,-d3,-d9,-s} + `-h` (argv0-masked). Two C UB paths (non-NUL-terminated `dgets` buffer: ≥511-char line echo under `-d`, and a config with no trailing newline) are documented and excluded. No L2/S2S (standalone CLI, not a `msgtab` handler).
leveva/../PLAN-P7-progress.md:20:- **P7o DONE: `s_bsd.c` `add_listener` (listener-constructor wrapper)** — ported the layer directly above the now-Rust `open_listener` (P7n): `add_listener` (s_bsd.c:330) builds the `me`-like listener-stub `aClient` via the Rust `make_client`/`make_link` (P2) — `FLAGS_LISTEN`, `SetMe` (STAT_ME), self `acpt`/`from`, `name = ME` (= `me.name`), `firsttime = time(NULL)`, a one-element `confs` link carrying the passed `aconf` — opens the socket via the Rust `open_listener`, then prepends the client to `ListenerLL` (back-linking the old head's `prev` when non-empty); returns 0. No `#ifdef`s. Partial port via the existing `s_bsd_link.o` seam, new guard `-DPORT_S_BSD_ADD_LISTENER_P7o`; all callees already Rust → no new still-C externs (`add_listener` referenced by the now-Rust `s_conf.rs` initconf). L1 differential (`add_listener_diff.rs`, 3 cases: into empty `ListenerLL` → sole node listening+registered with prev/next NULL, prepend before an existing node → new head + old head's `prev` back-linked (inverse), two consecutive calls → chain order + back-links) zero-diff vs `cref_add_listener`, isolated worlds (each opens its own socket / `make_client` allocates its own pointer → compares observable facts not raw fd/pointer values; `me.name` pinned to `irc.test` so `inetport`'s `ME`-based sockhost matches; `firsttime=time(NULL)` asserted non-zero, not compared), serialized on `GLOBALS_LOCK`. No new L2 (callee, hit at boot/rehash via `s_conf.c` initconf; `golden_registration` byte-identical); no S2S (formats no remote-user wire fields).
leveva/../PLAN-P7-progress.md:29:- **P7w DONE: `s_auth.c` ident-protocol I/O pair `send_authports`/`read_authports`** — ported the RFC1413 ident query/reply pair to `ircd-common/src/s_auth.rs` (the leaf relative to the still-C `start_auth` + the `s_bsd.c` event loop at `s_bsd.c:2363`/`2368`). `send_authports`: `getsockname`/`getpeername(fd)`→`"theirport , ourport\r\n"`→`write(authfd)`, with the `authsenderr` failure path (`ircstp->is_abad++`, close `authfd`, `highest_fd` walk past NULL `local[]`, `authfd=-1`, clear `FLAGS_AUTH|FLAGS_WRAUTH`); success clears only `FLAGS_WRAUTH`. `read_authports`: `read` buffered across partial reads via `cptr->count`, `sscanf` the `"%hd , %hd : USERID : %*[^:]: %512s"` grammar, set `auth` (`OTHER`→`-`-prefixed `MyMalloc`, else `mystrdup`) + `set_clean_username` (P7v sibling) + `FLAGS_GOTID`; no `\n`/`\r` yet → early return; bad/empty → `is_abad++`. Config-resolved (USE_SYSLOG/DEBUGMODE off → no syslog/`get_client_name`/`Debug`; AFINET=AF_INET6 → `sockaddr_in6`/`sin6_port`; BUFSIZE=512). `index`→`strchr`, `rindex`→`strrchr`, `MyFree`→`free`, `ntohs`→`u16::from_be`; `sscanf` driven through libc with the exact C format. Seam: `-DPORT_S_AUTH_AUTHPORTS_P7w` on `s_auth_link.o`; both already global in `s_auth_ext.h` → no de-static, the prototype comes from the header. **L1** (`authports_diff.rs`, 10 cases) zero-diff vs `cref_`: `send_authports` over a *real* IPv6-loopback connected socket (so `getsockname`/`getpeername` populate `sin6_port` — an AF_UNIX socketpair leaves the port bytes untouched, a false diff) + the error/`highest_fd`-walk paths; `read_authports` over socketpair read-ends covering valid/OTHER/bad/ERROR/partial-early-return/EOF + the pre-auth free + `istat` decrement. Serialized on `GLOBALS_LOCK`. No L2/no S2S (utility TU, no `msgtab` entry, no live ident peer in the golden harness, no remote-user fields); existing golden suite (`golden_registration`) stays byte-identical.
leveva/../PLAN-P7-progress.md:42:- **P7jj DONE: `ircd.c` `setup_me` boot initializer** — ported the `me`-singleton initializer (ircd.c:723, de-static'd + extern-declared, `-DPORT_IRCD_SETUP_ME_P7jj` on `ircd_link.o`) to `ircd-common/src/ircd.rs`: passwd-derived `username`/`auth`, `get_my_name` sockhost, the `STAT_ME`/`FLAGS_OPER`/`FLAGS_EOB`/`SV_UID` bits, server-name interning (`find_server_num`/`find_server_string`), `make_user`, `istat.is_users`/`is_eobservers`, client+SID hash registration, `verstr=PATCHLEVEL`, `setup_server_channels`. All callees already Rust; no variadic senders. **L2-gated, no L1** (mutates 4 shared global tables + the `me` singleton + `istat` → not L1-isolatable; the P7dd/ee/ff precedent) — golden registration/lusers/s2s_server/s2s_info/s2s_map + 3 s_misc byte-identical (stats_t = documented pre-existing reference-C garbage flake). No S2S (no command wire output).
leveva/../PLAN-P7-progress.md:43:- **P7kk DONE: `ircd.c` signal-handler + reboot cluster** (`s_die`/`s_slave`/`s_rehash`/`s_restart`/`restart`/`server_reboot`, ircd.c:73–215) — ported the SIGTERM/SIGUSR1/SIGHUP/SIGINT handlers + the `restart`→`server_reboot` shutdown path to `ircd-common/src/ircd.rs` via `-DPORT_IRCD_SIGNALS_P7kk` (single guard over the contiguous block; `#else` re-declares the two non-header handlers for the still-C `setup_signals`); de-static'd the `dorehash`/`dorestart`/`restart_iauth` flags (shared with the still-C `io_loop`; one C definition, Rust writes via a local `extern "C"` block) and `s_rehash`/`s_slave` (cref oracle). `IRCD_PATH` plumbed as `ircd_sys::SERVER_PATH` for `server_reboot`'s `execv`. L1 differential (`ircd_signals_diff.rs`, 3 tests: `s_rehash` 0→1→2→2 ratchet, `s_slave` restart_iauth set, `s_restart` dorestart-when-not-tty) zero-diff vs `cref_`, serialized on `GLOBALS_LOCK`, signal dispositions saved/restored. L2 = boot gate (setup_signals installs the Rust handlers) + `golden_s_serv_shutdown`/`_maint` (die/restart/rehash reject + rehash_success io_loop path) byte-identical; the terminating arms (`exit`/`execv`) are faithful-by-inspection. No S2S (no command-driven remote-user wire fields).
leveva/../PLAN-P7-progress.md:44:- **P7ll DONE: `ircd.c` `setup_signals` (boot signal installer)** — ported the static `setup_signals` (ircd.c:1388, called once from the still-C `main`) to `ircd-common/src/ircd.rs`, the last clean leaf before the `c_ircd_main`/`io_loop` spine; all callees are now Rust (`dummy` P7a; `s_rehash`/`s_restart`/`s_die`/`s_slave` P7kk). Config-resolved: `POSIX_SIGNALS`=1 (the `sigaction` branch), `SIGWINCH` defined, `USE_IAUTH` ON (`s_slave`+SIGCHLD/`SA_NOCLDWAIT` arms), not `__FreeBSD__`, no `RESTARTING_SYSTEMCALLS`; faithful cumulative `sa_mask` (`sigemptyset` called exactly twice). De-static'd under `-DPORT_IRCD_SETUP_SIGNALS_P7ll` (split out of the line-34 static proto group; the cref archive keeps the de-static'd body → exports `cref_setup_signals`) on the `ircd_link.o` recipe; `nm` confirms `T setup_signals` from Rust. L1 (`setup_signals_diff.rs`, 1 case) zero-diff vs `cref_`: snapshot all 8 dispositions → call Rust `setup_signals` → query → call `cref_setup_signals` → query → restore; asserts per-signal `sa_flags` + `sa_mask` byte-identical between worlds and the *world-correct* handler wired (SIG_IGN for PIPE/WINCH/CHLD identical; else Rust `dummy`/`s_rehash`/… vs `cref_dummy`/… — handler ptrs differ by design), serialized on `GLOBALS_LOCK`. L2 = the still-C `main` installs the Rust handlers on every golden boot → `golden_registration`/`golden_s_serv_shutdown`/`golden_s_serv_maint` (die/restart reject + rehash_success) byte-identical. No S2S (no command-driven remote-user wire fields).
20:    ServerChannels_SCH_ERROR, ServerChannels_SCH_NOTICE, Status_STAT_CLIENT, Status_STAT_ME,
21:    Status_STAT_OPER, Status_STAT_SERVER, Status_STAT_SERVICE, Status_STAT_UNREG, ACL_NOPENALTY,
66:// Status / flag macros (struct_def.h), inline-translated. `status` is i16.
70:    (*x).status as c_int == Status_STAT_SERVER
74:    (*x).status as c_int == Status_STAT_ME
78:    let s = (*x).status as c_int;
79:    s == Status_STAT_CLIENT || s == Status_STAT_OPER
87:    (*x).status as c_int == Status_STAT_SERVICE && !(*x).service.is_null()
91:    (*x).status as c_int >= Status_STAT_SERVER || (*x).status as c_int == Status_STAT_ME
95:    let s = (*x).status as c_int;
96:    (s == Status_STAT_CLIENT || s == Status_STAT_OPER) && !(*x).user.is_null()
176:    row!(
182:    row!(c"NJOIN", 2, MPAR, [m_njoin, m_nop, m_nop, m_nop, m_unreg]),
183:    row!(c"JOIN", 1, MPAR, [m_nop, m_join, m_join, m_nop, m_unreg]),
184:    row!(c"MODE", 1, MPAR, [m_mode, m_mode, m_mode, m_nop, m_unreg]),
185:    row!(c"UNICK", 7, MPAR, [m_unick, m_nop, m_nop, m_nop, m_unreg]),
186:    row!(c"NICK", 1, MPAR, [m_nick, m_nick, m_nick, m_nop, m_nick]),
187:    row!(c"PART", 1, MPAR, [m_part, m_part, m_part, m_nop, m_unreg]),
188:    row!(c"QUIT", 0, MPAR, [m_quit, m_quit, m_quit, m_quit, m_quit]),
189:    row!(
195:    row!(c"KICK", 2, MPAR, [m_kick, m_kick, m_kick, m_nop, m_unreg]),
196:    row!(
202:    row!(c"SMASK", 2, MPAR, [m_smask, m_nop, m_nop, m_nop, m_unreg]),
203:    row!(
209:    row!(c"TOPIC", 1, MPAR, [m_nop, m_topic, m_topic, m_nop, m_unreg]),
210:    row!(
216:    row!(
222:    row!(c"PING", 1, MPAR, [m_ping, m_ping, m_ping, m_ping, m_unreg]),
223:    row!(c"PONG", 1, MPAR, [m_pong, m_pong, m_pong, m_pong, m_unreg]),
224:    row!(c"ERROR", 1, MPAR, [m_error, m_nop, m_nop, m_nop, m_unreg]),
