(sigil irc capability)
(sigil irc capability) - IRCv3 capability descriptors
Capability negotiation in IRCv3 lets clients and servers agree on which optional features both sides support. Each capability is named (e.g. sasl, server-time, chathistory) and may carry a value specification (e.g. sasl=PLAIN,EXTERNAL,SCRAM-SHA-256).
This module provides:
- Constant names for every Tier 1 + Tier 2 capability sigil-irc knows about
- A
caprecord for representing a capability with optional value - Parsers for
CAP LS/CAP LIST/CAP REQargument bodies
The state machines that drive negotiation live in (sigil irc cap-negotiation).
Exports
capprocedureA single capability with an optional value spec.
The name is a string like "sasl" or "draft/read-marker". The value is #f if no value is specified, otherwise a string (e.g. "PLAIN,EXTERNAL"). Values are parsed lazily by feature modules — for SASL, splitting on commas yields the mechanism list.
cap?procedureTest if a value is a cap struct.
cap-nameprocedureGet the name field of a cap struct.
cap-valueprocedureGet the value field of a cap struct.
make-capvariableConstruct a cap record.
cap->stringprocedureRender a cap as name or name=value.
(cap->string (make-cap "sasl")) ; => "sasl"
(cap->string (make-cap "sasl" value: "PLAIN,EXTERNAL"))
; => "sasl=PLAIN,EXTERNAL"string->capprocedureParse a single capability spec (name or name=value) into a cap record.
(string->cap "sasl=PLAIN")
; => #<cap name: "sasl" value: "PLAIN">
(string->cap "echo-message")
; => #<cap name: "echo-message" value: #f>parse-cap-listprocedureParse a CAP argument body — a space-separated list of capability specs — into a list of cap records.
(parse-cap-list "sasl=PLAIN message-tags server-time")
; => (#<cap "sasl"=PLAIN> #<cap "message-tags"> #<cap "server-time">)tier-1-capsprocedureThe Tier 1 ratified IRCv3 capabilities (the must-have set).
tier-2-capsprocedureThe Tier 2 high-value drafts/extensions sigil-irc supports.
standard-capsprocedureThe full set of caps sigil-irc knows about. Servers built on sigil-irc can advertise a subset by filtering this list against what the server actually implements.
CAP-SASLvariable(No description)
CAP-MESSAGE-TAGSvariable(No description)
CAP-SERVER-TIMEvariable(No description)
CAP-ACCOUNT-TAGvariable(No description)
CAP-ACCOUNT-NOTIFYvariable(No description)
CAP-EXTENDED-JOINvariable(No description)
CAP-USERHOST-IN-NAMESvariable(No description)
CAP-MULTI-PREFIXvariable(No description)
CAP-AWAY-NOTIFYvariable(No description)
CAP-CHGHOSTvariable(No description)
CAP-INVITE-NOTIFYvariable(No description)
CAP-SETNAMEvariable(No description)
CAP-BATCHvariable(No description)
CAP-LABELED-RESPONSEvariable(No description)
CAP-ECHO-MESSAGEvariable(No description)
CAP-CAP-NOTIFYvariable(No description)
CAP-CHATHISTORYvariable(No description)
CAP-READ-MARKERvariable(No description)
CAP-MONITORvariable(No description)