Ejemplo n.º 1
0
 private static void AFKHandler(Player player, CommandReader cmd) {
     string msg = cmd.NextAll();
     if (player.Info.IsMuted) {
         player.MessageMuted();
         return;
     }
     Server.Players.CanSee(player)
         .Message("&S{0} is {1} AFK{2}", player.Name, player.Info.IsAFK ? "no longer" : "now",
         msg.Length > 0 ? " (" + (msg.Length > 32 ? msg.Remove(32) : msg) + ")" : "");
     player.Message("&SYou are {0} AFK {1}", player.Info.IsAFK ? "no longer" : "now",
         msg.Length > 0 ? " (" + (msg.Length > 32 ? msg.Remove(32) : msg) + ")" : "");
     player.Info.IsAFK = !player.Info.IsAFK;
     player.Info.oldafkMob = player.Info.afkMob;
     player.Info.afkMob = player.Info.IsAFK ? player.AFKModel : player.Info.Mob;
     Server.UpdateTabList();
     player.ResetIdBotTimer();
 }