Only afk people, if they have essentials.afk permission.

This commit is contained in:
snowleo 2011-09-29 23:54:48 +02:00
parent 4a52cd7c98
commit c6e68f72ea

View File

@ -460,7 +460,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
} }
} }
final long autoafk = ess.getSettings().getAutoAfk(); final long autoafk = ess.getSettings().getAutoAfk();
if (!isAfk() && autoafk > 0 && lastActivity + autoafk * 1000 < System.currentTimeMillis()) if (!isAfk() && autoafk > 0 && lastActivity + autoafk * 1000 < System.currentTimeMillis() && isAuthorized("essentials.afk"))
{ {
setAfk(true); setAfk(true);
if (!isHidden()) { if (!isHidden()) {