summaryrefslogtreecommitdiff
path: root/doc/technical/draft-mitchell-irc-capabilities-01.txt
blob: f0c6736a164534200e1c80c15079ab62535969e7 (plain)
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
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298

Network Working Group                                        K. Mitchell
Internet-Draft                                                 P. Lorier
Expires: September 5, 2005                          Undernet IRC Network
                                                                L. Hardy
                                                             ircd-ratbox
                                                            P. Kucharski
                                                                  IRCnet
                                                           March 7, 2005

                   IRC Client Capabilities Extension
                   draft-mitchell-irc-capabilities-01

Status of this Memo

   This document is an Internet-Draft and is subject to all provisions
   of section 3 of RFC 3667.  By submitting this Internet-Draft, each
   author represents that any applicable patent or other IPR claims of
   which he or she is aware have been or will be disclosed, and any of
   which he or she become aware will be disclosed, in accordance with
   RFC 3668.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as
   Internet-Drafts.

   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."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on September 5, 2005.

Copyright Notice

   Copyright (C) The Internet Society (2005).

Abstract

   IRC (Internet Relay Chat) is a long-standing protocol for real-time
   chatting.  The basic client-server protocol is a very simple
   text-based protocol with no explicit mechanism for introducing or


Mitchell, et al.       Expires September 5, 2005                [Page 1]
Internet-Draft                  IRC CAP                       March 2005

   negotiating backwards-incompatible extensions.  This memo presents a
   mechanism for negotiation of such extensions.

Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in RFC
   2119 [1].

Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3

   2.  Problems to be Solved  . . . . . . . . . . . . . . . . . . . .  4

   3.  The CAP Command  . . . . . . . . . . . . . . . . . . . . . . .  5
     3.1   CAP LS . . . . . . . . . . . . . . . . . . . . . . . . . .  6
     3.2   CAP LIST . . . . . . . . . . . . . . . . . . . . . . . . .  6
     3.3   CAP REQ  . . . . . . . . . . . . . . . . . . . . . . . . .  7
     3.4   CAP ACK  . . . . . . . . . . . . . . . . . . . . . . . . .  7
     3.5   CAP NAK  . . . . . . . . . . . . . . . . . . . . . . . . .  8
     3.6   CAP CLEAR  . . . . . . . . . . . . . . . . . . . . . . . .  8
     3.7   CAP END  . . . . . . . . . . . . . . . . . . . . . . . . .  8

   4.  Capability Negotiation . . . . . . . . . . . . . . . . . . . . 10

   5.  Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . 11
     5.1   Capability Modifiers . . . . . . . . . . . . . . . . . . . 11

   6.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 13

   7.  Security Considerations  . . . . . . . . . . . . . . . . . . . 14

   8.  Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 15

   9.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 15

       Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 15

   A.  Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

   B.  ABNF Description of Capabilities . . . . . . . . . . . . . . . 19

   C.  ChangeLog  . . . . . . . . . . . . . . . . . . . . . . . . . . 21

       Intellectual Property and Copyright Statements . . . . . . . . 28


Mitchell, et al.       Expires September 5, 2005                [Page 2]
Internet-Draft                  IRC CAP                       March 2005

1.  Introduction

   The IRC protocol, as originally documented by RFC 1459 [2] and
   updated by RFC 2812 [3], is a simple, text-based conferencing
   protocol, involving a number of users spread across a number of
   interconnected servers.  These users may chat with other individual
   users, or may chat with groups of users on "channels"--what other
   chat systems refer to as "rooms" or "chat rooms".

   Over the years, various extensions to the basic IRC protocol have
   been made by IRC server programmers.  Often, these extensions are
   intended to conserve bandwidth, close loopholes left by the original
   protocol specification, or add features for users or for the server
   administrators.  Most of these changes are backwards-compatible with
   the original protocol specification: A command may be added, a reply
   may be extended to contain more parameters, etc.  Recently, however,
   there has been a desire to introduce changes that would not be
   backwards-compatible with existing IRC clients.  Ideally, these
   protocol changes would only be used with clients and servers that can
   understand the revised protocol.  Unfortunately, the IRC protocol
   does not provide any form of extension or protocol negotiation,
   making it impossible to determine support for such extensions.

   This memo introduces a standardized mechanism for negotiation of
   protocol extensions, known as *capabilities*, that will be
   backwards-compatible with all existing IRC clients and servers.  Any
   server not implementing this extension will still interoperate with
   clients that do implement it; similarly, clients that do not
   implement the capabilities extension may successfully communicate
   with a server that does implement the extension.











Mitchell, et al.       Expires September 5, 2005                [Page 3]
Internet-Draft                  IRC CAP                       March 2005

2.  Problems to be Solved

   The IRC protocol is not a lockstep protocol.  This means that a
   client may issue additional commands before the server has finished
   responding to the first one.  Additionally, unlike other protocols,
   the server does not necessarily issue a banner response upon initial
   connection.  This, combined with the fact that some servers do not
   complain about unknown commands prior to completion of the client
   registration phase, means that a client cannot know for certain
   whether a server implements the extension.  If a client had to wait
   for a banner message, it would fail to interoperate with a server not
   implementing the capabilities extension.  If the client must issue a
   command and then wait for a response, a similar problem results.  As
   some potential protocol extensions must be set up prior to completion
   of the client registration phase, there is no reliable way a server
   may indicate implementation of the capabilities extension to a
   client.

   The solution to these problems turns out to be to extend the client
   registration procedure.  The client sends a request to begin
   capability negotiation, as well as the other information necessary
   for client registration (user name, nick name, optional password,
   etc.).  If the server understands the capabilities extension, it will
   suspend completion of the registration phase until the negotiation is
   complete; negotiation may then proceed in a lockstep fashion.  If the
   server does not understand capabilities, then the registration will
   complete immediately, and the client will receive the 001 numeric.
   This will signal to the client that the server does not implement the
   capabilities extension.











Mitchell, et al.       Expires September 5, 2005                [Page 4]
Internet-Draft                  IRC CAP                       March 2005

3.  The CAP Command

   The capabilities extension is implemented by addition of one command
   with several subcommands.  The command added is *CAP*.  CAP takes a
   single, required subcommand, optionally followed by a single
   parameter consisting of a space-separated list of capabilities.  Each
   capability within the list MAY be preceded by a capability modifier.
   (Section 5.1)

   The subcommands defined for CAP are:

   1.  LS (Section 3.1)
   2.  LIST (Section 3.2)
   3.  REQ (Section 3.3)
   4.  ACK (Section 3.4)
   5.  NAK (Section 3.5)
   6.  CLEAR (Section 3.6)
   7.  END (Section 3.7)

   The LS (Section 3.1), LIST (Section 3.2), REQ (Section 3.3), ACK
   (Section 3.4), and NAK (Section 3.5) subcommands may be followed by a
   single parameter consisting of a space-separated list of capability
   names.  If more than one capability is named, this argument MUST be
   preceded by the IRC protocol colon (':') sentinel to signal that the
   remainder of the line is a single argument.

   If a client sends a subcommand not listed above or issues an invalid
   command, the server SHOULD reply with the ERR_INVALIDCAPCMD numeric
   response, 410.  The first parameter after the client nickname SHALL
   be the subcommand the client sent; the second parameter SHOULD be a
   textual description of the error.

   In ABNF [4] notation:

          capcmd       =  [ ":" servername SP ] "CAP" SP subcmd

          subcmd       =  lscmd / listcmd / reqcmd / ackcmd /
                              nakcmd / clearcmd / endcmd

          capcmderr    =  ":" servername SP "410" SP nick SP badcmd
                              SP ":Invalid CAP subcommand"
                           ; badcmd is the unrecognized subcommand

          caplist      =  [ ":" ] *( capmod ) capab
          caplist      =/ ":" *( capmod ) capab 1*( SP *( capmod ) capab )

   where SP is as designated in Appendix A of RFC 2234 [4], and
   servername and nick are as designated in section 2.3.1 of RFC 1459


Mitchell, et al.       Expires September 5, 2005                [Page 5]
Internet-Draft                  IRC CAP                       March 2005

   [2].

   The discussion in the following sections applies only to clients and
   servers implementing the capabilities extension.  Servers (and
   clients) not implementing the capabilities extension are exempted
   from the requirements of this section.

3.1  CAP LS

   The LS subcommand is used to list the capabilities supported by the
   server.  The client SHALL send an LS subcommand with no arguments to
   solicit a list of supported capabilities from the server.  Servers
   MUST respond to such LS subcommands with one or more LS subcommands
   containing the list of recognized capabilities.  All but the last
   subcommand MUST have a parameter containing only an asterisk ('*')
   preceding the capability list.

   If a client issues an LS subcommand during the client registration
   phase, client registration MUST be suspended until an END (Section
   3.7) subcommand is received.

   ABNF [4] description of the LS subcommand:

          lscmd        =  "LS"
          lscmd        =/ "LS" SP [ "*" SP ] caplist

3.2  CAP LIST

   The LIST subcommand is provided to permit the client to request a
   list of the capabilities currently active for the connection.  It is
   similar to the LS (Section 3.1) subcommand--if a client issues a LIST
   subcommand with no arguments, the server MUST respond with a sequence
   of LIST subcommands, all but the last of which MUST have a single
   parameter consisting solely of an asterisk ('*') preceding the list
   of capabilities.  If no capabilities have been enabled, the server
   MUST send a LIST command with an empty capability list; the parameter
   MUST NOT be omitted.  The active capabilities MAY be listed in any
   order.

   ABNF [4] description of the LIST subcommand:

          listcmd      =  "LIST"
          listcmd      =/ "LIST" SP ":"
          listcmd      =/ "LIST" SP [ "*" SP ] caplist



Mitchell, et al.       Expires September 5, 2005                [Page 6]
Internet-Draft                  IRC CAP                       March 2005

3.3  CAP REQ

   The REQ subcommand is sent by the client to request that a capability
   or set of capabilities be enabled or disabled.  Its sole parameter
   MUST be a space-separated list of capabilities.  Each capability name
   MAY be preceded by a dash ('-') to indicate that the capability
   should be disabled.  Additionally, receipt of this subcommand during
   the client registration MUST suspend client registration until an END
   (Section 3.7) subcommand is received.

   Servers MUST respond to a REQ command with either the ACK (Section
   3.4) or NAK (Section 3.5) subcommands to indicate acceptance or
   rejection of the capability set requested by the client.  A server
   MUST accept the entire capability set or reject it whole; servers
   MUST NOT accept some capabilities in the set while rejecting others.
   If a client requests that a "sticky" capability be disabled, the
   server MUST reject the capability set.

   ABNF [4] description of the REQ subcommand:

          reqcmd       =  "REQ" SP caplist

3.4  CAP ACK

   The ACK subcommand has three uses.  It is used by the server to
   acknowledge a REQ (Section 3.3) subcommand; by the server to
   acknowledge a CLEAR (Section 3.6) subcommand and list the removed
   capabilities; and by the client to acknowledge certain capabilities
   designated as requiring acknowledgment.  If more than one ACK is
   required due to the IRC line length limitation of 512 characters, all
   but the last SHALL contain a parameter consisting of a single
   asterisk ('*') immediately preceding the list of capabilities, as for
   LS (Section 3.1) and LIST (Section 3.2).

   If an ACK reply originating from the server is spread across multiple
   lines, a client MUST NOT change capabilities until the last ACK of
   the set is received.  Equally, a server MUST NOT change the
   capabilities of the client until the last ACK of the set has been
   sent.

   In the first usage, acknowledging a REQ (Section 3.3) subcommand, the
   ACK subcommand has a single parameter consisting of a space separated
   list of capability names, which may optionally be preceded with one
   or more modifiers (Section 5.1).

   The second usage, acknowledging a CLEAR (Section 3.6) subcommand, is
   similar to the first usage.  When a CLEAR (Section 3.6) subcommand is


Mitchell, et al.       Expires September 5, 2005                [Page 7]
Internet-Draft                  IRC CAP                       March 2005

   issued, all non-"sticky" capabilities are disabled, and a set of ACK
   subcommands will be generated by the server with the disable modifier
   preceding each capability.

   The third usage is when, in the preceding two cases, some capability
   names have been preceded with the ack modifier.  ACK in this case is
   used to fully enable or disable the capability.  Clients MUST NOT
   issue an ACK subcommand for any capability not marked with the ack
   modifier in a server-generated ACK subcommand.

   ABNF [4] description of the ACK subcommand:

          ackcmd       =  "ACK" SP [ "*" SP ] caplist

3.5  CAP NAK

   The NAK subcommand MUST be sent by the server in response to a REQ
   (Section 3.3) subcommand when any capability change requested cannot
   be performed for any reason.  The server MUST NOT make any change to
   the set of capabilities for the client if it responds with a NAK
   subcommand.  The argument of the NAK subcommand MUST consist of at
   least the first one hundred characters of the capability list in the
   REQ (Section 3.3) subcommand which triggered the NAK.

   ABNF [4] description of the NAK subcommand:

          nakcmd       =  "NAK" SP ":" acklist
                           ; acklist is at least 100 characters of the
                           ; capability list from the REQ

3.6  CAP CLEAR

   The CLEAR subcommand requests that the server clear the capability
   set for the client.  The server MUST respond with a set of ACK
   (Section 3.4) subcommands indicating the capabilities being
   deactivated.

   ABNF [4] description of the CLEAR subcommand:

          clearcmd     =  "CLEAR"

3.7  CAP END

   The END subcommand signals to the server that capability negotiation
   is complete and requests that the server continue with client


Mitchell, et al.       Expires September 5, 2005                [Page 8]
Internet-Draft                  IRC CAP                       March 2005

   registration.  If the client is already registered, this command MUST
   be ignored by the server.

   Clients that support capabilities but do not wish to enter
   negotiation SHOULD send CAP END upon connection to the server.

   ABNF [4] description of the END subcommand:

          endcmd       =  "END"





















Mitchell, et al.       Expires September 5, 2005                [Page 9]
Internet-Draft                  IRC CAP                       March 2005

4.  Capability Negotiation

   Clients implementing this extension SHOULD take one of the following
   three actions upon initial connection to a server:

   o  Issue an LS (Section 3.1) subcommand (with an empty capability
      list) to solicit a list of supported capabilities from the server;

   o  Issue the REQ (Section 3.3) subcommand to request a particular set
      of capabilities without knowing what capabilities the server
      supports or if it supports the capabilities extension; or

   o  Issue the END (Section 3.7) subcommand to signal implementation of
      the capabilities extension without entering into capability
      negotiation.

   Although a client is permitted to not issue any CAP commands upon
   connection, this is NOT RECOMMENDED.  Servers MAY assume a client
   does not implement the capabilities extension if it does not issue
   any CAP commands upon initial connection.

   Clients SHOULD follow CAP commands issued upon connection with the
   standard IRC client registration commands without waiting for any
   responses from the server.  See RFC 1459 [2] for more details about
   the client registration procedure.

   If a client issues the LS (Section 3.1) or REQ (Section 3.3)
   subcommands during the client registration procedure, a server
   implementing the capabilities extension MUST NOT complete the client
   registration until the client issues the END (Section 3.7)
   subcommand.  A client that sees a RPL_WELCOME (001) numeric response
   before it sends CAP END (Section 3.7) SHOULD assume that the server
   does not support the capabilities extension.

   Once the client is registered, CAP commands SHALL have no effect on
   other connection operations, except that a client MAY change the
   capabilities it has set.  In particular, CAP commands and their
   responses MAY be interspersed with other protocol messages.  The END
   (Section 3.7) subcommand SHALL have no effect once client
   registration has been completed.






Mitchell, et al.       Expires September 5, 2005               [Page 10]
Internet-Draft                  IRC CAP                       March 2005

5.  Capabilities

   Capabilities are designated by a name composed of one or more
   elements.  Name elements are not case-sensitive.  They must begin
   with a letter and may contain any number of letters, numbers, and the
   dash character ('-').  Names containing more than one name element
   MUST also contain a period character ('.') in the first name element.
   Name elements are separated from each other via the slash character
   ('/').

   There are two capability name spaces:

   Network Specific: Names whose first element contains a period
      character ('.') designate a delegated capability name space.  The
      first element MUST be a valid, existing DNS domain name.  These
      names MUST contain at least two elements.

   Standardized: All other names MUST correspond to capabilities
      documented by an RFC.  Further, these names MUST contain only one
      element.

   These rules are summarized by the following ABNF [4] representation:

          elem         =  ALPHA *( ALPHA / DIGIT / "-" )

          netname      =  elem 1*( "." elem )

          netDeleg     =  netname 1*( "/" elem )

          standardized =  elem

          capab        =  netDeleg / standardized

   where ALPHA and DIGIT are as designated in Appendix A of RFC 2234
   [4].

5.1  Capability Modifiers

   There are various capability modifiers available.  If a capability
   modifier is to be used, it MUST directly precede the capability name.
   The following are the modifiers defined for capabilities.  Certain
   modifiers MAY be combined.

   The disable modifier is used by both the server and the client to
   indicate that a capability should be disabled.  The disable modifier
   is defined as the dash character ('-').  A client MUST only use the
   disable modifier in the REQ (Section 3.3) and ACK (Section 3.4)
   subcommands.  A server MUST use the disable modifier in the ACK


Mitchell, et al.       Expires September 5, 2005               [Page 11]
Internet-Draft                  IRC CAP                       March 2005

   (Section 3.4) subcommand when disabling a capability, or in
   conjunction with a ack modifier in the LIST (Section 3.2) subcommand.
   The server MUST NOT use the disable modifier in any other command
   response.

   The sticky modifier is used by the server to indicate a capability
   that, once enabled, cannot be disabled.  The sticky modifier is
   defined as the equals character ('=').  A client MUST NOT use the
   sticky modifier.  A server MUST only use the sticky modifier in the
   ACK (Section 3.4), LIST (Section 3.2) and LS (Section 3.1)
   subcommands and MUST use the modifier for all such capabilities.

   The ack modifier is used by the server to indicate that the client
   must issue an ACK (Section 3.4) subcommand to fully enable or disable
   the capability.  The ack modifier is defined as the tilde character
   ('~').  The ack modifier indicates that traffic originating from the
   server SHALL make use of the capability, but the server SHALL NOT
   expect traffic originating from the client to make use of the
   capability.  When combined with the disable modifier, it indicates
   traffic originating from the server SHALL NOT make use of the
   capability, but the server expects traffic originating from the
   client SHALL make use of the capability.  The ack modifier MAY be
   combined with the sticky modifier.

   A server MUST use the ack modifier in the ACK (Section 3.4) and LIST
   (Section 3.2) subcommands to indicate capabilities that require an
   ACK (Section 3.4) subcommand from the client to be fully enabled or
   disabled.  Servers MUST also use the ack modifier in the response to
   an LS (Section 3.1) subcommand to indicate capabilities which will
   require ACK (Section 3.4) subcommands from the client.  Clients MUST
   NOT use the ack modifier, but SHOULD issue the ACK (Section 3.4)
   subcommand as soon as possible after receiving an ACK (Section 3.4)
   or REQ (Section 3.3) subcommand from the server that contains a
   capability marked with the ack modifier.

   In ABNF [4] notation:

          dismod       =  "-"
          stickymod    =  "="
          ackmod       =  "~"

          capmod       =  dismod / stickymod / ackmod





Mitchell, et al.       Expires September 5, 2005               [Page 12]
Internet-Draft                  IRC CAP                       March 2005

6.  IANA Considerations

   The standardized capability name space shall be managed by IANA in
   accordance with the description of capability names in Section 5.  In
   particular, any name not containing the period character ('.') must
   be specified by an RFC.























Mitchell, et al.       Expires September 5, 2005               [Page 13]
Internet-Draft                  IRC CAP                       March 2005

7.  Security Considerations

   Capabilities are an extension to a preexisting, insecure chat
   protocol.  This extension does not add and does not purport to add
   any security to the IRC protocol.  Capability negotiation occurs
   after client registration has already begun.  Moreover, no mechanism
   is defined that allows parameters to be passed for specific
   capabilities.  Although such a mechanism could be added,
   cryptographic security systems frequently require several exchanges
   to establish a secure context, particularly if authentication must
   also be negotiated.  Thus, the capabilities extension is unsuited to
   the implementation of those protocols, and other mechanisms, such as
   SSL-encapsulated IRC, should be used.



















Mitchell, et al.       Expires September 5, 2005               [Page 14]
Internet-Draft                  IRC CAP                       March 2005

8.  Acknowledgments

   The authors wish to gratefully acknowledge the participation of Aaron
   Wiebe and the members of the proto-desc@dal.net email list in the
   design of this protocol extension.

9  References

   [1]  Bradner, S., "Key words for use in RFCs to Indicate Requirement
        Levels", BCP 14, RFC 2119, March 1997.

   [2]  Oikarinen, J. and D. Reed, "Internet Relay Chat Protocol", RFC
        1459, May 1993.

   [3]  Kalt, C., "Internet Relay Chat: Client Protocol", RFC 2812,
        April 2000.

   [4]  Crocker, D. and P. Overell, "Augmented BNF for Syntax
        Specifications: ABNF", RFC 2234, November 1997.

   [5]  Bradner, S., "IETF Rights in Contributions", BCP 78, RFC 3667,
        February 2004.

Authors' Addresses

   Kevin L. Mitchell
   Undernet IRC Network
   38 Eighth St., Apt. 7
   Cambridge, Massachusetts  02141
   US

   Phone: +1-617-230-1021
   EMail: klmitch@mit.edu
   URI:   http://www.mit.edu/~klmitch/

   Perry Lorier
   Undernet IRC Network
   3 Liston Cres
   Hamilton, Waikato  2001
   NZ

   Phone: +64-7-859-1109
   EMail: isomer@undernet.org



Mitchell, et al.       Expires September 5, 2005               [Page 15]
Internet-Draft                  IRC CAP                       March 2005

   Lee Hardy
   ircd-ratbox Development Team

   EMail: lee@leeh.co.uk
   URI:   http://www.leeh.co.uk

   Piotr Kucharski
   IRCnet

   EMail: Beeth@irc.pl
   URI:   http://42.pl/




















Mitchell, et al.       Expires September 5, 2005               [Page 16]
Internet-Draft                  IRC CAP                       March 2005

Appendix A.  Examples

   In the following examples, lines preceded by "CLIENT:" indicate
   protocol messages sent by the client, and lines preceded by "SERVER:"
   indicate protocol messages sent by the server.  For clarity, the
   origin field for server-originated protocol messages has been
   omitted.  This field would consist of a colon (':') followed by the
   full server name, and would be the first field in the command.

   A client communicating with a server not supporting CAP.

          CLIENT: CAP LS
          CLIENT: NICK nickname
          CLIENT: USER username ignored ignored :real name
          SERVER: 001 [...]

   A client which does not wish to enter capability negotiation.

          CLIENT: CAP END
          CLIENT: NICK nickname
          CLIENT: USER username ignored ignored :real name
          SERVER: 001 [...]

   A client entering into capability negotiation during registration,
   and requesting a set of capabilities that the server does not
   support.

          CLIENT: CAP LS
          CLIENT: NICK nickname
          CLIENT: USER username ignored ignored :real name
          SERVER: CAP LS * :A B C D E F G H
          SERVER: CAP LS :I J
          CLIENT: CAP REQ :A B C D E F
          SERVER: CAP NAK :A B C D E F
          CLIENT: CAP REQ :A C E F
          SERVER: CAP ACK :A C E F
          CLIENT: CAP REQ :B
          SERVER: CAP ACK :B
          CLIENT: CAP REQ :D
          SERVER: CAP NAK :D
          CLIENT: CAP END
          SERVER: 001 [...]





Mitchell, et al.       Expires September 5, 2005               [Page 17]
Internet-Draft                  IRC CAP                       March 2005

   A client requesting a capability that requires an ACK (Section 3.4)
   subcommand from the client to be enabled.

          CLIENT: CAP LS
          SERVER: CAP LS :~I ~J K
          CLIENT: CAP REQ :I J K
          SERVER: CAP ACK :~I ~J K
          CLIENT: CAP ACK :I J

   A client requesting a capability that requires an ACK (Section 3.4)
   subcommand from the client to be enabled and disabled, using the LIST
   (Section 3.2) subcommand in between.

          CLIENT: CAP LS
          SERVER: CAP LS :~A ~B
          CLIENT: CAP REQ :A B
          SERVER: CAP ACK :~A ~B
          CLIENT: CAP LIST
          SERVER: CAP LIST :~A ~B
          CLIENT: CAP ACK :A B
          CLIENT: CAP LIST
          SERVER: CAP LIST :A B
          CLIENT: CAP REQ :-B
          SERVER: CAP ACK :-~B
          CLIENT: CAP LIST
          SERVER: CAP LIST :A -~B
          CLIENT: CAP ACK :-B
          CLIENT: CAP LIST
          SERVER: CAP LIST :A

   A client requesting a capability that is sticky.

          CLIENT: CAP LS
          SERVER: CAP LS :=I J
          CLIENT: CAP REQ :I J
          SERVER: CAP ACK :=I J

   A client requesting a capability be disabled.

          CLIENT: CAP LIST
          SERVER: CAP LIST :=A B C D
          CLIENT: CAP REQ :-B -C
          SERVER: CAP ACK :-B -C




Mitchell, et al.       Expires September 5, 2005               [Page 18]
Internet-Draft                  IRC CAP                       March 2005

Appendix B.  ABNF Description of Capabilities

   This section summarizes the ABNF [4] description of the capabilities
   extension.

          capcmd       =  [ ":" servername SP ] "CAP" SP subcmd

          subcmd       =  lscmd / listcmd / reqcmd / ackcmd /
                              nakcmd / clearcmd / endcmd

          capcmderr    =  ":" servername SP "410" SP nick SP badcmd
                              SP ":Invalid CAP subcommand"
                           ; badcmd is the unrecognized subcommand

          caplist      =  [ ":" ] *( capmod ) capab
          caplist      =/ ":" *( capmod ) capab 1*( SP *( capmod ) capab )

          lscmd        =  "LS"
          lscmd        =/ "LS" SP [ "*" SP ] caplist

          listcmd      =  "LIST"
          listcmd      =/ "LIST" SP ":"
          listcmd      =/ "LIST" SP [ "*" SP ] caplist

          reqcmd       =  "REQ" SP caplist

          ackcmd       =  "ACK" SP [ "*" SP ] caplist

          nakcmd       =  "NAK" SP ":" acklist
                           ; acklist is at least 100 characters of the
                           ; capability list from the REQ

          clearcmd     =  "CLEAR"

          endcmd       =  "END"

          elem         =  ALPHA *( ALPHA / DIGIT / "-" )

          netname      =  elem 1*( "." elem )

          netDeleg     =  netname 1*( "/" elem )

          standardized =  elem

          capab        =  netDeleg / standardized

          dismod       =  "-"
          stickymod    =  "="


Mitchell, et al.       Expires September 5, 2005               [Page 19]
Internet-Draft                  IRC CAP                       March 2005

          ackmod       =  "~"

          capmod       =  dismod / stickymod / ackmod
























Mitchell, et al.       Expires September 5, 2005               [Page 20]
Internet-Draft                  IRC CAP                       March 2005

Appendix C.  ChangeLog

   Note to RFC Editor: This section may be removed on publication as an
   RFC.

   Here is a log of changes to this document:

   2004-12-15 KLM Initial draft written.

   2004-12-16 KLM

      *  Added description of the argument to some CAP commands in
         Section 3.

      *  Clarified that requirements of Section 3 only apply to clients
         and servers implementing capabilities.

      *  Substitution of "performed" for "done" in Section 3.5

      *  Added LIST (Section 3.2) subcommand to provide a mechanism to
         query active capabilities.

      *  Added reference to RFC 2812 [3].

      *  Moved Examples (Appendix A) section into the back matter.

      *  Corrected Perry Lorier's email address.

      *  Added this ChangeLog section.

      *  Corrected typo in Section 3.7: "sent" for "send".

      *  Added <vspace> elements to enhance readability.

      *  Changed to non-compact form.

      *  Changed anchor for Section 5 to "capabilities" from "caps" to
         reduce possible confusion.

      *  Revise last sentence of first paragraph of Section 2 to remove
         redundancy.

      *  Revise last sentence of second paragraph of Section 2

      *  Added email addresses for Lee H and Beeth; updated contact
         information for Isomer.



Mitchell, et al.       Expires September 5, 2005               [Page 21]
Internet-Draft                  IRC CAP                       March 2005

   2004-12-17 KLM

      *  Augmented description of CAP command and subcommands with ABNF
         description.

      *  Revised Section 5 to remove "net." name space and replace it
         with a delegated name space beginning with a DNS domain name
         (suggested by Isomer).

      *  Augmented ABNF description of capability names.

      *  Revised Section 6 to reflect change in capability name space.

      *  Added Appendix B to bring together the entire ABNF description
         of capabilities.

   2004-12-18 KLM

      *  Added explanation of what should happen if an unrecognized
         subcommand is given.

      *  Clarified what to do if a client sends a subcommand that
         shouldn't come from a client.

      *  Add references to LIST (Section 3.2) to LSL and Section 3.1.

      *  Section 3.3 omitted the caplist argument for the REQ command;
         corrected.

      *  Relax the prohibition against a client acknowledging a
         capability that doesn't modify the protocol stream in Section
         3.4

      *  Relax the requirement for a client that understands
         capabilities to send CAP END in Section 3.7

   2004-12-19 KLM

      *  Converted a number of common xrefs into internal entities to
         simplify the text.

      *  Inserted some white space to make the <front> section a bit
         more readable.

      *  Added the keyword "Protocol".


Mitchell, et al.       Expires September 5, 2005               [Page 22]
Internet-Draft                  IRC CAP                       March 2005

      *  Added the term "NOT RECOMMENDED" to the note on "Requirements
         Language".

      *  Moved LIST (Section 3.2) up in the list of CAP subcommands.

      *  Minor formatting change to the ABNF representation of subcmd.

      *  Capitalized "MAY" in "empty" subcommand.

      *  Added text about capability list order and what to do if no
         capabilities are implemented to "empty" subcommand.

      *  Mention LIST (Section 3.2) also in LSL when talking about
         sending more than one LSL subcommand.

      *  Clarify language in Section 3.1 a little bit.

      *  Substitute "set of capabilities" for "list of capabilities" in
         Section 3.3.

      *  Fix minor typo in preamble to ABNF description of NAK (Section
         3.5) subcommand: substitution of "ACK" for "NAK".

      *  Add note about servers ignoring END (Section 3.7) after client
         registration.

      *  Fix minor typo in preamble to ABNF description of LIST (Section
         3.2) subcommand: substitution of "END" for "LIST".

      *  Added Section 4 discussing capability negotiation.

      *  Add ".xml" extension to include files in references section.

      *  Simplification of preamble of first example (Appendix A).

      *  Add 'type="ABNF"' to <artwork> sections so that they can be
         extracted and used to create the abnf.xml now included in
         Appendix B.

      *  It's now RFC 3667 [5], not RFC 2026...

   2004-12-27 KLM

      *  Minor wording changes to second paragraph of Section 1

      *  Minor wording change to first paragraph of Section 2


Mitchell, et al.       Expires September 5, 2005               [Page 23]
Internet-Draft                  IRC CAP                       March 2005

      *  Minor wording changes to first paragraph of Section 3; remove
         redundant note about the IRC colon sentinel.

      *  Change a "must" to a "MUST" in Section 3.4; note that
         capability list may be truncated if it would otherwise exceed
         the 512 character limit.

      *  In Section 3.5, note that capability list may be truncated if
         it would otherwise exceed the 512 character limit.

      *  Remove redundant line about ignoring END (Section 3.7) commands
         after registration.

      *  Correct spelling of "acknowledgments".

      *  Empty <organization> elements for Lee H and Beeth; put Beeth's
         real name, Piotr Kucharski, in the right place.

      *  Switch to using a new preprocessor that consolidates all the
         ABNF artwork and inserts it with the processing instruction
         <?art type="foo"?>.

      *  Remove deliberate page break after <abstract> section.

      *  Reorder authors section to consolidate <organization> elements
         for everyone.

      *  Drop abbreviation for Undernet.

      *  Expand Section 7 a bit to try to explain why capabilities are
         not suited to securing IRC.

   2005-01-04 KLM

      *  Add Lee Hardy's information to the list of authors.

   2005-01-05 KLM

      *  Replace UNKNOWNCAPCMD with INVALIDCAPCMD.

      *  Begin rewriting LS (Section 3.1) documentation




Mitchell, et al.       Expires September 5, 2005               [Page 24]
Internet-Draft                  IRC CAP                       March 2005

   2005-01-19 KLM

      *  Redesign the protocol substantially to simplify it.

   2005-01-20 KLM

      *  Update Piotr's contact information.

      *  Drop the "x-" namespace...

   2005-01-20 LH

      *  Some servers do issue banner responses, now.

      *  The CAP subcommand is now a requirement.

      *  Minor grammatical fix-up in documentation of REQ (Section 3.3)
         ("acceptance of or rejection of"--strike first "of").

      *  Clarify that sticky capabilities cause a REQ (Section 3.3) to
         be NAK (Section 3.5)ed.

      *  Mark the third case of an ACK (Section 3.4) with an explicit
         indicator that it's the third case...

      *  Strike redundant mention of not suspending client registration
         in documentation for END (Section 3.7).

   2005-01-21 LH

      *  Move all references on capability modifiers to its own section

      *  Clarify instructions on the ack ('~') modifier, indicating it
         can be used with sticky capabilities.

      *  Add a note into CAP section about capability modifiers

   2005-01-21 KLM

      *  Subcommands are not optional anymore; updated the description
         of CAP and the ABNF to reflect this.

      *  More than one modifier may precede a capability name.


Mitchell, et al.       Expires September 5, 2005               [Page 25]
Internet-Draft                  IRC CAP                       March 2005

      *  Move ABNF for capmod into the "Capability Modifiers" section.

      *  Fix a few minor grammatical errors (I think).

      *  Note that capability names may be preceded by modifiers in the
         first form of ACK.

      *  Remove an unnecessary "MAY" in documentation for the third
         usage of ACK.

      *  Explicitly note in the ABNF for NAK that the parameter is an
         opaque repeat of at least the first 100 characters of the
         argument to REQ.

      *  CLEAR may result in more than one ACK.

      *  Clarify the language of what composes a capability name.

      *  Add missing </figure>.

      *  ACK subcommand should be sent in response to ACK with ack
         modifier as soon as possible...

      *  Allow disable modifier in LIST, but only in conjunction with an
         ack modifier.

      *  The ack modifier may also show up in an LS response; rewrote
         the final paragraph to indicate that and clarify the language.

      *  Add "Client" to the title in the appropriate place...

      *  The "capability" rule in the ABNF got changed to "capab" for
         brevity.

      *  Update "date" to be current.

   2005-01-22 LH

      *  Clarify a client must not act upon an ACK spread across
         multiple lines until it receives the final ACK of the set.

   2005-01-23 KLM

      *  Bump version number in preparation for any suggested edits...



Mitchell, et al.       Expires September 5, 2005               [Page 26]
Internet-Draft                  IRC CAP                       March 2005

   2005-01-26 LH

      *  Clarify a server also must not change capabilities until its
         finished sending its ACKs.

   2005-01-27 KLM

      *  Acknowledge Aaron Wiebe as participating.

   2005-03-01 LH

      *  Add examples on sticky modifiers, the removal modifier and the
         sticky modifier.

   2005-03-07 KLM

      *  Submit second draft...
















Mitchell, et al.       Expires September 5, 2005               [Page 27]
Internet-Draft                  IRC CAP                       March 2005

Intellectual Property Statement

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository at
   http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at
   ietf-ipr@ietf.org.

Disclaimer of Validity

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
   ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
   INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
   INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Copyright Statement

   Copyright (C) The Internet Society (2005).  This document is subject
   to the rights, licenses and restrictions contained in BCP 78, and
   except as set forth therein, the authors retain all their rights.

Acknowledgment

   Funding for the RFC Editor function is currently provided by the
   Internet Society.


Mitchell, et al.       Expires September 5, 2005               [Page 28]