/// <summary> /// Joins specified channels. /// </summary> public static async Task Join(this IrcClient client, params string[] channels) { await client.SendParams("JOIN", string.Join(",", channels)); }
/// <summary> /// Send string command and parameters. /// </summary> /// <remarks> /// This is a convenience method to skip creating a new message object. /// To send a tailing parameter, use <see cref="SendParamsTrailing"/>. /// </remarks> public static async Task SendParams(this IrcClient client, string command, params string[] parameters) { await client.SendMessage(new Message(command, parameters)); }
/// <summary> /// Sends a NOTICE. /// </summary> public static async Task Notice(this IrcClient client, string destination, string text) { await client.SendParamsTrailing("NOTICE", destination, text); }
/// <summary> /// Parts specified channel with a goodbye message. /// </summary> public static async Task Part(this IrcClient client, string channel, string partMessage) { await client.SendParamsTrailing("PART", channel, partMessage); }
/// <summary> /// Joins specified channel with a password. /// </summary> public static async Task Join(this IrcClient client, string channel, string key) { await client.SendParams("JOIN", channel, key); }
private static async Task pingHandler(IrcClient client, Message message) { await client.SendMessage(new Message( "PONG", null, message.TrailingParameter)); }