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:
parent
761b1feadb
commit
6b70f32afb
@ -100,7 +100,7 @@ public class AsyncronousJoin {
|
|||||||
long timeout = Settings.getSessionTimeout * 60000;
|
long timeout = Settings.getSessionTimeout * 60000;
|
||||||
long lastLogin = auth.getLastLogin();
|
long lastLogin = auth.getLastLogin();
|
||||||
long cur = new Date().getTime();
|
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 (auth.getNickname().equalsIgnoreCase(name) && auth.getIp().equals(ip)) {
|
||||||
if (PlayerCache.getInstance().getAuth(name) != null) {
|
if (PlayerCache.getInstance().getAuth(name) != null) {
|
||||||
PlayerCache.getInstance().updatePlayer(auth);
|
PlayerCache.getInstance().updatePlayer(auth);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user