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:
parent
f0ce2d9d1b
commit
acd0e60946
13 changed files with 233 additions and 26 deletions
|
|
@ -1,5 +1,6 @@
|
|||
use crate::engine::db::{CertError, Db};
|
||||
use crate::engine::service::{Sender, Service, ServiceCtx};
|
||||
use crate::engine::state::Network;
|
||||
use crate::proto::RegReply;
|
||||
|
||||
pub struct NickServ {
|
||||
|
|
@ -21,7 +22,7 @@ impl Service for NickServ {
|
|||
"Nickname Services"
|
||||
}
|
||||
|
||||
fn on_command(&mut self, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, db: &mut Db) {
|
||||
fn on_command(&mut self, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, _net: &Network, db: &mut Db) {
|
||||
let me = self.uid.as_str();
|
||||
match args.first().map(|s| s.to_ascii_uppercase()).as_deref() {
|
||||
Some("REGISTER") => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue