SendAction() public static method

public static SendAction ( [ line ) : void
line [
return void
Ejemplo n.º 1
0
        private static void BroMode(Player player, Command command)
        {
            if (!Utils.BroMode.Active)
            {
                foreach (Player p in Server.Players)
                {
                    Utils.BroMode.GetInstance().RegisterPlayer(p);
                }
                Utils.BroMode.Active = true;
                Server.Players.Message("{0}&S turned Bro mode on.", player.Info.Rank.Color + player.Name);

                IRC.SendAction(player.Name + " &Sturned Bro mode on.");
            }
            else
            {
                foreach (Player p in Server.Players)
                {
                    Utils.BroMode.GetInstance().UnregisterPlayer(p);
                }

                Utils.BroMode.Active = false;
                Server.Players.Message("{0}&S turned Bro Mode off.", player.Info.Rank.Color + player.Name);
                IRC.SendAction(player.Name + " &Sturned Bro mode off");
            }
        }
Ejemplo n.º 2
0
        internal static void Say(Player player, Command cmd)
        {
            if (player.Info.IsMuted)
            {
                player.MutedMessage();
                return;
            }

            if (player.Can(Permission.Say))
            {
                string msg = cmd.NextAll();
                if (player.Can(Permission.UseColorCodes) && msg.Contains("%"))
                {
                    msg = Color.ReplacePercentCodes(msg);
                }
                if (msg != null && msg.Trim().Length > 0)
                {
                    player.Info.LinesWritten++;
                    Server.SendToAllExceptIgnored(player, "&Y{0}", null, msg.Trim());
                    IRC.SendAction(String.Format("&Y{0}", msg.Trim()));
                }
                else
                {
                    cdSay.PrintUsage(player);
                }
            }
            else
            {
                player.NoAccessMessage(Permission.Say);
            }
        }
Ejemplo n.º 3
0
        private static void RageHandler(Player player, Command cmd)
        {
            string reason = cmd.NextAll();

            if (reason.Length < 1)
            {
                Server.Players.Message("{0} &WRagequit from the server.", player.ClassyName);
                player.Kick(Player.Console, "&WRagequit", LeaveReason.RageQuit, false, false, false);
                IRC.SendAction(player.ClassyName + " &WRagequit from the server.");
                return;
            }
            Server.Players.Message("{0} &WRagequit from the server: {1}",
                                   player.ClassyName, reason);
            IRC.SendAction(player.ClassyName + " &WRagequit from the server: " + reason);
            player.Kick(Player.Console, reason, LeaveReason.RageQuit, false, false, false);
        }