-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdraft-oakley-irc-ctcp-00.html
668 lines (610 loc) · 28.7 KB
/
draft-oakley-irc-ctcp-00.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head profile="http://www.w3.org/2006/03/hcard http://dublincore.org/documents/2008/08/04/dc-html/">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<title>Internet Relay Chat: Client-to-Client Protocol (CTCP)</title>
<style type="text/css">/*<![CDATA[*/
@viewport {
zoom: 1.0;
width: extend-to-zoom;
}
@-ms-viewport {
width: extend-to-zoom;
zoom: 1.0;
}
@media screen and (min-width: 1024px) {
ul.toc, #rfc\.toc {
position: fixed;
bottom: 0;
right: 0;
right: calc(50vw - 500px);
width: 300px;
padding: 0 1em;
z-index: 1;
}
#rfc\.toc {
top: 16px;
}
ul.toc {
top: 80px;
overflow: auto;
}
body {
padding-left: 1.5em;
padding-right: 29em;
}
}
body {
font: 15px "Helvetica Neue",Helvetica,Arial,sans-serif;
color: #333;
font-size-adjust: 0.5;
line-height: 130%;
margin: 2.5em auto;
max-width: 724px;
}
.title, .filename, h1, h2, h3, h4 {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size-adjust: 0.5;
font-weight: 500;
color: #333;
line-height: 100%;
margin: 0.8em 0 0.3em;
}
.title { font-size: 36px; }
h1 { font-size: 30px; }
h2 { font-size: 24px; }
h3, h4 { font-size: 18px; }
h1 a[href], h2 a[href], h3 a[href], h4 a[href] {
color: #333;
}
ul.toc li {
list-style: none;
text-indent: -2.5em;
padding-left: 2.5em;
padding-bottom: 5px;
margin: 0;
}
ul.toc ul {
margin: 0;
}
/* xml2rfc nests ul directly inside ul which messes with the style badly */
ul.toc, ul.toc>ul, ul.toc ul>ul {
margin: 0 0 0 1.5em;
}
table {
margin-left: 0em;
border-collapse: collapse;
}
th {
text-align: left;
border-bottom: 2px solid #ddd;
}
td {
border-top: 1px solid #ddd;
vertical-align: top;
}
tr:nth-child(2n+1) > td,
tr:nth-child(2n+1) > th {
background-color: #f9f9f9;
}
td.reference {
max-width: 200px;
border-top: none;
padding-right: 1em;
}
.right {
text-align: right;
}
table.header {
width: 100%;
}
table.header td {
border: none;
background-color: transparent;
color: black;
}
.filename {
color: rgb(119, 119, 119);
font-size: 23px;
font-weight: normal;
height: auto;
line-height: 100%;
}
#rfc\.abstract+p {
font-size: 20px;
font-weight: 300;
line-height: 130%;
}
samp, tt, code, pre {
font: 11pt consolas, monospace;
font-size-adjust: none;
}
pre {
background-color: #eee;
border: 1px solid #ddd;
overflow-x: auto;
padding: 5px;
margin: 5px;
}
.figure {
font-style: italic;
margin: 0 1.5em;
}
address {
margin: 10px 0 0;
}
.vcard {
font-style: normal;
}
.vcardline {
display: block;
}
.vcardline .fn {
font-weight: bold;
}
.vcardline .hidden {
display: none;
}
dl {
margin-left: 1em;
}
dl.dl-horizontal: {
margin-left: 0;
}
dl > dt {
float: left;
margin-right: 1em;
}
dl.nohang > dt {
float: none;
}
dl > dd {
margin-bottom: .5em;
}
dl.compact > dd {
margin-bottom: 0em;
}
dl > dd > dl {
margin-top: 0.5em;
margin-bottom: 0em;
}
ul.empty {
list-style-type: none;
}
ul.empty li {
margin-top: .5em;
}
hr {
border: 0;
border-top: 1px solid #eee;
}
a {
text-decoration: none;
}
a[href] {
color: #2a6496;
}
a[href]:hover {
background-color: #eee;
}
ol, ul, li, p {
padding: 0;
margin: 0.5em 0 0.5em 2em;
}
li, p {
margin-left: 0;
}
address {
font-style: normal;
}
.github-fork-ribbon-wrapper {
display: none;
}
@media screen and (min-width: 800px) {
/* "Fork me on GitHub" CSS ribbon based on
* https://github.com/simonwhitaker/github-fork-ribbon-css
*/
.github-fork-ribbon {
position: absolute;
padding: 2px 0;
background-color: #a00;
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.5);
font: 700 12px "Helvetica Neue", Helvetica, Arial, sans-serif;
pointer-events: auto;
top: 38px;
right: -45px;
transform: rotate(45deg);
}
.github-fork-ribbon a[href],
.github-fork-ribbon a[href]:hover {
color: #fff;
background-color: transparent;
text-decoration: none;
text-shadow: 0 -1px rgba(0, 0, 0, 0.5);
text-align: center;
width: 190px;
line-height: 18px;
display: inline-block;
padding: 2px 0;
border: 1.5px dotted #fff;
border-color: rgba(255, 255, 255, 0.6);
}
.github-fork-ribbon-wrapper {
display: block;
width: 130px;
height: 130px;
position: absolute;
overflow: hidden;
top: 0; right: 0;
z-index: 2;
pointer-events: none;
}
}
@media screen and (min-width: 1000px) {
.github-fork-ribbon-wrapper {
position: fixed;
}
/*]]>*/</style>
<link href="#rfc.toc" rel="Contents"/>
<link href="#rfc.section.1" rel="Chapter" title="1 Introduction"/>
<link href="#rfc.section.2" rel="Chapter" title="2 Message Syntax"/>
<link href="#rfc.section.3" rel="Chapter" title="3 Message Types"/>
<link href="#rfc.section.3.1" rel="Chapter" title="3.1 Extended formatting"/>
<link href="#rfc.section.3.2" rel="Chapter" title="3.2 Metadata Query"/>
<link href="#rfc.section.3.3" rel="Chapter" title="3.3 Extended Query"/>
<link href="#rfc.section.4" rel="Chapter" title="4 Messages"/>
<link href="#rfc.section.5" rel="Chapter" title="5 Acknowledgements"/>
<link href="#rfc.section.6" rel="Chapter" title="6 Security Considerations"/>
<link href="#rfc.section.7" rel="Chapter" title="7 IANA Considerations"/>
<link href="#rfc.references" rel="Chapter" title="8 Normative References"/>
<link href="#rfc.appendix.A" rel="Chapter" title="A Message List"/>
<link href="#rfc.appendix.A.1" rel="Chapter" title="A.1 ACTION"/>
<link href="#rfc.appendix.A.2" rel="Chapter" title="A.2 CLIENTINFO"/>
<link href="#rfc.appendix.A.3" rel="Chapter" title="A.3 DCC"/>
<link href="#rfc.appendix.A.4" rel="Chapter" title="A.4 FINGER"/>
<link href="#rfc.appendix.A.5" rel="Chapter" title="A.5 PING"/>
<link href="#rfc.appendix.A.6" rel="Chapter" title="A.6 SOURCE"/>
<link href="#rfc.appendix.A.7" rel="Chapter" title="A.7 TIME"/>
<link href="#rfc.appendix.A.8" rel="Chapter" title="A.8 VERSION"/>
<link href="#rfc.appendix.A.9" rel="Chapter" title="A.9 USERINFO"/>
<link href="#rfc.authors" rel="Chapter"/>
<meta name="generator" content="xml2rfc version 2.5.2 - http://tools.ietf.org/tools/xml2rfc" />
<link rel="schema.dct" href="http://purl.org/dc/terms/" />
<meta name="dct.creator" content="Mikulenas, M. and D. Oakley" />
<meta name="dct.identifier" content="urn:ietf:id:draft-oakley-irc-ctcp-00" />
<meta name="dct.issued" scheme="ISO8601" content="2017-5-29" />
<meta name="dct.abstract" content="This document describes the Client-to-Client Protocol (CTCP), which lets Internet Relay Chat (IRC) clients send each other messages that get displayed or responded to in special ways. CTCP has been widely implemented, with most clients supporting it natively. This document outlines how to implement CTCP and the most common messages used." />
<meta name="description" content="This document describes the Client-to-Client Protocol (CTCP), which lets Internet Relay Chat (IRC) clients send each other messages that get displayed or responded to in special ways. CTCP has been widely implemented, with most clients supporting it natively. This document outlines how to implement CTCP and the most common messages used." />
</head>
<body>
<table class="header">
<tbody>
<tr>
<td class="left">Network Working Group</td>
<td class="right">M. Mikulenas</td>
</tr>
<tr>
<td class="left">Internet-Draft</td>
<td class="right">Independent</td>
</tr>
<tr>
<td class="left">Updates: 1459, 2812 (if approved)</td>
<td class="right">D. Oakley</td>
</tr>
<tr>
<td class="left">Intended status: Informational</td>
<td class="right">ircdocs</td>
</tr>
<tr>
<td class="left">Expires: November 30, 2017</td>
<td class="right">May 29, 2017</td>
</tr>
</tbody>
</table>
<p class="title">Internet Relay Chat: Client-to-Client Protocol (CTCP)<br />
<span class="filename">draft-oakley-irc-ctcp-00</span></p>
<h1 id="rfc.abstract">
<a href="#rfc.abstract">Abstract</a>
</h1>
<p>This document describes the Client-to-Client Protocol (CTCP), which lets Internet Relay Chat (IRC) clients send each other messages that get displayed or responded to in special ways. CTCP has been widely implemented, with most clients supporting it natively. This document outlines how to implement CTCP and the most common messages used.</p>
<p>It updates RFC 1459 and RFC 2812.</p>
<h1 id="rfc.status">
<a href="#rfc.status">Status of This Memo</a>
</h1>
<p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
<p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.</p>
<p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."</p>
<p>This Internet-Draft will expire on November 30, 2017.</p>
<h1 id="rfc.copyrightnotice">
<a href="#rfc.copyrightnotice">Copyright Notice</a>
</h1>
<p>Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
<p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document.</p>
<hr class="noprint" />
<h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
<ul class="toc">
<li>1. <a href="#rfc.section.1">Introduction</a></li>
<li>2. <a href="#rfc.section.2">Message Syntax</a></li>
<li>3. <a href="#rfc.section.3">Message Types</a></li>
<ul><li>3.1. <a href="#rfc.section.3.1">Extended formatting</a></li>
<li>3.2. <a href="#rfc.section.3.2">Metadata Query</a></li>
<li>3.3. <a href="#rfc.section.3.3">Extended Query</a></li>
</ul><li>4. <a href="#rfc.section.4">Messages</a></li>
<li>5. <a href="#rfc.section.5">Acknowledgements</a></li>
<li>6. <a href="#rfc.section.6">Security Considerations</a></li>
<li>7. <a href="#rfc.section.7">IANA Considerations</a></li>
<li>8. <a href="#rfc.references">Normative References</a></li>
<li>Appendix A. <a href="#rfc.appendix.A">Message List</a></li>
<ul><li>A.1. <a href="#rfc.appendix.A.1">ACTION</a></li>
<li>A.2. <a href="#rfc.appendix.A.2">CLIENTINFO</a></li>
<li>A.3. <a href="#rfc.appendix.A.3">DCC</a></li>
<li>A.4. <a href="#rfc.appendix.A.4">FINGER</a></li>
<li>A.5. <a href="#rfc.appendix.A.5">PING</a></li>
<li>A.6. <a href="#rfc.appendix.A.6">SOURCE</a></li>
<li>A.7. <a href="#rfc.appendix.A.7">TIME</a></li>
<li>A.8. <a href="#rfc.appendix.A.8">VERSION</a></li>
<li>A.9. <a href="#rfc.appendix.A.9">USERINFO</a></li>
</ul><li><a href="#rfc.authors">Authors' Addresses</a></li>
</ul>
<h1 id="rfc.section.1"><a href="#rfc.section.1">1.</a> <a href="#introduction" id="introduction">Introduction</a></h1>
<p id="rfc.section.1.p.1">The core Internet Relay Chat (IRC) protocol as described in <a href="#RFC1459">[RFC1459]</a> and <a href="#RFC2812">[RFC2812]</a> only has a single command for regular user messages, and does not provide a way for clients to exchange information directly. Client-to-Client Protocol (CTCP) messages let clients exchange messages that get displayed or responded to in special ways. Some examples of how CTCP is used is to request special formatting on messages, query other clients for metadata, and help initiate file transfers with other clients.</p>
<p id="rfc.section.1.p.2">This document goes over the subset of CTCP which is commonly implemented, and is compatible with clients implementing CTCP as described by older documents.</p>
<p id="rfc.section.1.p.3">The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in <a href="#RFC2119">[RFC2119]</a>.</p>
<h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a> <a href="#message-syntax" id="message-syntax">Message Syntax</a></h1>
<p id="rfc.section.2.p.1">CTCP queries are sent with the PRIVMSG IRC command, and CTCP replies are sent with NOTICE command. To indicate a CTCP query or reply, the body of the message (the second parameter) begins with the CTCP delimiter. The ABNF <a href="#RFC5234">[RFC5234]</a> for this message body is as follows:</p>
<pre>
delim = %x01
command = 1*( %x02-09 / %x0B-0C / %x0E-1F / %x21-FF )
; any octet except NUL, delim, CR, LF, and " "
params = 1*( %x02-09 / %x0B-0C / %x0E-FF )
; any octet except NUL, delim, CR, and LF
body = delim command [ SPACE params ] [ delim ]
</pre>
<p id="rfc.section.2.p.2">Commands are case-insensitive. When creating new CTCP commands, authors SHOULD use only alphanumeric characters for ease of implementation.</p>
<p id="rfc.section.2.p.3">The final CTCP delimiter SHOULD be sent on outgoing messages for compatibility reasons, and software MUST accept incoming messages which lack it. This is due to how certain clients implement message splitting and truncation.</p>
<p id="rfc.section.2.p.4">Queries MAY be sent to channels. When these queries are responded to, the responses are sent to the querying client rather than the channel which the query was originally sent to.</p>
<p id="rfc.section.2.p.5">Many servers implement optional filtering so that only the ACTION CTCP message can be sent to channels. When this is done, it can typically be enabled or disabled by channel operators with a channel mode.</p>
<p id="rfc.section.2.p.6">Here are two examples of CTCP queries and replies:</p>
<pre>
:alice PRIVMSG bob :\x01VERSION\x01
:bob NOTICE alice :\x01VERSION Snak for Macintosh 4.13 English\x01
:alice PRIVMSG #ircv3 :\x01PING 1473523796 918320\x01
:bob NOTICE alice :\x01PING 1473523796 918320\x01
</pre>
<h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a> <a href="#message-types" id="message-types">Message Types</a></h1>
<p id="rfc.section.3.p.1">CTCP messages generally take on one of these types. These message types are defined here to simplify understanding, and aren’t differentiated by the protocol itself.</p>
<h1 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1.</a> <a href="#extended-formatting" id="extended-formatting">Extended formatting</a></h1>
<p id="rfc.section.3.1.p.1">This type of CTCP is used to request special formatting of a user-visible message. That is, to send a user-visible message that should be displayed differently from regular messages - e.g. as an action, a whisper, an announcement.</p>
<p id="rfc.section.3.1.p.2">Extended formatting messages are sent as a PRIVMSG, and are expected to be used in channels as well as between clients. There is no automatic response to this message type, as it is not a query nor reply.</p>
<p id="rfc.section.3.1.p.3">These messages are sent as a PRIVMSG and can have parameters, but generate no reply.</p>
<p id="rfc.section.3.1.p.4">Example:</p>
<pre>
:dan PRIVMSG #ircv3 :\x01ACTION writes some specs!\x01
</pre>
<h1 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2.</a> <a href="#metadata-query" id="metadata-query">Metadata Query</a></h1>
<p id="rfc.section.3.2.p.1">This type of CTCP is used to provide relatively static information about the target client, user or connection.</p>
<p id="rfc.section.3.2.p.2">This CTCP takes the form of a query and a response (as a PRIVMSG and NOTICE, respectively). Due to how bouncers interact with multiple clients, there may sometimes be multiple responses to queries.</p>
<p id="rfc.section.3.2.p.3">Metadata queries MUST NOT require the recipient to implement any side effects (beyond sending the reply itself); if a CTCP message causes side effects by design, it should be categorized as an extended query instead.</p>
<p id="rfc.section.3.2.p.4">Metadata queries do not have any parameters, but expect a reply with parameters as the response data.</p>
<p id="rfc.section.3.2.p.5">Example:</p>
<pre>
:alice PRIVMSG bob :\x01VERSION\x01
:bob NOTICE alice :\x01VERSION SaberChat 27.5\x01
</pre>
<h1 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3.</a> <a href="#extended-query" id="extended-query">Extended Query</a></h1>
<p id="rfc.section.3.3.p.1">This type of CTCP is used to provide dynamic information or invoke actions from the client.</p>
<p id="rfc.section.3.3.p.2">This CTCP takes the form of a query and a response (as a PRIVMSG and NOTICE, respectively).</p>
<p id="rfc.section.3.3.p.3">Queries sent to a channel always generate private replies.</p>
<p id="rfc.section.3.3.p.4">Extended queries and replies may have parameters.</p>
<p id="rfc.section.3.3.p.5">Example:</p>
<pre>
:alice PRIVMSG bob :\x01PING 1473523796 918320\x01
:bob NOTICE alice :\x01PING 1473523796 918320\x01
</pre>
<h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a> <a href="#messages" id="messages">Messages</a></h1>
<p id="rfc.section.4.p.1">CTCP messages themselves are not standardised. Clients that receive either unexpected messages or known messages with unexpected values SHOULD ignore them and produce no response to the sending user. Clients MAY receive more than one response per user for a query they send, due to multiple clients being connected behind an IRC bouncer.</p>
<h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a> <a href="#acknowledgements" id="acknowledgements">Acknowledgements</a></h1>
<p id="rfc.section.5.p.1">Thanks to the IRCv3 group for giving feedback on this specification, and to Khaled for advice on client flood protection.</p>
<p id="rfc.section.5.p.2">Thanks to Michael Sandrof for creating CTCP, Troy Rollo for creating the related DCC protocol, as well as Klaus Zeuge and Ben Mesander who wrote and revised related specifications.</p>
<p id="rfc.section.5.p.3">Special thanks to dequis, Peter Powell and James Wheare for help with this and related work.</p>
<h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a> <a href="#security-considerations" id="security-considerations">Security Considerations</a></h1>
<p id="rfc.section.6.p.1">CTCP messages are completely untrusted data, and clients MUST NOT assume that they are well-formed or complete.</p>
<p id="rfc.section.6.p.2">Older CTCP specifications describe quoting methods which are complex and not widely implemented. Implementations SHOULD NOT implement “low-level quoting” or “CTCP-level quoting” when parsing messages.</p>
<p id="rfc.section.6.p.3">Older CTCP specifications describe including more than one CTCP message inside a single PRIVMSG or NOTICE command. Implementations SHOULD NOT implement this form of CTCP parsing as it is not widely-implemented and may result in an implementation that can be more easily flooded off the server they are connected to.</p>
<p id="rfc.section.6.p.4">CTCP requests can be abused to flood clients off the server they are connected to. Clients may ignore or delay excessive incoming requests to protect against this.</p>
<h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a> <a href="#iana-considerations" id="iana-considerations">IANA Considerations</a></h1>
<p id="rfc.section.7.p.1">This document has no actions for IANA.</p>
<h1 id="rfc.references"><a href="#rfc.references">8.</a> Normative References</h1>
<table>
<tbody>
<tr>
<td class="reference">
<b id="RFC1459">[RFC1459]</b>
</td>
<td class="top"><a>Oikarinen, J.</a> and <a>D. Reed</a>, "<a href="http://tools.ietf.org/html/rfc1459">Internet Relay Chat Protocol</a>", RFC 1459, DOI 10.17487/RFC1459, May 1993.</td>
</tr>
<tr>
<td class="reference">
<b id="RFC2119">[RFC2119]</b>
</td>
<td class="top"><a>Bradner, S.</a>, "<a href="http://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.</td>
</tr>
<tr>
<td class="reference">
<b id="RFC2812">[RFC2812]</b>
</td>
<td class="top"><a>Kalt, C.</a>, "<a href="http://tools.ietf.org/html/rfc2812">Internet Relay Chat: Client Protocol</a>", RFC 2812, DOI 10.17487/RFC2812, April 2000.</td>
</tr>
<tr>
<td class="reference">
<b id="RFC5234">[RFC5234]</b>
</td>
<td class="top"><a>Crocker, D.</a> and <a>P. Overell</a>, "<a href="http://tools.ietf.org/html/rfc5234">Augmented BNF for Syntax Specifications: ABNF</a>", STD 68, RFC 5234, DOI 10.17487/RFC5234, January 2008.</td>
</tr>
<tr>
<td class="reference">
<b id="RFC5322">[RFC5322]</b>
</td>
<td class="top"><a>Resnick, P.</a>, "<a href="http://tools.ietf.org/html/rfc5322">Internet Message Format</a>", RFC 5322, DOI 10.17487/RFC5322, October 2008.</td>
</tr>
</tbody>
</table>
<h1 id="rfc.appendix.A"><a href="#rfc.appendix.A">Appendix A.</a> <a href="#message-list" id="message-list">Message List</a></h1>
<p id="rfc.section.A.p.1">This section is not exhaustive, and only lists those CTCP messages which are widely implemented across the IRC ecosystem.</p>
<p id="rfc.section.A.p.2">The reply and parameter lines below use a simplified syntax that represents variables by surrounding them with angle brackets,.</p>
<h1 id="rfc.appendix.A.1"><a href="#rfc.appendix.A.1">A.1.</a> <a href="#action" id="action">ACTION</a></h1>
<pre>
Type: Extended Formatting
Params: ACTION <text>
</pre>
<p id="rfc.section.A.1.p.1">This extended formatting message shows that <text> should be displayed as a third-person action or emote; in clients, it’s generally activated with the command <samp>/me</samp>.</p>
<p id="rfc.section.A.1.p.2">ACTION is universally implemented and very commonly used. Clients MUST implement this CTCP message to effectively use IRC.</p>
<p id="rfc.section.A.1.p.3">Example:</p>
<pre>
Raw: :dan!user@host PRIVMSG #ircv3 :\x01ACTION does it!\x01
Formatted: * dan does it!
</pre>
<h1 id="rfc.appendix.A.2"><a href="#rfc.appendix.A.2">A.2.</a> <a href="#clientinfo" id="clientinfo">CLIENTINFO</a></h1>
<pre>
Type: Extended Query
Reply: CLIENTINFO <tokens>
</pre>
<p id="rfc.section.A.2.p.1">This extended query returns a list of the CTCP messages that this client supports and implements, delimited by a single ASCII space.</p>
<p id="rfc.section.A.2.p.2">CLIENTINFO is widely implemented. Clients SHOULD implement this CTCP message.</p>
<p id="rfc.section.A.2.p.3">Example:</p>
<pre>
Query: CLIENTINFO
Response: CLIENTINFO ACTION DCC CLIENTINFO PING TIME VERSION
</pre>
<h1 id="rfc.appendix.A.3"><a href="#rfc.appendix.A.3">A.3.</a> <a href="#dcc" id="dcc">DCC</a></h1>
<pre>
Type: Extended Query
Params: DCC <type> <argument> <host> <port>
</pre>
<p id="rfc.section.A.3.p.1">This extended query is used to setup and control connections that go directly between clients, bypassing the IRC server. This is typically used for features that require a large amount of traffic between clients or simply wish to bypass the server itself such as file transfer and direct chat.</p>
<p id="rfc.section.A.3.p.2">The Direct Client-to-Client (DCC) Protocol requires its own specification, and is not described in-depth here.</p>
<p id="rfc.section.A.3.p.3">DCC is widely implemented. Clients MAY implement this CTCP message.</p>
<h1 id="rfc.appendix.A.4"><a href="#rfc.appendix.A.4">A.4.</a> <a href="#finger" id="finger">FINGER</a></h1>
<pre>
Type: Metadata Query
Reply: FINGER <info>
</pre>
<p id="rfc.section.A.4.p.1">This metadata query returns miscellaneous info about the user, typically the same information that’s held in their realname field.</p>
<p id="rfc.section.A.4.p.2">However, some implementations return the client name and version instead.</p>
<p id="rfc.section.A.4.p.3">FINGER is largely obsolete. Clients MAY implement this CTCP message.</p>
<p id="rfc.section.A.4.p.4">Example:</p>
<pre>
Query: FINGER
Response: FINGER WeeChat 1.8-dev
</pre>
<h1 id="rfc.appendix.A.5"><a href="#rfc.appendix.A.5">A.5.</a> <a href="#ping" id="ping">PING</a></h1>
<pre>
Type: Extended Query
Params: PING <info>
</pre>
<p id="rfc.section.A.5.p.1">This extended query is used to confirm reachability with other clients and to check latency. When receiving a CTCP PING, the reply MUST contain exactly the same parameters as the original query.</p>
<p id="rfc.section.A.5.p.2">PING is universally implemented. Clients SHOULD implement this CTCP message.</p>
<p id="rfc.section.A.5.p.3">Example:</p>
<pre>
Query: PING 1473523721 662865
Response: PING 1473523721 662865
Query: PING foo bar baz
Response: PING foo bar baz
</pre>
<h1 id="rfc.appendix.A.6"><a href="#rfc.appendix.A.6">A.6.</a> <a href="#source" id="source">SOURCE</a></h1>
<pre>
Type: Metadata Query
Reply: SOURCE <info>
</pre>
<p id="rfc.section.A.6.p.1">This metadata query is used to return the location of the source code for the client.</p>
<p id="rfc.section.A.6.p.2">SOURCE is rarely implemented. Clients MAY implement this CTCP message.</p>
<p id="rfc.section.A.6.p.3">Example:</p>
<pre>
Query: SOURCE
Response: SOURCE https://weechat.org/download
</pre>
<h1 id="rfc.appendix.A.7"><a href="#rfc.appendix.A.7">A.7.</a> <a href="#time" id="time">TIME</a></h1>
<pre>
Type: Extended Query
Params: TIME <timestring>
</pre>
<p id="rfc.section.A.7.p.1">This extended query is used to return the client’s local time in an unspecified human-readable format. In practice, both the format output by ctime() and the format described in Section 3.3 of <a href="#RFC5322">[RFC5322]</a> are common.</p>
<p id="rfc.section.A.7.p.2">New implementations MAY default to UTC time for privacy reasons.</p>
<p id="rfc.section.A.7.p.3">TIME is almost universally implemented. Clients SHOULD implement this CTCP message.</p>
<p id="rfc.section.A.7.p.4">Example:</p>
<pre>
Query: TIME
Response: TIME Mon, 08 May 2017 09:15:29 GMT
</pre>
<h1 id="rfc.appendix.A.8"><a href="#rfc.appendix.A.8">A.8.</a> <a href="#version" id="version">VERSION</a></h1>
<pre>
Type: Metadata Query
Reply: VERSION <verstring>
</pre>
<p id="rfc.section.A.8.p.1">This metadata query is used to return the name and version of the client software in use. There is no specified format for the version string.</p>
<p id="rfc.section.A.8.p.2">Clients may allow users to customise the response value for this query.</p>
<p id="rfc.section.A.8.p.3">VERSION is universally implemented. Clients SHOULD implement this CTCP message.</p>
<p id="rfc.section.A.8.p.4">Example:</p>
<pre>
Query: VERSION
Response: VERSION WeeChat 1.8-dev (git: v1.7-329-g22f2fd03a)
</pre>
<h1 id="rfc.appendix.A.9"><a href="#rfc.appendix.A.9">A.9.</a> <a href="#userinfo" id="userinfo">USERINFO</a></h1>
<pre>
Type: Metadata Query
Reply: USERINFO <info>
</pre>
<p id="rfc.section.A.9.p.1">This metadata query returns miscellaneous info about the user, typically the same information that’s held in their realname field.</p>
<p id="rfc.section.A.9.p.2">However, some implementations return <samp><nickname> (<realname>)</samp> instead.</p>
<p id="rfc.section.A.9.p.3">USERINFO is largely obsolete. Clients MAY implement this CTCP message.</p>
<p id="rfc.section.A.9.p.4">Example:</p>
<pre>
Query: USERINFO
Response: USERINFO fred (Fred Foobar)
</pre>
<h1 id="rfc.authors">
<a href="#rfc.authors">Authors' Addresses</a>
</h1>
<div class="avoidbreak">
<address class="vcard">
<span class="vcardline">
<span class="fn">Mantas Mikulenas</span>
<span class="n hidden">
<span class="family-name">Mikulenas</span>
</span>
</span>
<span class="org vcardline">Independent</span>
<span class="adr">
<span class="vcardline">
<span class="locality"></span>
<span class="region"></span>
<span class="code"></span>
</span>
<span class="country-name vcardline"></span>
</span>
<span class="vcardline">EMail: <a href="mailto:[email protected]">[email protected]</a></span>
</address>
</div><div class="avoidbreak">
<address class="vcard">
<span class="vcardline">
<span class="fn">Daniel Oakley</span>
<span class="n hidden">
<span class="family-name">Oakley</span>
</span>
</span>
<span class="org vcardline">ircdocs</span>
<span class="adr">
<span class="vcardline">
<span class="locality"></span>
<span class="region"></span>
<span class="code"></span>
</span>
<span class="country-name vcardline"></span>
</span>
<span class="vcardline">EMail: <a href="mailto:[email protected]">[email protected]</a></span>
</address>
</div>
</body>
</html>