Skip to content

Commit c076463

Browse files
authored
Add extended-isupport (#543)
1 parent 18f9ad7 commit c076463

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed

extensions/extended-isupport.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
title: "`extended-isupport` Extension"
3+
layout: spec
4+
copyrights:
5+
-
6+
name: "Simon Ser"
7+
period: "2024"
8+
email: "contact@emersion.fr"
9+
---
10+
11+
## Notes for implementing work-in-progress version
12+
13+
This is a work-in-progress specification.
14+
15+
Software implementing this work-in-progress specification MUST NOT use the
16+
unprefixed `extended-isupport` capability name. Instead, implementations SHOULD
17+
use the `draft/extended-isupport` capability name to be interoperable with
18+
other software implementing a compatible work-in-progress version. The final
19+
version of the specification will use unprefixed capability names.
20+
21+
## Introduction
22+
23+
`RPL_ISUPPORT` is used to advertise metadata about the server as key-value
24+
entries. However, `RPL_ISUPPORT` is only sent by servers after connection
25+
registration. This undermines the usefulness of `RPL_ISUPPORT`: some of the
26+
metadata would be useful to clients prior to connection registration. This
27+
extension adds a mechanism to send `RPL_ISUPPORT` messages before connection
28+
registration, as well as a dedicated command to request the `ISUPPORT` list and
29+
a batch for `RPL_ISUPPORT` messages.
30+
31+
## Implementation
32+
33+
### `ISUPPORT` command
34+
35+
A new `ISUPPORT` command is introduced to request the full `RPL_ISUPPORT` list.
36+
When receiving this command, the server MUST reply with one or more
37+
`RPL_ISUPPORT` messages (grouped inside a `draft/isupport` batch if the `batch`
38+
and `draft/extended-isupport` capabilities are enabled, see below).
39+
40+
### `draft/extended-isupport` capability
41+
42+
When the `draft/extended-isupport` capability is enabled by the client, the
43+
server MUST accept `ISUPPORT` commands before connection registration
44+
completes (ie, before the client sends `CAP END`, and before the server sends
45+
`RPL_WELCOME`).
46+
47+
Before connection registration completes, while `draft/extended-isupport` is
48+
enabled, the server MAY send updates to the key-value entries via subsequent
49+
`RPL_ISUPPORT` messages (the same way it would after connection registration
50+
completes without this extension).
51+
52+
The server MAY skip the `RPL_ISUPPORT` replies usually sent when connection
53+
registration completes, if it already sent all information.
54+
55+
Before connection registration, the server MAY send only a subset of the full
56+
`RPL_ISUPPORT` list. In that case, the server MUST send a `RPL_ISUPPORT` list
57+
when connection registration completes with entries previously omitted.
58+
59+
### `draft/isupport` batch
60+
61+
The server MUST group all `RPL_ISUPPORT` messages inside a `draft/isupport`
62+
batch when the [`batch`][] and `draft/extended-isupport` capabilities are
63+
enabled. The server MUST NOT send any unbatched `RPL_ISUPPORT` message while
64+
both of these capabilities are enabled. The order in which the capabilities are
65+
enabled is not significant.
66+
67+
The batch MUST only contain one or more `RPL_ISUPPORT` messages, it MUST NOT
68+
contain any other message.
69+
70+
As usual, servers can update or delete existing values by sending additional
71+
`RPL_ISUPPORT` messages in a `draft/isupport` batch after the initial batch.
72+
73+
## Examples
74+
75+
Enabling the capability:
76+
77+
C: CAP LS 302
78+
S: :irc.example.org CAP * LS :multi-prefix sasl batch draft/extended-isupport
79+
C: CAP REQ batch draft/extended-isupport
80+
S: :irc.example.org CAP * ACK :batch draft/extended-isupport
81+
C: ISUPPORT
82+
S: :irc.example.org BATCH +asdf draft/isupport
83+
S: @batch=asdf :irc.example.org 005 * NETWORK=Example NICKLEN=30 FOO=bar
84+
S: :irc.example.org BATCH -asdf
85+
C: NICK emersion
86+
C: USER emersion 0 * :Simon Ser
87+
C: CAP END
88+
S: 001 emersion :어서 오세요
89+
90+
Sending a change:
91+
92+
S: :irc.example.org BATCH +asdf draft/isupport
93+
S: @batch=asdf :irc.example.org 005 * CHANNELLEN=64 NICKLEN=42 -FOO
94+
S: :irc.example.org BATCH -asdf

0 commit comments

Comments
 (0)