Relock: record the >= pin form
2295bad6
The canonical IRC protocol library for the Sigil ecosystem. Covers both client and server flows for modern IRCv3 (Tier 1 ratified caps + Tier 2 high-value drafts), plus a convenience client API with TLS and cooperative I/O.
@key=value;… parsing/serialization with escape handling (\: \s \\ \r \n)<nick>@<server-domain> with display + canonical accessors (federation-ready from day one)cap-client-state and cap-server-state advance values with no I/Osasl, message-tags, server-time, account-tag, account-notify, extended-join, userhost-in-names, multi-prefix, away-notify, chghost, invite-notify, setname, batch, labeled-response, echo-message, cap-notifydraft/chathistory, draft/read-marker, MONITORauthzid \0 authcid \0 passwordpbkdf2-sha256 + hmac-sha256-bytes)draft/read-marker) — query/set parsing + line buildersThe (sigil irc connection) module retains a high-level client convenience API with TLS, SASL, channel tracking, NickServ identify, and an event loop — backwards compatible with prior sigil-irc releases.
The sibling sigil-irc-websocket package provides (sigil irc websocket), composing the public sigil-websocket client API with the IRC message parser for browser/WASM use. It avoids adding a WebSocket dependency to the core sigil-irc package used by native/desktop IRC clients.
(import (sigil irc)
(sigil irc websocket))
(define conn (make-irc-connection
server: "irc.libera.chat"
port: 6697
nick: "mybot"
tls: #t))
(irc-on conn 'PRIVMSG
(lambda (msg)
(irc-privmsg conn (irc-message-target msg) "Hello!")))
(irc-connect conn)
(irc-join conn "#mychannel")
(irc-run conn)(import (sigil irc))
(define session
(irc-ws-connect
url: "wss://enclave.example/irc"
nick: "web-client"))
(irc-ws-register session)
(irc-ws-privmsg session "#sigil" "hello")
(let ((msg (irc-ws-receive session)))
(when (irc-message? msg)
(display (irc-message-command msg))
(newline)))(import (sigil irc message)
(sigil irc cap-negotiation)
(sigil irc capability)
(sigil irc sasl)
(sigil irc numerics))
;; Build per-connection state
(define cap (make-cap-server-state
server-name: "enclave.example"
supported: (list (make-cap CAP-SASL value: "PLAIN,EXTERNAL")
(make-cap CAP-MESSAGE-TAGS)
(make-cap CAP-SERVER-TIME)
(make-cap CAP-BATCH)
(make-cap CAP-LABELED-RESPONSE))))
(define sasl-state
(make-sasl-server-state
supported-mechanisms: (list SASL-PLAIN SASL-EXTERNAL)
server-name: "enclave.example"
verify: my-password-checker))
;; Inside your accept fiber, on each line:
(let* ((msg (parse-irc-message line))
(cap-out (cap-server-advance cap msg client-nick: nick))
(sasl-out (sasl-server-advance sasl-state msg client-prefix: nick)))
(for-each write-line cap-out)
(for-each write-line sasl-out))(import (sigil irc identity))
(define alice (make-irc-identity "alice" "enclave.example"))
(irc-identity->canonical alice) ; => "alice@enclave.example"
(irc-identity->display alice) ; => "alice" (default: nick only)
(irc-identity->display alice show-server?: #t)
; => "alice@enclave.example"This is a federation-readiness constraint: future CrafterNet sovereign-per-server federation hinges on identities being qualified from day one. Local-display helpers strip the suffix for UX; storage and protocol always use the canonical form.
| Module | Purpose |
|---|---|
(sigil irc) | Top-level re-exports |
(sigil irc message) | Line parsing/serialization, IRCv3 tags |
(sigil irc tags) | Typed tag accessors (server-time, account, batch, label, …) |
(sigil irc identity) | Qualified nick@server identity |
(sigil irc numerics) | Numeric reply constants |
(sigil irc capability) | Capability descriptors, Tier 1+2 names |
(sigil irc cap-negotiation) | CAP state machines (client + server) |
(sigil irc sasl) | SASL state machines (PLAIN, EXTERNAL, mechanism dispatch) |
(sigil irc sasl-scram) | SCRAM-SHA-256 driver (RFC 5802/7677) |
(sigil irc batch) | BATCH command + tag helpers |
(sigil irc chathistory) | CHATHISTORY query parser/serializer |
(sigil irc read-marker) | draft/read-marker (MARKREAD) helpers |
(sigil irc monitor) | MONITOR command + numeric reply builders |
(sigil irc connection) | High-level client convenience API (TLS, event loop) |
sigil-irc-websocket package also depends on: sigil deps install
sigil testFor development against unreleased sibling packages, use a dev-redirects.sgl and run sigil test --redirects ./dev-redirects.sgl.
BSD-3-Clause
$ git clone https://codeberg.org/sigil/sigil-irc
v0.16.5 — latest by version, released 3 Sep 2026
All releases — 10 tags in this repository.
One page per file, and every line has a permalink.
Relock: record the >= pin form
2295bad6
Add IRC WebSocket setup timeouts
a3f76b68
48fb0a0c
Align all Sigil packages on 0.19
e19c9da1
46de1664
543888f8
75e3f45f
The last 20 commits keep a page here. Everything older lives in the clone.