Add ChanServ mode lock (MLOCK)

Founders lock channel modes with MLOCK <#channel> [modes]. The lock is a
ChannelMlock event, so it replicates and compacts like everything else;
it is applied on channel creation alongside +r and enforced by reverting
any FMODE that breaks it. Our own changes are filtered so enforcement
can't loop. Simple (paramless) modes for now.
This commit is contained in:
Jean Chevronnet 2026-07-12 09:33:23 +00:00
parent 727713ee3f
commit 353aee1b54
No known key found for this signature in database
5 changed files with 248 additions and 14 deletions

View file

@ -15,6 +15,9 @@ pub enum NetEvent {
// A channel was created or bursted (InspIRCd FJOIN). Subsequent single joins
// arrive as IJOIN and are not surfaced.
ChannelCreate { channel: String },
// A channel's modes changed (FMODE), for enforcing mode locks. Our own
// changes are filtered out by the protocol layer.
ChannelModeChange { channel: String, modes: String },
Quit { uid: String },
// An ircd relaying an IRCv3 account-registration request to us as the authority.
AccountRequest { reqid: String, origin: String, kind: String, account: String, p2: String, p3: String },