nickserv/chanserv: catch styled/fullwidth look-alike names too, and add a [register] confusable_check toggle (REHASH-reloadable)
All checks were successful
CI / check (push) Successful in 3m48s
All checks were successful
CI / check (push) Successful in 3m48s
This commit is contained in:
parent
c2b70f5004
commit
89ac01d0b0
11 changed files with 72 additions and 12 deletions
|
|
@ -132,10 +132,12 @@ impl Service for ChanServ {
|
|||
return;
|
||||
}
|
||||
// Refuse a look-alike / mixed-script channel name (e.g. a Cyrillic
|
||||
// homoglyph of a real channel).
|
||||
if let Some(reason) = echo_api::confusable_reason(chan) {
|
||||
ctx.notice(me, from.uid, reason);
|
||||
return;
|
||||
// homoglyph of a real channel), unless the guard is turned off.
|
||||
if db.confusable_check_enabled() {
|
||||
if let Some(reason) = echo_api::confusable_reason(chan) {
|
||||
ctx.notice(me, from.uid, reason);
|
||||
return;
|
||||
}
|
||||
}
|
||||
match db.register_channel(chan, account) {
|
||||
Ok(()) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue