What’s the problem?
One of the most annoying things about IRC is how it is not persistent. There are two halves of this persistence thing:
- IRC doesn’t save the messages we have receive, the chats in which we are mentioned, etc., when we are offline.
- IRC doesn’t save our messages, logs and chats, when we go offline.
That’s the problem we are going to solve in this article.
What solutions are available?
The easy but incomplete solution -
tmux and a server
The most simple solution to this problem is to connect to IRC using a machine that is always running and connected to the internet. Yes, that means a server. And, then whenever we want to check what’s going on our favourite channels, we simply SSH/connect to the server. From this point onwards, we will be using the term
server to denote the machine that we have logged into to stay connected to IRC all the time. This is a practical solution, that a large number of people use. However, this solution comes with a few caveats:
- The most obvious one is that we need access to a terminal. In order to ensure that the IRC-client is always running on the server most people will use
screen, which they will attach-to or detach-to to use IRC. We may not always have access to a terminal or the right SSH credentials on the computer to SSH into our server.
- Thus, we run into a major problem of this approach, which is it’s lack of ability to connect with other IRC clients on seperate machines.
- Most people don’t have access to a computer all the time. So, a large section of IRC users, actually use their phones to chat on IRC. Having to use SSH on our phones to connect to an TUI-based IRC client, may not be very difficult, but it definitely isn’t pleasant. An IRC user like me, who uses a phone 80% of the time to chat on IRC, needs to have a proper IRC client made to be used on phones. Having a clean UI on a small screen can make a ton of difference. This, I think, should be one of the main reasons why people should avoid this approach.
- This method doesn’t allow us to maintain seperate buffers for seperate clients. Not having this may not be a deal breaker, but it’s definitely makes things easier. It also, doesn’t allow us to maintain a seperate list of channels on different clients/devices.
The average but incomplete solution -
I am, probably, going to get a lot of hate for this. Unlike the
weechat will provide us with seperate UI’s for seperate devices. But, all of those clients are still
weechat, meaning we become tied to it’s ecosystem. It still provides a great number of features, that a lot of people love. This solution has the following caveats:
- Lack of portability meaning if we decide to shift to another IRC-client, we can’t easily transfer all of our channel-lists, preferences and chat logs
- We connect to the same instance of
weechat, so it doesn’t allow us to provide different configurations for different devices.
The difficult but complete solution -
ZNC isn’t an IRC client. Both of the solutions mentioned above used one particular client or one particular session.
ZNC is an IRC bouncer. In very simple terms, it keeps us connected to the network from a remote machine and acts as a bridge between the IRC network and us.
ZNC is capable of properly logging all the chats, maintaining different channel-lists for different clients and much more. The functionality of
ZNC can be extended with the help of modules. Most importantly, ZNC gives us the freedom to use as many clients and as many different types of clients as we want. In addition it gives us fine control over what is sent to which client, and how much of it can be synced between two or more clients.
IMHO, ZNC is the right way to do IRC. In the next article, we will discuss how to set up ZNC and connect to IRC.