OperServ: add SVSPART
All checks were successful
CI / check (push) Successful in 3m36s

SVSPART <nick> <#channel> [reason] forces a user out of a channel
(admin-only), completing the SVS command family alongside SVSNICK and
SVSJOIN. New ForcePart action rendered as the ircd SVSPART command.
This commit is contained in:
Jean Chevronnet 2026-07-16 00:00:18 +00:00
parent 53d3d63464
commit ccbbb91fda
No known key found for this signature in database
5 changed files with 83 additions and 0 deletions

View file

@ -71,6 +71,7 @@ pub enum NetAction {
// Force a user into a channel (SVSJOIN), e.g. applying an account's auto-join
// list on identify. `key` is empty for keyless channels.
ForceJoin { uid: String, channel: String, key: String },
ForcePart { uid: String, channel: String, reason: String },
// Remove one of our pseudo-clients (e.g. a deleted bot) from the network.
QuitUser { uid: String, reason: String },
// A services pseudo-client (a bot) joins / parts a channel.
@ -349,6 +350,15 @@ impl ServiceCtx {
});
}
// Force a user out of a channel (SVSPART).
pub fn force_part(&mut self, uid: &str, channel: &str, reason: &str) {
self.actions.push(NetAction::ForcePart {
uid: uid.to_string(),
channel: channel.to_string(),
reason: reason.to_string(),
});
}
// Set channel modes, sourced from pseudoclient `from` (e.g. ChanServ).
pub fn channel_mode(&mut self, from: &str, channel: &str, modes: &str) {
self.actions.push(NetAction::ChannelMode {