Beispiel #1
0
 /// <summary>
 /// Joins specified channels.
 /// </summary>
 public static async Task Join(this IrcClient client,
                               params string[] channels)
 {
     await client.SendParams("JOIN", string.Join(",", channels));
 }
Beispiel #2
0
 /// <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));
 }
Beispiel #3
0
 /// <summary>
 /// Sends a NOTICE.
 /// </summary>
 public static async Task Notice(this IrcClient client,
                                 string destination, string text)
 {
     await client.SendParamsTrailing("NOTICE", destination, text);
 }
Beispiel #4
0
 /// <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);
 }
Beispiel #5
0
 /// <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);
 }
Beispiel #6
0
 private static async Task pingHandler(IrcClient client, Message message)
 {
     await client.SendMessage(new Message(
                                  "PONG", null, message.TrailingParameter));
 }