2026-11-27 00:10:44 +01:00
|
|
|
|
# irc9
|
|
|
|
|
|
|
2026-11-27 01:31:31 +01:00
|
|
|
|

|
|
|
|
|
|
|
2026-11-27 00:10:44 +01:00
|
|
|
|
A deliberately minimal console IRC client in C. No network list, no settings
|
|
|
|
|
|
commands, no plugins. Just servers, windows, timestamps, and two keys to move
|
|
|
|
|
|
around.
|
|
|
|
|
|
|
|
|
|
|
|
## Build and run
|
|
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
|
make
|
|
|
|
|
|
./irc9 # finds a config automatically (see below)
|
|
|
|
|
|
./irc9 myconfig.conf # or point at a config explicitly
|
2026-11-27 20:31:23 +01:00
|
|
|
|
./irc9 -s myconfig.conf # hide join and quit notices in channel windows
|
2026-11-27 00:10:44 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-11-27 20:31:23 +01:00
|
|
|
|
`-s` and `--silent` hide JOIN and QUIT notices in channel windows.
|
2026-11-27 23:17:04 +01:00
|
|
|
|
`-C` and `--colored` color nicknames in channel and private chats and in
|
|
|
|
|
|
nicklists. Your own nick is always green in this mode, including in the status
|
|
|
|
|
|
line.
|
2026-11-27 21:47:51 +01:00
|
|
|
|
Use `-c RRGGBB` or `--color RRGGBB` to replace the default cyan accent on
|
|
|
|
|
|
the channel tree and divider. For example, `./irc9 --color FF8800` uses
|
|
|
|
|
|
orange on terminals with true-color support.
|
2026-11-27 20:31:23 +01:00
|
|
|
|
|
|
|
|
|
|
With no config path, irc9 looks next to the executable, in this order:
|
2026-11-27 00:10:44 +01:00
|
|
|
|
`irc9rc`, `config`, then `~/.irc9rc`. Paths are relative to the binary, not to
|
|
|
|
|
|
the current working directory.
|
|
|
|
|
|
|
|
|
|
|
|
Connection attempts (DNS, connect and TLS handshake) run in the background, so
|
|
|
|
|
|
the interface opens and stays usable even when the network is down or DNS is
|
|
|
|
|
|
slow; failed servers retry automatically.
|
|
|
|
|
|
|
2026-11-27 02:27:34 +01:00
|
|
|
|
Requires a C compiler and an ANSI-compatible terminal with an alternate screen.
|
|
|
|
|
|
TLS is compiled in automatically when OpenSSL development files are available (`pkg-config --exists openssl`); no
|
2026-11-27 00:10:44 +01:00
|
|
|
|
special flags are needed. Without OpenSSL the client still builds, but server
|
|
|
|
|
|
lines marked `ssl`/`tls` cannot connect.
|
|
|
|
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
2026-11-27 22:29:01 +01:00
|
|
|
|
One file, nine active keywords:
|
2026-11-27 00:10:44 +01:00
|
|
|
|
|
|
|
|
|
|
```
|
2026-11-27 22:27:41 +01:00
|
|
|
|
nick irc9user
|
|
|
|
|
|
user irc9user
|
|
|
|
|
|
real Happy irc9 User
|
|
|
|
|
|
# strip_formatting off # default on; off renders IRC bold/color/etc.
|
2026-11-27 00:10:44 +01:00
|
|
|
|
|
2026-11-27 22:27:41 +01:00
|
|
|
|
# Libera and OFTC use TLS on 6697. Use port 6667 without the ssl keyword for
|
|
|
|
|
|
# plain TCP. The optional sasl line applies to the server above it; the SASL
|
|
|
|
|
|
# user is your account name. An optional autocommand sends one raw IRC command
|
|
|
|
|
|
# after registration on the server above it, before startup channel joins.
|
|
|
|
|
|
|
|
|
|
|
|
# libera
|
2026-11-27 00:10:44 +01:00
|
|
|
|
server irc.libera.chat 6697 ssl
|
2026-11-27 22:27:41 +01:00
|
|
|
|
name Libera Chat
|
|
|
|
|
|
# sasl irc9user my-sasl-password
|
|
|
|
|
|
# autocommand /msg NickServ IDENTIFY irc9user $PASSWORD
|
|
|
|
|
|
# Build with make -B AUTOJOIN=1 and uncomment channel lines to join at startup.
|
|
|
|
|
|
# Each channel line applies to the server above it.
|
|
|
|
|
|
channel #irc9
|
|
|
|
|
|
# channel #murx
|
|
|
|
|
|
# channel #zynk
|
2026-11-27 00:10:44 +01:00
|
|
|
|
|
2026-11-27 22:27:41 +01:00
|
|
|
|
# oftc
|
|
|
|
|
|
# server irc.oftc.net 6697 ssl
|
|
|
|
|
|
# name OFTC
|
|
|
|
|
|
# sasl irc9user my-sasl-password
|
|
|
|
|
|
# autocommand PRIVMSG NickServ :STATUS irc9user
|
|
|
|
|
|
# channel #linux
|
2026-11-27 00:10:44 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
`nick`, `user`, and `real` are global. A `server` line starts a new server:
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
server <host> [port] [ssl|tls]
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2026-11-27 21:34:07 +01:00
|
|
|
|
An optional `name <display name>` line below `server` sets its label in the
|
|
|
|
|
|
channel tree. The label defaults to the hostname.
|
|
|
|
|
|
|
2026-11-27 00:10:44 +01:00
|
|
|
|
The port defaults to `6667`. The optional third token `ssl` or `tls` enables
|
|
|
|
|
|
TLS; use port `6697` for Libera and OFTC. A `sasl <user> <pass>` line applies to
|
|
|
|
|
|
the most recent `server` line and enables SASL PLAIN for that server only. The
|
|
|
|
|
|
SASL user is your account name (for many people this is the same as the nick).
|
|
|
|
|
|
|
2026-11-27 18:31:56 +01:00
|
|
|
|
Place an optional `autocommand <IRC command>` below the corresponding
|
|
|
|
|
|
`server` line, immediately after its `sasl` line when present. For example,
|
|
|
|
|
|
`autocommand PRIVMSG NickServ :STATUS mynick` sends that raw IRC command.
|
|
|
|
|
|
It runs once per successful registration, including reconnects, after SASL
|
|
|
|
|
|
negotiation when configured and before startup channel joins.
|
|
|
|
|
|
|
2026-11-27 02:17:35 +01:00
|
|
|
|
To enable startup channel joins, build with `make -B AUTOJOIN=1`. Add one
|
|
|
|
|
|
`channel #name` line per channel below the corresponding `server` line.
|
|
|
|
|
|
irc9 sends the joins when that server first confirms registration. Default
|
|
|
|
|
|
builds ignore `channel` lines. Use `make -B` to rebuild with autojoin disabled.
|
|
|
|
|
|
Blank lines and whole-line comments starting with `#` are ignored.
|
2026-11-27 00:10:44 +01:00
|
|
|
|
|
|
|
|
|
|
TLS certificates are verified against a system CA bundle when one is found.
|
|
|
|
|
|
If no usable bundle is available, verification is disabled rather than
|
|
|
|
|
|
blocking the connection.
|
|
|
|
|
|
|
|
|
|
|
|
Build yours by copying `irc9rc-example` to `irc9rc` next to the binary (or to
|
|
|
|
|
|
`~/.irc9rc`).
|
|
|
|
|
|
|
|
|
|
|
|
## Layout
|
|
|
|
|
|
|
|
|
|
|
|
```
|
2026-11-27 02:42:18 +01:00
|
|
|
|
[irc9] irc.example / #general
|
2026-11-27 23:02:57 +01:00
|
|
|
|
/----------------------\ Topic: General discussion
|
2026-11-27 02:42:18 +01:00
|
|
|
|
|* irc.example |
|
|
|
|
|
|
| |-#general |
|
2026-11-27 19:06:31 +01:00
|
|
|
|
| |-#help(3) |
|
|
|
|
|
|
| \-alice | [10:21] <alice> hello there
|
|
|
|
|
|
|* irc.other | [10:22] <bob> hi
|
|
|
|
|
|
\______________________/ [10:22] * alice!u@host joined #help
|
2026-11-27 02:42:18 +01:00
|
|
|
|
----------------------------------------------------------------
|
|
|
|
|
|
[10:23] (me@irc.example:6697 [TLS])
|
|
|
|
|
|
> your message here
|
2026-11-27 00:10:44 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
The left column is a tree: each server and its windows (channels and private
|
|
|
|
|
|
message windows). An unread window shows `(n)` next to its name. `*` marks a
|
|
|
|
|
|
connected server. The selected server or window is shown bold and underlined. Highlights use the
|
2026-11-27 02:42:18 +01:00
|
|
|
|
terminal's default background so transparency is preserved where supported.
|
2026-11-27 23:25:42 +01:00
|
|
|
|
Channel topics wrap to the chat pane width and stay at the top while you scroll.
|
|
|
|
|
|
On short terminals, the topic leaves room for at least one chat line when possible.
|
2026-11-27 02:42:18 +01:00
|
|
|
|
The right pane shows the current window's scrollback with `[HH:MM]` timestamps.
|
2026-11-27 00:10:44 +01:00
|
|
|
|
Joins, parts and quits include the full hostmask; joins and parts also name the
|
2026-11-27 02:42:18 +01:00
|
|
|
|
channel. The status line above the input shows the time, nick, server, port, TLS state, and user modes.
|
2026-11-27 03:08:14 +01:00
|
|
|
|
Joining a channel prints its nicklist. `/n` and `/names` print it again.
|
|
|
|
|
|
Channel privileges such as operator or voice appear as a trailing `*` (for example, `alice*`).
|
2026-11-27 00:10:44 +01:00
|
|
|
|
CTCP `ACTION`, `VERSION`, `PING`, `TIME`, and `USERINFO` are understood; KICK,
|
|
|
|
|
|
MODE, TOPIC, and INVITE events are shown in the relevant window.
|
|
|
|
|
|
|
|
|
|
|
|
## Keys
|
|
|
|
|
|
|
|
|
|
|
|
| Key | Action |
|
|
|
|
|
|
| --- | --- |
|
|
|
|
|
|
| `Tab` | complete a `/` command or a nick; press again to cycle matches (recently completed nicks come first) |
|
2026-11-28 23:59:39 +01:00
|
|
|
|
| `Ctrl+Left` / `Ctrl+Right` | move to the previous / next word in the input line |
|
2026-11-27 00:10:44 +01:00
|
|
|
|
| `ctrl-n` / `ctrl-p` | next / previous window (tree order, wraps around) |
|
|
|
|
|
|
| `PageUp` / `PageDown` | scroll the current window |
|
|
|
|
|
|
| `ctrl-l` | clear the screen (history stays scrollable) |
|
2026-11-28 00:09:00 +01:00
|
|
|
|
| `ctrl-t` | toggle copy view, which hides the tree, chat timestamps, and sender names |
|
2026-11-27 22:53:59 +01:00
|
|
|
|
| `ctrl-s` | save the current window’s scrollback to a new plain-text file |
|
2026-11-27 00:10:44 +01:00
|
|
|
|
| Up / Down | command history |
|
|
|
|
|
|
| Left / Right, Home / End | edit the input line |
|
2026-11-29 00:05:35 +01:00
|
|
|
|
| `Del` | delete the character at the cursor |
|
2026-11-27 00:10:44 +01:00
|
|
|
|
|
2026-11-27 22:53:59 +01:00
|
|
|
|
At the save prompt, type a path and press Enter, or press Esc or Ctrl-G to
|
|
|
|
|
|
cancel. Existing files are protected from overwrites.
|
|
|
|
|
|
|
2026-11-27 00:10:44 +01:00
|
|
|
|
|
|
|
|
|
|
## Commands
|
|
|
|
|
|
|
|
|
|
|
|
There is no command for changing settings — edit the config file and restart
|
|
|
|
|
|
instead.
|
|
|
|
|
|
|
|
|
|
|
|
| Command | Action |
|
|
|
|
|
|
| --- | --- |
|
|
|
|
|
|
| `/join #chan` | join a channel |
|
|
|
|
|
|
| `/n [chan]` / `/names [chan]` | show a channel's nicklist (default: current window) |
|
2026-11-27 20:38:00 +01:00
|
|
|
|
| `/part [#chan] [reason]` / `/leave [#chan] [reason]` | leave the current or given channel and remove it from the tree |
|
2026-11-27 00:10:44 +01:00
|
|
|
|
| `/nick newnick` | change nickname |
|
|
|
|
|
|
| `/msg nick text` | send a private message |
|
|
|
|
|
|
| `/notice target text` | send a notice |
|
2026-11-27 20:47:05 +01:00
|
|
|
|
| `/query [nick]` | open or focus a private-message window, or close the current private chat with no nick |
|
2026-11-27 00:10:44 +01:00
|
|
|
|
| `/whois nick` | show server information about a nick |
|
|
|
|
|
|
| `/who [mask]` | request a user list |
|
|
|
|
|
|
| `/me text` | send a CTCP ACTION |
|
|
|
|
|
|
| `/ctcp nick text` | send a raw CTCP request |
|
|
|
|
|
|
| `/ping nick` | send an IRC PING |
|
|
|
|
|
|
| `/away [message]` | set or clear away status |
|
|
|
|
|
|
| `/topic [text]` | query or set the current channel's topic |
|
|
|
|
|
|
| `/invite nick [#chan]` | invite a nick (current channel by default) |
|
|
|
|
|
|
| `/kick nick [reason]` | kick from the current channel |
|
|
|
|
|
|
| `/mode [target] [modes]` | query or set a mode |
|
|
|
|
|
|
| `/op`, `/deop`, `/voice`, `/devoice` | short forms of common channel modes |
|
|
|
|
|
|
| `/ban mask`, `/unban mask` | add or remove a channel ban |
|
|
|
|
|
|
| `/list [args]` | list channels |
|
|
|
|
|
|
| `/motd`, `/time`, `/version`, `/admin`, `/info`, `/links`, `/lusers`, `/stats [args]` | request server information |
|
|
|
|
|
|
| `/raw line` | send a raw IRC line (CRLF is appended) |
|
|
|
|
|
|
| `/close`, `/wc` | close the current non-server window |
|
|
|
|
|
|
| `/clear` | clear the current window's scrollback |
|
|
|
|
|
|
| `/reconnect` | reconnect the current server |
|
|
|
|
|
|
| `/quit [reason]` | disconnect and quit |
|
|
|
|
|
|
| `/help` | reminder of the above |
|
|
|
|
|
|
|
|
|
|
|
|
Anything else typed without a leading `/` is sent to the current channel or
|
|
|
|
|
|
private-message window. Typing in a server window tells you to pick a target.
|