SendMe() public static method

Sends an action message (/Me).
public static SendMe ( [ player, [ rawMessage ) : bool
player [ Player writing the message.
rawMessage [ Message text.
return bool
Beispiel #1
0
        static void MeHandler(Player player, Command cmd)
        {
            if (player.Info.IsMuted)
            {
                player.MessageMuted();
                return;
            }

            if (player.DetectChatSpam())
            {
                return;
            }

            string msg = cmd.NextAll().Trim();

            if (msg.Length > 0)
            {
                player.Info.ProcessMessageWritten();
                if (player.Can(Permission.UseColorCodes) && msg.Contains("%"))
                {
                    msg = Color.ReplacePercentCodes(msg);
                }
                Chat.SendMe(player, msg);
            }
        }
Beispiel #2
0
        static void MeHandler(Player player, Command cmd)
        {
            if (player.Info.IsMuted)
            {
                player.MessageMuted();
                return;
            }

            if (player.DetectChatSpam())
            {
                return;
            }

            string msg = cmd.NextAll().Trim();

            if (msg.Length > 0)
            {
                player.Info.ProcessMessageWritten();
                Chat.SendMe(player, msg);
            }
        }
Beispiel #3
0
        static void MeHandler([NotNull] Player player, [NotNull] CommandReader cmd)
        {
            if (player.Info.IsMuted)
            {
                player.MessageMuted();
                return;
            }

            if (player.DetectChatSpam())
            {
                return;
            }

            string msg = cmd.NextAll().Trim(' ');

            if (msg.Length > 0)
            {
                Chat.SendMe(player, msg);
            }
            else
            {
                CdMe.PrintUsage(player);
            }
        }