BotServ: add BOTLIST and AUTOASSIGN default bot
All checks were successful
CI / check (push) Successful in 3m33s
All checks were successful
CI / check (push) Successful in 3m33s
This commit is contained in:
parent
cd6d8b1b93
commit
dd43b9a331
12 changed files with 162 additions and 0 deletions
|
|
@ -286,6 +286,9 @@ pub struct NetData {
|
|||
pub opers: HashMap<String, OperGrant>,
|
||||
// Session-limit exceptions (OperServ SESSION): per-IP-mask allowances.
|
||||
pub sess_exceptions: Vec<SessionException>,
|
||||
// The bot auto-assigned to newly registered channels (BotServ AUTOASSIGN),
|
||||
// if any. Casefolded nick; None disables auto-assignment.
|
||||
pub default_bot: Option<String>,
|
||||
}
|
||||
|
||||
// A session-limit exception: an IP-mask glob and the session allowance for IPs
|
||||
|
|
@ -1060,6 +1063,9 @@ impl Db {
|
|||
for b in self.bots.values() {
|
||||
snapshot.push(Event::BotAdded(b.clone()));
|
||||
}
|
||||
if self.net.default_bot.is_some() {
|
||||
snapshot.push(Event::DefaultBotSet { bot: self.net.default_bot.clone() });
|
||||
}
|
||||
for host in &self.host_cfg.offers {
|
||||
snapshot.push(Event::VhostOfferAdded { host: host.clone() });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue