diff --git a/MCGalaxy/Commands/Chat/CmdAfk.cs b/MCGalaxy/Commands/Chat/CmdAfk.cs
index 8a15c6e96..3513f705c 100644
--- a/MCGalaxy/Commands/Chat/CmdAfk.cs
+++ b/MCGalaxy/Commands/Chat/CmdAfk.cs
@@ -33,7 +33,7 @@ namespace MCGalaxy.Commands.Chatting {
TabList.Update(p, true);
p.LastAction = DateTime.UtcNow;
- bool cantSend = p.muted || (Server.chatmod && !p.voice);
+ bool cantSend = !p.CanSpeak();
if (p.IsAfk) {
if (cantSend) {
p.Message("You are now marked as being AFK.");
diff --git a/MCGalaxy/Player/Player.cs b/MCGalaxy/Player/Player.cs
index 41f954577..d12e3e143 100644
--- a/MCGalaxy/Player/Player.cs
+++ b/MCGalaxy/Player/Player.cs
@@ -312,11 +312,16 @@ namespace MCGalaxy {
#endregion
+ /// Returns whether the player is currently allowed to talk.
+ public bool CanSpeak() { return !muted && (voice || !Server.chatmod); }
+
+ /// Blocks calling thread until all 'new map loaded' packets have been sent.
public void BlockUntilLoad(int sleep) {
while (Loading)
Thread.Sleep(sleep);
}
+ /// Checks if player is currently unverified, and if so, sends a message informing them
public void CheckIsUnverified() {
if (verifiedPass) return;
Unverified = Server.Config.verifyadmins && Rank >= Server.Config.VerifyAdminsRank;