Players auto-removed due to inactivity or due to being banned now have their data deleted immediately; this should fix the log spam of the same players repeatedly being marked for deletion

This commit is contained in:
Brettflan 2012-01-09 21:37:16 -06:00
parent 1c918ad52e
commit 65f16b74bd
2 changed files with 4 additions and 4 deletions

View File

@ -62,16 +62,15 @@ public class FPlayers extends PlayerEntityCollection<FPlayer>
{
if (now - fplayer.getLastLoginTime() > toleranceMillis)
{
// TODO: This stops the memory leak crashes but does not solve the issue: MEMBERS ARE NOT KICKED!!!
// TODO: DO SOMETHING ABOUT THIS
/*if (Conf.logFactionLeave || Conf.logFactionKick)
P.p.log("Player "+fplayer.getName()+" was auto-removed due to inactivity.");*/
if (Conf.logFactionLeave || Conf.logFactionKick)
P.p.log("Player "+fplayer.getName()+" was auto-removed due to inactivity.");
// if player is faction leader, sort out the faction since he's going away
if (fplayer.getRole() == Rel.LEADER)
fplayer.getFaction().promoteNewLeader();
fplayer.leave(false);
fplayer.detach();
}
}
}

View File

@ -420,6 +420,7 @@ public class FactionsPlayerListener extends PlayerListener
if (badGuy.getRole() == Rel.LEADER)
badGuy.getFaction().promoteNewLeader();
badGuy.leave(false);
badGuy.detach();
}
}
}