Apps
IRC
# IRC — Bare-Bones IRC Client
A workspace panel that connects to an IRC server over TLS (or plaintext), joins a channel, and lets you chat from the terminal. Built on the `net/*` networking primitives — IRC's line-delimited protocol maps directly onto `net/on-line`.
## Configuration
Edit the `app-state` ref at the top of `src/irc.dft`:
| Field | Default | Description |
|-------|---------|-------------|
| `server` | `"irc.libera.chat"` | IRC server hostname |
| `port` | `6697` | Server port (6697 for TLS, 6667 for plaintext) |
| `nick` | `"deft-irc"` | Nickname to register with |
| `channel` | `"#deft-lang"` | Channel to auto-join on connect |
| `use-tls?` | `true` | Use `net/connect-tls` (mbedTLS) when true, `net/connect` when false |
| `sasl-user` | `nil` | NickServ account name for SASL PLAIN authentication |
| `sasl-pass` | `nil` | NickServ account password for SASL PLAIN authentication |
## SASL Authentication
Networks like Libera.Chat require SASL authentication with a verified NickServ account. To connect:
1. Register an account with NickServ on the target network (via another client)
2. Set `sasl-user` to your NickServ account name
3. Set `sasl-pass` to your account password
When SASL credentials are present, the client performs `CAP REQ :sasl` → `AUTHENTICATE PLAIN` → `AUTHENTICATE <base64>` before sending `NICK`/`USER`. Leave `sasl-user` nil to skip SASL entirely.
## Slash Commands
Type these in the input line:
| Command | Action |
|---------|--------|
| `/join #chan` | Join a channel |
| `/nick name` | Change nickname |
| `/msg nick text` | Send a private message |
| `/ns <command>` | Send a command to NickServ (e.g. `/ns INFO`) |
| `/register pass email` | Register a new NickServ account (password + email) |
| `/set-sasl account pass` | Set SASL credentials at runtime |
| `/clear-sasl` | Clear SASL credentials |
| `/reconnect` | Disconnect and reconnect with current settings |
| `/quit` | Send QUIT and disconnect |
Any other input is sent as a `PRIVMSG` to the current channel.
## Menu
| Menu | Item | Action |
|------|------|--------|
| IRC | Reconnect | Disconnect + reconnect |
| IRC | Disconnect | Send QUIT and close the connection |
| IRC | Status | Show server, nick, TLS/SASL status |
| Account | Register... | Show NickServ registration instructions |
| Account | Set SASL... | Show SASL configuration instructions |
## Setting Up SASL (First Time)
If your network requires SASL and you don't have an account yet:
1. Connect to a network that allows unauthenticated connections
2. Type `/register your@email.com` to register with NickServ
3. Check your email for a verification code
4. Type `/ns VERIFY REGISTER <nick> <code>` to verify
5. Type `/set-sasl <account> <password>` to configure SASL
6. Type `/reconnect` to connect with SASL
## Key Bindings
| Key | Action |
|-----|--------|
| `Enter` | Send input line |
| `Escape` | Send QUIT and disconnect |
| `Up` / `Down` | Scroll chat history |
| `Page Up` / `Page Down` | Fast scroll through history |
## TLS
IRC networks run TLS on port 6697. Set `use-tls?` to `true` (the default) to connect directly via `net/connect-tls`. For plaintext, set `use-tls?` to `false` and use port 6667 (or point at a local stunnel bridge).