From 6b70f32afb472b5e4b15d58fb24445d194935db4 Mon Sep 17 00:00:00 2001 From: Maxetto Date: Mon, 29 Jun 2015 17:29:52 +0200 Subject: [PATCH] Typo fix + change to REGEX (matches) This will deny also IP coming from the default IP 192.168.1.1 --- src/main/java/fr/xephi/authme/process/join/AsyncronousJoin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/process/join/AsyncronousJoin.java b/src/main/java/fr/xephi/authme/process/join/AsyncronousJoin.java index 3e0605cf..8da16fd9 100644 --- a/src/main/java/fr/xephi/authme/process/join/AsyncronousJoin.java +++ b/src/main/java/fr/xephi/authme/process/join/AsyncronousJoin.java @@ -100,7 +100,7 @@ public class AsyncronousJoin { long timeout = Settings.getSessionTimeout * 60000; long lastLogin = auth.getLastLogin(); long cur = new Date().getTime(); - if ((cur - lastLogin < timeout || timeout == 0) && !auth.getIp().equals("198.18.0.1")) { + if ((cur - lastLogin < timeout || timeout == 0) && !auth.getIp().matches("198.168.(0|1).1")) { if (auth.getNickname().equalsIgnoreCase(name) && auth.getIp().equals(ip)) { if (PlayerCache.getInstance().getAuth(name) != null) { PlayerCache.getInstance().updatePlayer(auth);