NickServ GETEMAIL + ChanServ SET RESTRICTED
All checks were successful
CI / check (push) Successful in 3m51s
All checks were successful
CI / check (push) Successful in 3m51s
GETEMAIL (auspex) lists accounts whose email matches a glob. SET RESTRICTED makes a channel kick anyone without access (or oper) as they join, mirroring the SECUREOPS on-join enforcement.
This commit is contained in:
parent
be4860c9a8
commit
53d3d63464
10 changed files with 107 additions and 2 deletions
|
|
@ -22,6 +22,12 @@ impl Store for Db {
|
|||
.map(|a| AccountView { name: a.name.clone(), email: a.email.clone(), ts: a.ts, verified: a.verified, greet: a.greet.clone() })
|
||||
.collect()
|
||||
}
|
||||
fn accounts_by_email(&self, pattern: &str) -> Vec<String> {
|
||||
self.accounts()
|
||||
.filter(|a| a.email.as_deref().is_some_and(|e| super::glob_match(pattern, e)))
|
||||
.map(|a| a.name.clone())
|
||||
.collect()
|
||||
}
|
||||
fn authenticate(&self, name: &str, password: &str) -> Option<&str> {
|
||||
Db::authenticate(self, name, password)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue