/// <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);
}