"autoLeaveAfterDaysOfInactivity" routine now runs only once every few minutes instead of running every time a player logs in. New setting "autoLeaveRoutineRunsEveryXMinutes" (default 5 minutes) to determine just how often the routine is run.

The routine is also slightly more careful about how it calculates how long a player has been offline.
This commit is contained in:
Brettflan
2012-02-26 16:55:58 -06:00
parent d71bd15a79
commit de3c7436fe
5 changed files with 60 additions and 4 deletions

View File

@@ -60,7 +60,7 @@ public class FPlayers extends PlayerEntityCollection<FPlayer>
for (FPlayer fplayer : FPlayers.i.get())
{
if (now - fplayer.getLastLoginTime() > toleranceMillis)
if (fplayer.isOffline() && now - fplayer.getLastLoginTime() > toleranceMillis)
{
if (Conf.logFactionLeave || Conf.logFactionKick)
P.p.log("Player "+fplayer.getName()+" was auto-removed due to inactivity.");