_          
 _ __(_)_ __ ___ 
| '__| | '__/ __|
| |  | | | | (__ 
|_|  |_|_|  \___|

...is a simple, lightweight, open source terminal IRC client written in C by rcr, and a monument to the questionable practice of BDD (Beer Driven Development).

rirc is a multi-server IRC client with support for CTCP and IRCv3 and comes with TLS 1.2 enabled by default. rirc also comes with all of the features you would expect of a terminal chat client, like chat and input history, line editing, etc. Source code:

Send bug reports, patches, etc, to:

mail [@] rcr.io

Send bitcoin to:

3MdzncjD6ZS8CqdgtPZar1iYx1jHGvBtmN

Installing


Building rirc from source requires a c99 compiler, Git, GNU gperf, and GNU make. The binary and man page install paths can be edited in the Makefile or overriden with environment variables and `make -e`. By default they are:

BIN_DIR = /usr/local/bin
MAN_DIR = /usr/local/share/man/man1
Fetch, init:
$ git clone https://git.sr.ht/~rcr/rirc
$ cd rirc
$ git submodule init
$ git submodule update --recursive
Build, install:
$ make
$ make install
Configure:
Edit config.h and repeat the build, install steps

Usage


rirc is controlled by a combination of CLI arguments, commands and keybinds. Commands beginning with ':' control the behaviour of rirc itself, while commands beginning with '/' are commands for the remote server.

rirc connects to servers on the command line, e.g.:

$ rirc -s hostname -n "nick_,nick__,nick___" -c "#chan1,#chan2"

rirc can connect to multiple servers by passing additional -s/--server arguments, with all other arguments applying to the server preceding them, e.g.:

$ rirc -s hostname1 -n "nick1" \
       -s hostname2 -n "nick2" --tls-disable \
       -s hostname3 -n "nick2" --port 1234 --pass password

By default all connections are TLS enabled over port 6697. The default username, realname and nick can be configured at compile time, or is otherwise set to the Unix username. The complete list of command line arguments:

-s, --server=SERVER      Connect to SERVER
-p, --port=PORT          Connect using PORT
-w, --pass=PASS          Connect using PASS
-u, --username=USERNAME  Connect using USERNAME
-r, --realname=REALNAME  Connect using REALNAME
-n, --nicks=NICKS        Comma separated list of nicks to use
-c, --chans=CHANNELS     Comma separated list of channels to join
    --ipv4               Connect using only ipv4 addresses
    --ipv6               Connect using only ipv6 addresses
    --tls-disable        Set server TLS disabled
    --tls-verify=MODE    Set server TLS peer certificate verification mode
--tls-disable
Disable TLS handshake and set default port to 6667
--tls-verify=MODE
Set the TLS x509 certificate verification mode, MODE must be one of:
  • disabled - cert is not verified
  • optional - cert is verified, handshake continues on error
  • required - cert is verified, handshake is aborted on error
The default mode is required.

keys


^N  :  go to next channel
^P  :  go to previous channel
^L  :  clear channel
^X  :  close channel
^C  :  cancel input/action
^U  :  scroll buffer up
^D  :  scroll buffer down
 ←  :  input cursor back
 →  :  input cursor forward
 ↑  :  input history back
 ↓  :  input history forward

commands


Commands:

:clear
Clear the current channel buffer
:close
Close the current channel buffer
:connect
Connect to the current server
:disconnect
Disconnect from the current server
:quit
Quit rirc

IRC


All commands beginning with a forward slash result in some command being sent to the server associated with the current buffer.

Commands not explicitly listed here can be sent verbatim, e.g.:

/mycommand target :foo bar baz
/away [message]
/emote [message]
/join [channels [keys]]
/notice <target> <message>
/part [message]
/privmsg <target> <message>
/quit [message]
/topic [message]
/topic-unset

IRCv3


rirc supports a number of IRCv3.2 extensions, enabled by default. If a server also supports these extensions they will be requested during connection registration. The supported extensions are:

/cap-ls
List the IRCv3 capabilities supported by the server.
/cap-list
List the IRCv3 capabilities currently enabled.

CTCP


CTCP (Client to Client Protocol) is a common extension that allows clients to query meta data about one another through automated responses. It's also used to implement emotes or actions. Clients may choose not to implement CTCP, and users may have some or all common CTCP types disabled for privacy reasons. Some CTCP message types, such as FINGER and USERINFO, are largely obsolete.

CTCP commands with an optional [nick] parameter will be sent to the current private chat when one is not given.

/ctcp-action <nick> <text>
Send <text> to <nick> as an action or emote. This command can be used to send an /emote to a specific target. Clients typically display the received action text in the third-person, e.g.:
* rcr goes to bed
This message type has no response.
/ctcp-clientinfo [nick]
Query a client for it's CTCP capabilities.
/ctcp-finger [nick]
Query a client for miscellaneous info, typically the target's realname.
/ctcp-ping [nick]
Query a client for reachability and latency.
/ctcp-source [nick]
Query a client for the location of it's source code.
/ctcp-time [nick]
Query a client for it's local time in human-readable form.
/ctcp-userinfo [nick]
Query a client for user info, typically the target's realname.
/ctcp-version [nick]
Query a client for it's name and version.