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:
parent
acd0e60946
commit
ba3803e01c
11 changed files with 369 additions and 7 deletions
|
|
@ -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(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue