|
@@ -10,11 +10,16 @@ internal fun IrcClient.sendCapabilityList() = send("CAP", "LS", "302")
|
10
|
10
|
internal fun IrcClient.sendCapabilityEnd() = send("CAP", "END")
|
11
|
11
|
|
12
|
12
|
/** Sends a message requesting the specified caps are enabled. */
|
13
|
|
-internal fun IrcClient.sendCapabilityRequest(capabilities: Collection<String>) = send("CAP", "REQ", capabilities.joinToString(" "))
|
|
13
|
+internal fun IrcClient.sendCapabilityRequest(capabilities: Collection<String>) =
|
|
14
|
+ send("CAP", "REQ", capabilities.joinToString(" "))
|
14
|
15
|
|
15
|
16
|
/** Sends a request to join the given channel. */
|
16
|
17
|
fun IrcClient.sendJoin(channel: String) = send("JOIN", channel)
|
17
|
18
|
|
|
19
|
+/** Sends a request to part the given channel. */
|
|
20
|
+fun IrcClient.sendPart(channel: String, reason: String? = null) =
|
|
21
|
+ reason?.let { send("PART", channel, reason) } ?: send("PART", channel)
|
|
22
|
+
|
18
|
23
|
/** Sends a request to see the modes of a given target. */
|
19
|
24
|
fun IrcClient.sendModeRequest(target: String) = send("MODE", target)
|
20
|
25
|
|