Mercurial > irccd
comparison doc/html/guide/07-socket/02-commands.md @ 0:1158cffe5a5e
Initial import
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 08 Feb 2016 16:43:14 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1158cffe5a5e |
---|---|
1 ## Commands | |
2 | |
3 The following commands are available. Please note that a lot of commands require a server as the first argument, it’s | |
4 one of defined in the **irccd.conf** file in the server section. | |
5 | |
6 ### server-cnotice | |
7 | |
8 Send a message notice on a channel. | |
9 | |
10 #### Properties | |
11 | |
12 - **command**: (string) "server-cnotice", | |
13 - **server**: (string) the server unique id, | |
14 - **channel**: (string) the channel name, | |
15 - **message**: (string) the notice message. | |
16 | |
17 #### Example | |
18 | |
19 ````json | |
20 { | |
21 "command": "server-cnotice", | |
22 "server": "myserver", | |
23 "channel": "#staff", | |
24 "message": "please be quiet" | |
25 } | |
26 ```` | |
27 | |
28 ### server-connect | |
29 | |
30 Connect to a server. | |
31 | |
32 #### Properties | |
33 | |
34 - **command**: (string) "server-connect", | |
35 - **name**: (string) the server unique id, | |
36 - **host**: (string) the host address, | |
37 - **port**: (int) the port number (Optional, default: 6667), | |
38 - **ssl**: (bool) use SSL (Optional, default: false), | |
39 - **sslVerify**: (bool) verify SSL (Optional, default: false), | |
40 - **nickname**: (string) the nickname to use (Optional, default: irccd), | |
41 - **username**: (string) the user name to use (Optional, default: irccd), | |
42 - **realname**: (string) the real name to use (Optional, default: IRC Client Daemon), | |
43 - **ctcpVersion**: (string) the CTCP Version to answer (Optional, default: the irccd's version), | |
44 - **commandChar**: (string) the command character to use to invoke commands (Optional, default: !), | |
45 - **reconnectTries**: (int) the number of reconnection to try (Optional, default: -1), | |
46 - **reconnectTimeout**: (int) the number of seconds to wait before retrying to connect (Optional, default: 30). | |
47 | |
48 #### Example | |
49 | |
50 ````json | |
51 { | |
52 "command": "server-connect", | |
53 "name": "myserver", | |
54 "host": "localhost", | |
55 "nickname": "edouard" | |
56 } | |
57 ```` | |
58 | |
59 ### server-disconnect | |
60 | |
61 Disconnect from a server. | |
62 | |
63 If server is not specified, irccd disconnects all servers. | |
64 | |
65 #### Properties | |
66 | |
67 - **command**: (string) "server-disconnect", | |
68 - **server**: (string) the server unique id (Optional, default: none). | |
69 | |
70 #### Example | |
71 | |
72 ````json | |
73 { | |
74 "command": "server-disconnect", | |
75 "server": "myserver" | |
76 } | |
77 ```` | |
78 | |
79 ### server-info | |
80 | |
81 Get server information. | |
82 | |
83 #### Properties | |
84 | |
85 - **command**: (string) "server-info", | |
86 - **server**: (string) the server unique id. | |
87 | |
88 #### Example | |
89 | |
90 ````json | |
91 { | |
92 "command": "server-info", | |
93 "server": "myserver" | |
94 } | |
95 ```` | |
96 | |
97 #### Responses | |
98 | |
99 - **name**: (string) the server unique id, | |
100 - **host**: (string) the server hostname, | |
101 - **port**: (int) the port, | |
102 - **ipv6**: (bool) true if using IPv6, | |
103 - **ssl**: (bool) true if connection is using SSL, | |
104 - **sslVerify**: (bool) true if SSL was verified, | |
105 - **channels**: (string list) list of channels. | |
106 - **nickname**: (string) the current nickname in use, | |
107 - **username**: (string) the username in use, | |
108 - **realname**: (string) the realname in use. | |
109 | |
110 ### server-invite | |
111 | |
112 Invite the specified target on the channel. | |
113 | |
114 #### Properties | |
115 | |
116 - **command**: (string) "server-invite", | |
117 - **server**: (string) the server unique id, | |
118 - **target**: (string) the nickname to invite, | |
119 - **channel**: (string) the channel. | |
120 | |
121 #### Example | |
122 | |
123 ````json | |
124 { | |
125 "command": "server-invite", | |
126 "server": "myserver", | |
127 "target": "edouard", | |
128 "channel": "#staff" | |
129 } | |
130 ```` | |
131 | |
132 ### server-join | |
133 | |
134 Join the specified channel, the password is optional. | |
135 | |
136 #### Properties | |
137 | |
138 - **command**: (string) "server-join", | |
139 - **server**: (string) the server unique id, | |
140 - **channel**: (string) the channel to join, | |
141 - **password**: (string) the password (Optional, default: none). | |
142 | |
143 #### Example | |
144 | |
145 ````json | |
146 { | |
147 "command": "server-join", | |
148 "server": "myserver", | |
149 "channel": "#games" | |
150 } | |
151 ```` | |
152 | |
153 ### server-kick | |
154 | |
155 Kick the specified target from the channel, the reason is optional. | |
156 | |
157 #### Properties | |
158 | |
159 - **command**: (string) "server-kick", | |
160 - **server**: (string) the server unique id, | |
161 - **target**: (string) the target nickname, | |
162 - **channel**: (string) the channel, | |
163 - **reason**: (string) the reason (Optional, default: none). | |
164 | |
165 #### Example | |
166 | |
167 ````json | |
168 { | |
169 "command": "server-kick", | |
170 "server": "myserver", | |
171 "target": "edouard", | |
172 "channel": "#staff", | |
173 "reason": "please be nice" | |
174 } | |
175 ```` | |
176 | |
177 ### server-list | |
178 | |
179 Get the list of all connected servers. | |
180 | |
181 #### Properties | |
182 | |
183 - **command**: (string) "server-list". | |
184 | |
185 #### Example | |
186 | |
187 ````json | |
188 { | |
189 "command": "server-list" | |
190 } | |
191 ```` | |
192 | |
193 #### Responses | |
194 | |
195 - The following properties: | |
196 - **list**: (string list) the list of all server unique ids. | |
197 | |
198 ### server-me | |
199 | |
200 Send an action emote. | |
201 | |
202 #### Properties | |
203 | |
204 - **command**: (string) "server-me", | |
205 - **server**: (string) the server unique id, | |
206 - **target**: (string) the target or channel, | |
207 - **message**: (string) the message. | |
208 | |
209 #### Example | |
210 | |
211 ````json | |
212 { | |
213 "command": "server-me", | |
214 "server": "myserver", | |
215 "channel": "#staff", | |
216 "message": "like that" | |
217 } | |
218 ```` | |
219 | |
220 ### server-message | |
221 | |
222 Send a message to the specified target or channel. | |
223 | |
224 #### Properties | |
225 | |
226 - **command**: (string) "server-message", | |
227 - **server**: (string) the server unique id, | |
228 - **target**: (string) the target or channel, | |
229 - **message**: (string) the message. | |
230 | |
231 #### Example | |
232 | |
233 ````json | |
234 { | |
235 "command": "server-message", | |
236 "server": "myserver", | |
237 "target": "#staff", | |
238 "message": "this channel is nice" | |
239 } | |
240 ```` | |
241 | |
242 ### server-mode | |
243 | |
244 Set the irccd's user mode. | |
245 | |
246 #### Properties | |
247 | |
248 - **command**: (string) "server-mode", | |
249 - **server**: (string) the server unique id, | |
250 - **mode**: (string) the mode. | |
251 | |
252 #### Example | |
253 | |
254 ````json | |
255 { | |
256 "command": "server-mode", | |
257 "server": "myserver", | |
258 "mode": "mode" | |
259 } | |
260 ```` | |
261 | |
262 ### server-nick | |
263 | |
264 Change irccd's nickname. | |
265 | |
266 #### Properties | |
267 | |
268 - **command**: (string) "server-nick", | |
269 - **server**: (string) the server unique id, | |
270 - **nickname**: (string) the new nickname. | |
271 | |
272 #### Example | |
273 | |
274 ````json | |
275 { | |
276 "command": "server-nick", | |
277 "server": "myserver", | |
278 "nickname": "edouard" | |
279 } | |
280 ```` | |
281 | |
282 ### server-notice | |
283 | |
284 Send a private notice to the specified target. | |
285 | |
286 #### Properties | |
287 | |
288 - **command**: (string) "server-notice", | |
289 - **server**: (string) the server unique id, | |
290 - **target**: (string) the target, | |
291 - **message**: (string) the notice message. | |
292 | |
293 #### Example | |
294 | |
295 ````json | |
296 { | |
297 "command": "server-notice", | |
298 "server": "myserver", | |
299 "target": "edouard", | |
300 "message": "hello dude" | |
301 } | |
302 ```` | |
303 | |
304 ### server-part | |
305 | |
306 Leave the specified channel, the reason is optional. | |
307 | |
308 Not all IRC servers support giving a reason to leave a channel, do not specify it if this is a concern. | |
309 | |
310 #### Properties | |
311 | |
312 - **command**: (string) "server-part", | |
313 - **server**: (string) the unique server id, | |
314 - **channel**: (string) the channel to leave, | |
315 - **reason**: (string) the reason (Optional, default: none). | |
316 | |
317 #### Example | |
318 | |
319 ````json | |
320 { | |
321 "command": "server-part", | |
322 "server": "myserver", | |
323 "channel": "#staff", | |
324 "reason": "the reason" | |
325 } | |
326 ```` | |
327 | |
328 ### server-reconnect | |
329 | |
330 Force reconnection of one or all servers. | |
331 | |
332 If server is not specified, all servers will try to reconnect. | |
333 | |
334 #### Properties | |
335 | |
336 - **command**: (string) "server-reconnect", | |
337 - **server**: (string) the server unique id (Optional, default: none). | |
338 | |
339 #### Example | |
340 | |
341 ````json | |
342 { | |
343 "command": "server-reconnect", | |
344 "server": "myserver" | |
345 } | |
346 ```` | |
347 | |
348 ### server-topic | |
349 | |
350 Change the topic of the specified channel. | |
351 | |
352 #### Properties | |
353 | |
354 - **command**: (string) "server-topic", | |
355 - **server**: (string) the unique server id, | |
356 - **channel**: (string) the channel, | |
357 - **topic**: (string) the new topic. | |
358 | |
359 #### Example | |
360 | |
361 ````json | |
362 { | |
363 "command": "server-topic", | |
364 "server": "myserver", | |
365 "channel": "#staff", | |
366 "topic": "the new topic" | |
367 } | |
368 ```` | |
369 | |
370 ### server-umode | |
371 | |
372 Change your irccd user mode for the specified server. | |
373 | |
374 ````json | |
375 { | |
376 "command": "umode", | |
377 "server": "the server name", | |
378 "mode": "the mode" | |
379 } | |
380 ```` |