|
@@ -89,39 +89,6 @@ interface IrcClient {
|
89
|
89
|
*/
|
90
|
90
|
fun send(command: String, vararg arguments: String) = send(emptyMap(), command, *arguments)
|
91
|
91
|
|
92
|
|
- /**
|
93
|
|
- * Sends the given command to the IRC server, and waits for a response back.
|
94
|
|
- *
|
95
|
|
- * This should only be needed to send raw/custom commands; standard messages can be sent using the
|
96
|
|
- * extension methods in [com.dmdirc.ktirc.messages] such as TODO: sendJoinAsync.
|
97
|
|
- *
|
98
|
|
- * This method will return immediately. If the server supports the labeled-responses capability,
|
99
|
|
- * the returned [Deferred] will be eventually populated with the response from the server. If
|
100
|
|
- * the server does not support the capability, or the response times out, `null` will be supplied.
|
101
|
|
- *
|
102
|
|
- * @param command The command to be sent.
|
103
|
|
- * @param arguments The arguments to the command.
|
104
|
|
- * @return A deferred [IrcEvent]? that contains the server's response to the command.
|
105
|
|
- */
|
106
|
|
- fun sendAsync(command: String, vararg arguments: String) = sendAsync(emptyMap(), command, *arguments)
|
107
|
|
-
|
108
|
|
- /**
|
109
|
|
- * Sends the given command to the IRC server, and waits for a response back.
|
110
|
|
- *
|
111
|
|
- * This should only be needed to send raw/custom commands; standard messages can be sent using the
|
112
|
|
- * extension methods in [com.dmdirc.ktirc.messages] such as TODO: sendJoinAsync.
|
113
|
|
- *
|
114
|
|
- * This method will return immediately. If the server supports the labeled-responses capability,
|
115
|
|
- * the returned [Deferred] will be eventually populated with the response from the server. If
|
116
|
|
- * the server does not support the capability, or the response times out, `null` will be supplied.
|
117
|
|
- *
|
118
|
|
- * @param tags The IRCv3 tags to prefix the message with, if any.
|
119
|
|
- * @param command The command to be sent.
|
120
|
|
- * @param arguments The arguments to the command.
|
121
|
|
- * @return A deferred [IrcEvent]? that contains the server's response to the command.
|
122
|
|
- */
|
123
|
|
- fun sendAsync(tags: Map<MessageTag, String>, command: String, vararg arguments: String): Deferred<IrcEvent?>
|
124
|
|
-
|
125
|
92
|
/**
|
126
|
93
|
* Registers a new handler for all events on this connection.
|
127
|
94
|
*
|
|
@@ -161,6 +128,43 @@ interface IrcClient {
|
161
|
128
|
|
162
|
129
|
}
|
163
|
130
|
|
|
131
|
+internal interface ExperimentalIrcClient : IrcClient {
|
|
132
|
+
|
|
133
|
+ /**
|
|
134
|
+ * Sends the given command to the IRC server, and waits for a response back.
|
|
135
|
+ *
|
|
136
|
+ * This should only be needed to send raw/custom commands; standard messages can be sent using the
|
|
137
|
+ * extension methods in [com.dmdirc.ktirc.messages] such as TODO: sendJoinAsync.
|
|
138
|
+ *
|
|
139
|
+ * This method will return immediately. If the server supports the labeled-responses capability,
|
|
140
|
+ * the returned [Deferred] will be eventually populated with the response from the server. If
|
|
141
|
+ * the server does not support the capability, or the response times out, `null` will be supplied.
|
|
142
|
+ *
|
|
143
|
+ * @param command The command to be sent.
|
|
144
|
+ * @param arguments The arguments to the command.
|
|
145
|
+ * @return A deferred [IrcEvent]? that contains the server's response to the command.
|
|
146
|
+ */
|
|
147
|
+ fun sendAsync(command: String, vararg arguments: String) = sendAsync(emptyMap(), command, *arguments)
|
|
148
|
+
|
|
149
|
+ /**
|
|
150
|
+ * Sends the given command to the IRC server, and waits for a response back.
|
|
151
|
+ *
|
|
152
|
+ * This should only be needed to send raw/custom commands; standard messages can be sent using the
|
|
153
|
+ * extension methods in [com.dmdirc.ktirc.messages] such as TODO: sendJoinAsync.
|
|
154
|
+ *
|
|
155
|
+ * This method will return immediately. If the server supports the labeled-responses capability,
|
|
156
|
+ * the returned [Deferred] will be eventually populated with the response from the server. If
|
|
157
|
+ * the server does not support the capability, or the response times out, `null` will be supplied.
|
|
158
|
+ *
|
|
159
|
+ * @param tags The IRCv3 tags to prefix the message with, if any.
|
|
160
|
+ * @param command The command to be sent.
|
|
161
|
+ * @param arguments The arguments to the command.
|
|
162
|
+ * @return A deferred [IrcEvent]? that contains the server's response to the command.
|
|
163
|
+ */
|
|
164
|
+ fun sendAsync(tags: Map<MessageTag, String>, command: String, vararg arguments: String): Deferred<IrcEvent?>
|
|
165
|
+
|
|
166
|
+}
|
|
167
|
+
|
164
|
168
|
/**
|
165
|
169
|
* Defines the behaviour of an [IrcClient].
|
166
|
170
|
*/
|