summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
diff options
context:
space:
mode:
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandafk.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandafk.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
index c71883571..6a5d6dc26 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
@@ -32,12 +32,13 @@ public class Commandafk extends EssentialsCommand
private void toggleAfk(User user)
{
user.setDisplayNick();
+ String msg = "";
if (!user.toggleAfk())
{
//user.sendMessage(_("markedAsNotAway"));
if (!user.isHidden())
{
- ess.broadcastMessage(user, _("userIsNotAway", user.getDisplayName()));
+ msg = _("userIsNotAway", user.getDisplayName());
}
user.updateActivity(false);
}
@@ -46,8 +47,12 @@ public class Commandafk extends EssentialsCommand
//user.sendMessage(_("markedAsAway"));
if (!user.isHidden())
{
- ess.broadcastMessage(user, _("userIsAway", user.getDisplayName()));
+ msg = _("userIsAway", user.getDisplayName());
}
}
+ if (!msg.isEmpty())
+ {
+ ess.broadcastMessage(user, msg);
+ }
}
}