badd10de.dev

Internet Relay Chat


Connecting to a server

There are multiple IRC servers available, from the now disgraced freenode to libera and esper. To connect to a server you need to add it to the list and connect to it. You may want to change your nick after that. For example, for libera:

/server add libera irc.libera.chat:6697
/connect libera
/nick mynick

Now we can register our nick if you haven’t done it already:

/msg NickServ REGISTER password your@email.com

After that you probably want to set up your chat client to use sasl authentication. In case of Weechat:

/set irc.server.libera.nicks "mynick,mynick2,mynick3,mynick4,mynick5"
/set irc.server.libera.username "My user name"
/set irc.server.libera.realname "My real name"
/set irc.server.libera.autoconnect on
/set irc.server.libera.addresses "irc.libera.chat/6697"
/set irc.server.libera.ssl on
/set irc.server.libera.sasl_username "mynick"
/set irc.server.libera.sasl_password xxxxxxx

Basic IRC commands

Resources

Weechat relay on a Raspberry PI

Weechat supports its own relay protocol, which makes it very convenient for using it on a Raspberry PI, since it consumes very little power. The documentation on the matter can be a bit confusing though. The simplest way I’ve found is as follows.

First, install weechat on the PI and start it:

sudo apt-get install weechat
weechat

Configure a relay password with:

/set relay.network.password "myrelaypass"

To keep things simple, add a relay for all servers without SSL, wince we are on a controlled local network (Note that SSL will still be used when connecting to servers if desired).

/relay add irc 8000

If instead you want to set up this connection with SSL use this instead (Note that you will need to obtain an SSL certificate for it to work):

/relay add ssl.irc 8000

Now you can add and configure the servers as normal on the weechat instance of the PI. Multiple servers can be configured (for example libera and esper).

/server add libera irc.libera.chat/6697
/server add esper irc.esper.net/6697
/set irc.server.libera.nicks "mynick,mynick2,mynick3,mynick4,mynick5"
/set irc.server.libera.username "My user name"
/set irc.server.libera.realname "My real name"
/set irc.server.libera.autoconnect on
/set irc.server.libera.ssl on
/set irc.server.libera.sasl_username "mynick"
/set irc.server.libera.sasl_password xxxxxxx
/set irc.server.esper.nicks "mynick,mynick2,mynick3,mynick4,mynick5"
/set irc.server.esper.username "My user name"
/set irc.server.esper.realname "My real name"
/set irc.server.esper.autoconnect on
/set irc.server.esper.ssl on
/set irc.server.esper.sasl_username "mynick"
/set irc.server.esper.sasl_password xxxxxxx
/connect libera
/connect esper

Now you can go to the client weechat instance and connect to the relay servers by specifying servername:myrelaypass as password:

/set irc.server_default.capabilities "server-time"
/server add esper raspberry.pi.local.ip.addr/8000
/server add libera raspberry.pi.local.ip.addr/8000
/set irc.server.esper.password "esper:myrelaypass"
/set irc.server.libera.password "libera:myrelaypass"
/connect esper
/connect libera