Skip to content

Commit 2c08163

Browse files
committedJan 6, 2025··
再修下 BUG
1 parent 926d3b3 commit 2c08163

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/main/java/com/ghostchu/peerbanhelper/module/impl/rule/IPBlackRuleList.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public ReloadResult reloadModule() throws Exception {
131131
for (IPBanResult ipBanResult : results) {
132132
try {
133133
if (ipBanResult == null) return pass();
134-
boolean match = ipBanResult.matchResult().result() == MatchResultEnum.TRUE || ipBanResult.matchResult().result() == MatchResultEnum.DEFAULT;
134+
boolean match = ipBanResult.matchResult().result() == MatchResultEnum.TRUE;
135135
if (match) {
136136
return new CheckResult(getClass(), PeerAction.BAN, banDuration, new TranslationComponent(ipBanResult.ruleName()), new TranslationComponent(Lang.MODULE_IBL_MATCH_IP_RULE, ipBanResult.ruleName(), ip, Optional.ofNullable(ipBanResult.matchResult().comment()).orElse(new TranslationComponent(Lang.MODULE_IBL_COMMENT_UNKNOWN))));
137137
}

‎src/main/java/com/ghostchu/peerbanhelper/util/rule/matcher/IPMatcher.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public long size() {
4949
new MatchResult(MatchResultEnum.DEFAULT, new TranslationComponent("IPs set is null"));
5050
}
5151
if (ips.elementContains(ip)) {
52-
return new MatchResult(MatchResultEnum.DEFAULT, new TranslationComponent(ips.get(ip)));
52+
return new MatchResult(MatchResultEnum.TRUE, new TranslationComponent(ips.get(ip)));
5353
}
5454
return new MatchResult(MatchResultEnum.DEFAULT, new TranslationComponent("Given IP not in IPs set"));
5555
}

0 commit comments

Comments
 (0)
Please sign in to comment.