SendStaff() public static method

Sends a staff message (/Staff).
public static SendStaff ( [ player, [ rawMessage ) : bool
player [ Player writing the message.
rawMessage [ Message text.
return bool
示例#1
0
        static void StaffHandler(Player player, CommandReader cmd)
        {
            if (player.Info.IsMuted)
            {
                player.MessageMuted();
                return;
            }

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

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

            if (message.Length > 0)
            {
                Chat.SendStaff(player, message);
            }
        }
示例#2
0
        static void StaffHandler(Player player, Command cmd)
        {
            if (player.Info.IsMuted)
            {
                player.MessageMuted();
                return;
            }

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

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

            if (message.Length > 0)
            {
                if (player.Can(Permission.UseColorCodes) && message.Contains("%"))
                {
                    message = Color.ReplacePercentCodes(message);
                }
                Chat.SendStaff(player, message);
            }
        }