Ever heard of IRC? It’s sorta like Discord but way older. And also way better in a number of ways, none of which I’ll get into here. Basically it’s a text-based chat thing over the Internet that anybody can use, and with some tech chops even run their own server.
I run my own server because why not? Also because I wanted to make a little chat network to use with a chatbot I made.
IRC can be mystifying, especially when you add things like “IRC Bouncers.” It took me a while to gain a working understanding of the various pieces. I thought I’d share some of what I’ve learned and how my IRC network is set up, with caveat that I barely know anything about IRC!
The IRC server software I use is ircd, which runs on a very cheap VPS (virtual private server). It has a million different configuration options. I left most of it to the default, except changing it so it will only allow connections from the local server.
What good is a server if you can’t reach it from outside the server? Not much. That’s why I also run an IRC bouncer called ZNC. The short explanation is that it lets me stay connected to various IRC networks, it records things I missed when I wasn’t connected, and does other cool stuff. IRC is an ancient protocol and is missing a lot of things we take for granted in a messaging system. ZNC adds some nice features.
When I want to connect to my IRC server, I do so through ZNC, which does accept outside connections. Then, within the server, ZNC talks to ircd. In this way, I keep the IRC server itself a little safer and more protected from the internet at large.
To connect to my ZNC server I use a number of different IRC clients. On my phone I use Palaver, which I like because there’s a ZNC module that lets me get push notifications. In other words, if I get a message, my phone will ding.
On desktop, I mostly use ERC inside of Emacs. Sometimes I also use the gui program hexchat. The beautify of open protocols like IRC is that there are so many options for using it. There are about a million IRC clients out there, all with their own unique set of features. IRC is a fairly simple protocol compared to XMPP or things like iMessage or Discord. This makes it really easy to make things that can talk over IRC.
Which brings me to my chatbot. The whole reason I set up this little network is so I could chat with a chatbot. I wanted a sort of virtual text-based butler to help me with everyday tasks. Using a barebones python script as a starting point, I made a simple chatbot that does just that. Some of things it does:
- Reminds me to do things, like take medicine, have a coffee break, or take a deep breath
- Notifies me if any of my servers becomes unreachable
- Messages me when things happen, primarily when new entries are created in my journal
- Tells me the weather
- Looks up definitions for me
- Reminds me of upcoming calendar events
- I can send it messages and ask it to do things, like take a journal entry and record it to my journal
It’s pretty useful! And to be clear, this is absolutely not AI. The bot listens for certain phrases and replies based upon pre-coded messages.
Setting everything up was a little challenging, but ircd and ZNC have been running great for a year and a half. I use my little IRC network every day and find it to be extremely helpful.