chanserv: op, deop, voice, devoice, kick, ban, unban

Adds channel moderation commands sourced from the ChanServ pseudoclient.
Tracks connected users' nicks and hosts so targets can be resolved by
nick and banned by *!*@host. All commands require operator access.
This commit is contained in:
Jean Chevronnet 2026-07-12 11:21:35 +00:00
parent f0ce2d9d1b
commit acd0e60946
No known key found for this signature in database
13 changed files with 233 additions and 26 deletions

View file

@ -80,6 +80,11 @@ impl ChannelInfo {
.map(|a| if a.level == "voice" { "+v" } else { "+o" })
}
/// Whether `account` has operator access (founder or access-list op).
pub fn is_op(&self, account: &str) -> bool {
self.join_mode(account) == Some("+o")
}
/// The mode string services keep applied: +r plus the lock.
pub fn lock_modes(&self) -> String {
let mut s = format!("+r{}", self.lock_on);