Merge commit

This commit is contained in:
Khyperia 2011-12-03 11:14:53 -05:00
commit 85d743dce5

View File

@ -468,10 +468,11 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
public void checkActivity()
{
final long autoafkkick = ess.getSettings().getAutoAfkKick();
if (autoafkkick > 0 && lastActivity + autoafkkick * 1000 < System.currentTimeMillis()
if (autoafkkick > 0 && lastActivity > 0 && (lastActivity + (autoafkkick * 1000)) < System.currentTimeMillis()
&& !isHidden() && !isAuthorized("essentials.kick.exempt") && !isAuthorized("essentials.afk.kickexempt"))
{
final String kickReason = _("autoAfkKickReason", autoafkkick / 60.0);
lastActivity = 0;
kickPlayer(kickReason);