Skip to content

Commit 22b2356

Browse files
committed
Add soju.im/account-required
References: ircv3/ircv3-specifications#492
1 parent 3c5e603 commit 22b2356

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

doc/ext/account-required.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# account-required
2+
3+
This specification defines the informational `soju.im/account-required`
4+
capability. If present, it indicates that the connection to the server cannot
5+
be completed unless the clients authenticates, typically via SASL. Note, the
6+
absence of this capability does not indicate that connection registration can
7+
be completed without authentication; it may be disallowed due to specific
8+
properties of the connection (e.g. an untrustworthy IP address), which will be
9+
indicated instead by `FAIL * ACCOUNT_REQUIRED`.
10+
11+
Clients MUST NOT request `soju.im/account-required`; servers MUST reject any
12+
`CAP REQ` command including this capability.

downstream.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ var permanentDownstreamCaps = map[string]string{
240240
"soju.im/bouncer-networks-notify": "",
241241
"soju.im/no-implicit-names": "",
242242
"soju.im/read": "",
243+
"soju.im/account-required": "",
243244
}
244245

245246
// needAllDownstreamCaps is the list of downstream capabilities that
@@ -906,6 +907,12 @@ func (dc *downstreamConn) handleCapCommand(cmd string, args []string) error {
906907
break
907908
}
908909

910+
if name == "soju.im/account-required" {
911+
// account-required is an informational cap
912+
ack = false
913+
break
914+
}
915+
909916
m[name] = enable
910917
}
911918

0 commit comments

Comments
 (0)