Fix session timeout

whoops xD
This commit is contained in:
Gabriele C 2017-09-30 18:22:06 +02:00 committed by GitHub
parent 37dc918ece
commit ceba761b7b

View File

@ -179,7 +179,7 @@ public class AsynchronousJoin implements AsynchronousProcess {
if (auth != null) { if (auth != null) {
long timeSinceLastLogin = System.currentTimeMillis() - auth.getLastLogin(); long timeSinceLastLogin = System.currentTimeMillis() - auth.getLastLogin();
if(timeSinceLastLogin < 0 if(timeSinceLastLogin < 0
|| timeSinceLastLogin > (service.getProperty(PluginSettings.SESSIONS_TIMEOUT) * 60 * 60 * 1000) || timeSinceLastLogin > (service.getProperty(PluginSettings.SESSIONS_TIMEOUT) * 60 * 1000)
|| !auth.getIp().equals(PlayerUtils.getPlayerIp(player))) { || !auth.getIp().equals(PlayerUtils.getPlayerIp(player))) {
service.send(player, MessageKey.SESSION_EXPIRED); service.send(player, MessageKey.SESSION_EXPIRED);
} else { } else {