chanserv: topic, invite, akick, list, status

Adds the remaining moderation and listing commands. Auto-kick masks are
stored in the event log and enforced on join: a matching user is banned
and kicked. Topic and invite are sourced from the ChanServ pseudoclient.
This commit is contained in:
Jean Chevronnet 2026-07-12 11:30:07 +00:00
parent acd0e60946
commit ba3803e01c
No known key found for this signature in database
11 changed files with 369 additions and 7 deletions

View file

@ -99,4 +99,22 @@ impl ServiceCtx {
reason: reason.to_string(),
});
}
// Set a channel's topic, sourced from pseudoclient `from`.
pub fn topic(&mut self, from: &str, channel: &str, topic: &str) {
self.actions.push(NetAction::Topic {
from: from.to_string(),
channel: channel.to_string(),
topic: topic.to_string(),
});
}
// Invite a user to a channel, sourced from pseudoclient `from`.
pub fn invite(&mut self, from: &str, uid: &str, channel: &str) {
self.actions.push(NetAction::Invite {
from: from.to_string(),
uid: uid.to_string(),
channel: channel.to_string(),
});
}
}