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
|
2026-11-30 01:03:35 +01:00
|
|
|
|
around + some more keys you can use.
|
2026-11-27 00:10:44 +01:00
|
|
|
|
|
|
|
|
|
|
## Build and run
|
|
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
|
make
|
|
|
|
|
|
./irc9 # finds a config automatically (see below)
|
|
|
|
|
|
./irc9 myconfig.conf # or point at a config explicitly
|
2026-11-29 03:38:27 +01:00
|
|
|
|
./irc9 -s myconfig.conf # hide channel activity notices
|
2026-11-27 00:10:44 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-11-29 22:58:02 +01:00
|
|
|
|
`-v` and `--version` print the program version. `-h` and `--help` print the
|
|
|
|
|
|
version and command-line usage.
|
|
|
|
|
|
|
2026-11-29 05:02:46 +01:00
|
|
|
|
`-s` and `--silent` hide channel join, quit, leave, and sync notices, as well as
|
2026-11-29 07:34:25 +01:00
|
|
|
|
nickname-change and mode-change notices.
|
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-29 23:05:19 +01:00
|
|
|
|
Use `--scrollback LINES` to set how many lines each window retains. The default
|
|
|
|
|
|
is 500 lines. For example, `./irc9 --scrollback 2000` keeps 2000 lines per window.
|
2026-11-30 21:57:06 +01:00
|
|
|
|
Use `--history` to save submitted slash commands to `~/.irc9_history` and
|
|
|
|
|
|
recall the 64 most recent commands with Up and Down across sessions.
|
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-30 01:03:35 +01:00
|
|
|
|
One file, ten 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
|
2026-12-02 00:12:07 +01:00
|
|
|
|
# user is your account name. An optional autocommand runs after registration on
|
|
|
|
|
|
# the server above it, before startup channel joins. Separate slash commands with
|
|
|
|
|
|
# commas. irc9 waits two seconds between commands.
|
2026-11-27 22:27:41 +01:00
|
|
|
|
|
|
|
|
|
|
# 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
|
2026-11-29 22:44:37 +01:00
|
|
|
|
# Suppress incoming messages from these nicknames on this server.
|
|
|
|
|
|
# blacklist user1,user2,user3
|
2026-11-27 22:27:41 +01:00
|
|
|
|
# sasl irc9user my-sasl-password
|
2026-12-02 00:12:07 +01:00
|
|
|
|
# autocommand /query user1,/query user2
|
2026-11-27 22:27:41 +01:00
|
|
|
|
# Build with make -B AUTOJOIN=1 and uncomment channel lines to join at startup.
|
|
|
|
|
|
# Each channel line applies to the server above it.
|
2026-12-02 00:00:24 +01:00
|
|
|
|
# Optional comma-separated slash commands run after the channel join succeeds.
|
|
|
|
|
|
# irc9 waits two seconds between commands on the same line.
|
|
|
|
|
|
# channel #channel /msg ChanServ OP #channel nickname,/mode #channel
|
2026-11-27 22:27:41 +01:00
|
|
|
|
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-29 21:45:56 +01:00
|
|
|
|
Add `blacklist user1,user2,user3` below a `server` line to suppress incoming
|
|
|
|
|
|
channel messages, private messages, and notices from those nicknames on that
|
|
|
|
|
|
server. Matching is case-insensitive. You can add multiple blacklist lines
|
|
|
|
|
|
for the same server.
|
|
|
|
|
|
|
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-12-02 00:12:07 +01:00
|
|
|
|
Place an optional `autocommand` below the corresponding `server` line,
|
|
|
|
|
|
immediately after its `sasl` line when present. For example,
|
|
|
|
|
|
`autocommand /query user1,/query user2` opens two query windows, two seconds apart.
|
|
|
|
|
|
A comma followed by a slash, with optional spaces or tabs between them, starts
|
|
|
|
|
|
the next command. The first command can also use raw IRC syntax, as in
|
|
|
|
|
|
`autocommand PRIVMSG NickServ :STATUS mynick`. Use `/raw` for later raw commands.
|
|
|
|
|
|
The sequence runs once per successful registration, including reconnects, after
|
|
|
|
|
|
SASL negotiation when configured and before startup channel joins.
|
2026-11-27 18:31:56 +01:00
|
|
|
|
|
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.
|
2026-11-29 20:02:14 +01:00
|
|
|
|
After registration, irc9 sends one startup JOIN every two seconds per server.
|
2026-12-02 00:00:24 +01:00
|
|
|
|
Add comma-separated slash commands after the channel name, for example
|
|
|
|
|
|
`channel #channel /msg ChanServ OP #channel nickname,/mode #channel`.
|
|
|
|
|
|
The first command runs when the server confirms the join. irc9 waits two seconds
|
|
|
|
|
|
between commands on the same line and runs them in the joined channel's context.
|
|
|
|
|
|
A comma followed by a slash, with optional spaces or tabs between them, starts the next command.
|
|
|
|
|
|
Default builds ignore `channel` lines. Use `make -B` to rebuild with autojoin disabled.
|
2026-11-27 02:17:35 +01:00
|
|
|
|
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-29 07:52:35 +01:00
|
|
|
|
/----------------------\/--------------------------------------\
|
2026-11-29 07:12:19 +01:00
|
|
|
|
|*irc.example | General discussion
|
2026-11-29 22:40:39 +01:00
|
|
|
|
| |-#general |---------------------------------------|
|
2026-11-27 19:06:31 +01:00
|
|
|
|
| |-#help(3) |
|
|
|
|
|
|
| \-alice | [10:21] <alice> hello there
|
2026-11-29 06:49:15 +01:00
|
|
|
|
|*irc.other | [10:22] <bob> hi
|
2026-11-29 05:57:35 +01:00
|
|
|
|
| | [10:22] * alice!u@host joined #help
|
2026-11-29 22:40:39 +01:00
|
|
|
|
\----------------------/\--------------------------------------/
|
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
|
2026-11-29 05:14:08 +01:00
|
|
|
|
message windows). Channels appear before private message windows, with
|
|
|
|
|
|
uppercase names sorting before lowercase names in each group. An unread window shows `(n)` next to its name. `*` marks a
|
2026-11-27 00:10:44 +01:00
|
|
|
|
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.
|
|
|
|
|
|
|
2026-11-29 22:49:42 +01:00
|
|
|
|
## Screenshot
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
2026-11-27 00:10:44 +01:00
|
|
|
|
## 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-29 19:59:08 +01:00
|
|
|
|
| `Ctrl+Up` / `Ctrl+Down` | scroll the channel tree by one row |
|
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-30 21:57:06 +01:00
|
|
|
|
| Up / Down | browse slash command history with `--history` |
|
2026-11-27 00:10:44 +01:00
|
|
|
|
| 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.
|
2026-11-29 20:14:03 +01:00
|
|
|
|
|
2026-11-29 22:37:02 +01:00
|
|
|
|
## Authors
|
|
|
|
|
|
|
|
|
|
|
|
See [AUTHORS](AUTHORS) for project credits.
|
|
|
|
|
|
|
|
|
|
|
|
- Armin Jenewein - <a@bsd.pm> - Founder
|
|
|
|
|
|
- Johannes Findeisen - <you@hanez.org> - Contributor
|
|
|
|
|
|
|
2026-11-29 20:14:03 +01:00
|
|
|
|
## License
|
|
|
|
|
|
|
|
|
|
|
|
Copyright 2026 Armin Jenewein
|
|
|
|
|
|
|
|
|
|
|
|
The code of murx is licensed under the terms of the Apache-2.0 license. See
|
|
|
|
|
|
LICENSE for details.
|