Typo fix + change to REGEX (matches)

This will deny also IP coming from the default IP 192.168.1.1
This commit is contained in:
Maxetto 2015-06-29 17:29:52 +02:00
parent 761b1feadb
commit 6b70f32afb

View File

@ -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);