reputation: full parity port — CIDR ipv4/ipv6 masking, reputationexpire decay rules, whois visibility modes, config-driven db/bump/expire/save/minchanmembers/scorecap (no hardcoding)
This commit is contained in:
parent
eb121a75f8
commit
f6fbff5270
6 changed files with 233 additions and 88 deletions
|
|
@ -54,13 +54,7 @@ fn matches(s: &Server, uid: Uid, g: &SecGroup) -> bool {
|
|||
return false;
|
||||
}
|
||||
if g.score_min.is_some() || g.score_max.is_some() {
|
||||
let ip = u.addr.ip();
|
||||
let score = s
|
||||
.ext
|
||||
.get::<crate::modules::reputation::Reputation>()
|
||||
.and_then(|r| r.0.get(&ip))
|
||||
.copied()
|
||||
.unwrap_or(0);
|
||||
let score = crate::modules::reputation::score_of(s, uid);
|
||||
if g.score_min.is_some_and(|m| score < m) || g.score_max.is_some_and(|m| score > m) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue