Skip to content

Commit

Permalink
feat
Browse files Browse the repository at this point in the history
  • Loading branch information
shulng committed Jul 29, 2024
1 parent 034f31b commit 0b259f5
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,12 @@ public static boolean recordCurrentIP(Player player) {
long lastLoginTime = loginPlayer.getLastAction();
long timeoutInMilliseconds = Config.Settings.IPTimeout * 60 * 1000;

if (storedIPs.contains(currentIP) && (currentTime - lastLoginTime) <= timeoutInMilliseconds) {
return true;
if (Config.Settings.IPTimeout == 0) {
return storedIPs.contains(currentIP);
} else {
if (storedIPs.contains(currentIP) && (currentTime - lastLoginTime) <= timeoutInMilliseconds) {
return true;
}
}
}
}
Expand Down

0 comments on commit 0b259f5

Please sign in to comment.