示例#1
0
        /// <summary>
        /// Reads a string from a packet, and treats it like a chat message, purifying it.
        /// </summary>
        /// <param name="packet">the packet to read from</param>
        /// <returns>the purified chat message</returns>
        private static string ReadMessage(RealmPacketIn packet)
        {
            var msg = packet.ReadCString();

            ChatUtility.Purify(ref msg);

            return(msg);
        }
示例#2
0
 /// <summary>Colorizes the given message with the given color.</summary>
 /// <param name="msg">the message to colorize</param>
 /// <param name="red">the red color value</param>
 /// <param name="green">the green color value</param>
 /// <param name="blue">the blue color value</param>
 /// <returns>a colorized string</returns>
 public static string Colorize(string msg, string red, string green, string blue)
 {
     return(ChatUtility.Colorize(msg, red, green, blue, true));
 }
示例#3
0
 /// <summary>Colorizes the given message with the given color.</summary>
 /// <param name="msg">the message to colorize</param>
 /// <param name="colorRgb">the color value</param>
 /// <returns>a colorized string</returns>
 public static string Colorize(string msg, string colorRgb)
 {
     return(ChatUtility.Colorize(msg, colorRgb, true));
 }
示例#4
0
 /// <summary>Colorizes the given message with the given color.</summary>
 /// <param name="msg">the message to colorize</param>
 /// <param name="color">the color value</param>
 /// <returns>a colorized string</returns>
 public static string Colorize(string msg, Color color)
 {
     return(ChatUtility.Colorize(msg, color, true));
 }