From 118b3638eb18ac61365a0679f8d01ebd5aa8e482 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sat, 3 Dec 2011 13:50:32 +0000 Subject: [PATCH] Small cleanup to checkActivity --- Essentials/src/com/earth2me/essentials/User.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 3c1166240..2ef59eb88 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -468,10 +468,11 @@ public class User extends UserData implements Comparable, 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);