Пример #1
0
        /// <summary>
        /// Reports a given error string to the client.
        /// </summary>
        /// <param name="sError">The error to report.</param>
        public void SendClientError(string sError)
        {
            ServerMessage message = new ServerMessage(ResponseOpcodes.GenericError);
            message.Append(sError);

            GetConnection().SendMessage(message);
        }
Пример #2
0
        /// <summary>
        /// Sends the 'You are banned' message to the client. The message holds a given ban reason.
        /// </summary>
        /// <param name="sText">The text to display in the ban message.</param>
        public void SendBanMessage(string sText)
        {
            ServerMessage message = new ServerMessage(ResponseOpcodes.UserBanned);
            message.Append(sText);

            GetConnection().SendMessage(message);
        }