Making IRC channels friendlier with ZNC

It has been a while since I’ve joined the #passenger channel on, but I notice that people regularly join that channel for support. It would be a shame if a user joins the channel, asks a question, then leaves frustration because nobody responds. However I cannot watch IRC all day. How do we solve this problem?


Luckily there are programs that can aid me in this. Luuk uses a so-called “IRC bouncer” to stay online even when his client is disconnected. The bouncer runs on a Unix server, and the client connects to the bouncer instead of the IRC server. When he connects his client the bouncer will replay messages that he missed.

There are many IRC bouncers out there. After some research it would appear that ZNC is the most actively maintained one. It’s written in C++ and is extensible through C++, Python and Perl.

Armed with ZNC, I’ve setup the following things:

  • I’ve configured ZNC to automatically set me away on IRC when my last client disconnects. My away message tells the user that my timezone is in Europe, and kindly refers him to the Phusion Passenger support page in case I don’t respond quickly enough.
  • I’ve also setup my IRC client to display a notification whenever my nick is mentioned in the channel, in case I am behind (or nearby) the computer but not watching the IRC window.
  • Finally, I’ve setup a channel topic that welcomes users, and tells them to mention my nick in their message to nudge me.

So far so good, but this alone isn’t enough. Not all IRC clients display away users in a special way, so users may not be aware that I am away. Also they may not read the channel topic when they enter the channel. ZNC doesn’t have any built-in functionality that can aid me further, so that’s when I decided to write some ZNC modules. Their API looks fairly easy.


The result is on Github. I’ve written two modules:

  • channel_away.cpp: if I’m away, then whenever someone sends a channel message that starts with my nick, ZNC will send an autoreply.
  • welcome_to_passenger.cpp: whenever someone joins #passenger, ZNC will send that person a welcome message, encouraging that person to ask a question and explaining to that person that I may be away, so please visit the support website if nobody answers.

I hope that #passenger has become a much friendlier place now and that my ZNC modules are useful to other people. 😀

Leave a Comment

You must be logged in to post a comment.