mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-28 05:05:14 +01:00
Allow session timeout = 0 (with warnings)
This commit is contained in:
parent
ba06bb514a
commit
5388f08117
@ -252,6 +252,10 @@ public class AuthMe extends JavaPlugin {
|
|||||||
ConsoleLogger.showError("WARNING!!! By disabling ForceSingleSession, your server protection is inadequate!");
|
ConsoleLogger.showError("WARNING!!! By disabling ForceSingleSession, your server protection is inadequate!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Settings.getSessionTimeout == 0 && Settings.isSessionsEnabled){
|
||||||
|
ConsoleLogger.showError("WARNING!!! You set session timeout to 0, this may cause security issues!");
|
||||||
|
}
|
||||||
|
|
||||||
if (Settings.reloadSupport)
|
if (Settings.reloadSupport)
|
||||||
try {
|
try {
|
||||||
int playersOnline = 0;
|
int playersOnline = 0;
|
||||||
|
@ -78,6 +78,7 @@ public class AsyncronousQuit {
|
|||||||
LimboCache.getInstance().deleteLimboPlayer(name);
|
LimboCache.getInstance().deleteLimboPlayer(name);
|
||||||
}
|
}
|
||||||
if (Settings.isSessionsEnabled && !isKick) {
|
if (Settings.isSessionsEnabled && !isKick) {
|
||||||
|
if (Settings.getSessionTimeout != 0){
|
||||||
BukkitTask task = plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() {
|
BukkitTask task = plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, new Runnable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -90,6 +91,7 @@ public class AsyncronousQuit {
|
|||||||
|
|
||||||
}, Settings.getSessionTimeout * 20 * 60);
|
}, Settings.getSessionTimeout * 20 * 60);
|
||||||
plugin.sessions.put(name, task);
|
plugin.sessions.put(name, task);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
PlayerCache.getInstance().removePlayer(name);
|
PlayerCache.getInstance().removePlayer(name);
|
||||||
database.setUnlogged(name);
|
database.setUnlogged(name);
|
||||||
|
Loading…
Reference in New Issue
Block a user