CwIRC.Interface.SendData C# (CSharp) Méthode

SendData() public méthode

Puts a message on the upstream IRC message buffer.
public SendData ( string p_string ) : void
p_string string The message to put on the upstream IRC message buffer.
Résultat void
        public void SendData(string p_string)
        {
            streamWriter.WriteLine(p_string + "\r\n");
            streamWriter.Flush();
        }

Usage Example

Exemple #1
0
        /// <summary>
        /// Sends the given IRCResponse to the server, using the method specified by the IRCResponse's ResponseType.
        /// </summary>
        /// <param name="response">The IRCResponse to send to the server.</param>
        /// <returns>Whether or not the send was successful (actually whether or not the given response is valid).</returns>
        bool Send(IRCResponse response)
        {
            if (response == null)
            {
                return(false);
            }

            switch (response.Type)
            {
            case ResponseType.Say:
                Say(response.Response, response.Target);
                break;

            case ResponseType.Do:
                Do(response.Response, response.Target);
                break;

            case ResponseType.Notice:
                Notice(response.Response, response.Target);
                break;

            case ResponseType.Raw:
                cwIRC.SendData(response.Response);
                break;
            }
            return(true);
        }
All Usage Examples Of CwIRC.Interface::SendData