Irssi, as blogged extensively throughout this site, is one solid client. The flexibility never ceases to amaze me, and tonight was one of those times.
Hanging out in the amount of channels I do, I see a lot of activity in my statusbar for all of my joined channels. This can be overwhelming for some, but I don’t mind it. What I do mind, however, is when I check in on a specific channel, and see pages and pages of scrollback that is nothing more than people joining and leaving the channel. I’ve tried blatantly ignoring JOINS, PARTS and QUITS, as they’re called, but I always disable it, because I usually want to be kept abreast of when someone leaves a channel that I’m having a conversation with. I don’t want to look silly continuing to chat to someone, long after they’ve left. So, I need a way to keep on top of when people are joining and leaving the channel, but not have that information in the channel itself. Thankfully, Irssi meets this need.
The concept is simple. A JOIN, PART or QUIT is what is referred to as a “level”. There are a number of different levels that Irssi supports, all of which can be found with “/help levels” in Irssi. With Irssi, it is possible to ignore, or even redirect, levels. In my case, I want to redirect these three levels to another window, if possible. So, digging through the settings in Irssi, I found “window_check_level_first”. By default, this setting is “OFF”, which means that Irssi has a global setting for levels, and how they’re handled. Enabling this setting, means to follow the levels that have been assigned to their respective channels. However, if you turn this on first, without doing some initial setup before hand, you’ll notice everything going to your status window by default, including chat. This isn’t what we want, so let’s get setup.
The first thing we need to do is set our levels for all of our currently open windows, as well as any future windows that we open. We can accomplish this with two commands in Irssi:
/foreach window /window level ALL -JOINS -PARTS -QUITS /set window_default ALL -JOINS -PARTS -QUITS
Now, the next thing to do is to create a new hidden window that will be the new home for all your JOINS, PARTS and QUITS. So, from Irssi:
/window new HIDDEN
Navigate to that window, wherever it is placed, and give it a name. For me, I called it “junk”. Of course, this isn’t necessary, just optional, but I prefer that each of my windows have a name:
/window name junk
It will have picked up the -JOINS -PARTS -QUITS from our default setting we just applied, so we’ll need to reverse that. Easiest way is to just apply the converse of what you did earlier:
/window level -ALL JOINS PARTS QUITS
Sweet. Our window is finished. Now, we can turn on the setting that will tell Irssi to look for each individual window level setting:
/set window_check_level_first ON
Wait a bit, and you should see all the JOINS, PARTS and QUITS going to your new hidden window, rather than each respective channel. You’ll also notice that it doesn’t print the channel where these are originating. I don’t know of an easy way to set that without a script, so if you know of such a script that exists, or want to write one yourself, sharing that would be appreciated. In the meantime, this is better than nothing.
Don’t forget to save:
Also, you may not want to make your “junk” window hidden, but rather make it sticky, and split Irssi, putting the junk window on the top. I’ve done this with my highlight window, so it would make sense here. In that case, just:
/window stick on /window show (number|name)
You can then size the window as needed if you decide you split your Irssi.
And, there you have it. Now, when people are joining and quitting, rather than filling your scrollback where precious chat exists, it’s all being forwarded to a window of your choice. If eventually, you like this setup, and you find that you’re not checking your junk window for joins and quits, then you may be able to get away with just ignoring JOINS, PARTS and QUITS altogether Irssi-wide. Which means, if for any reason you want to reverse this setup, it’s rather trivial:
/set window_check_level_first OFF /foreach window /window level ALL /set window_default_level ALL /window close /save
And that would back you out of this configuration, and get you back to default.
I should mention that I’ve heard that WeeChat has a feature that only people you’ve recently chatted with will show when they quit, or there is a setting for setting this. I personally think WeeChat is a solid client. However, in this case, I don’t want to see any quits, even with those I’m chatting with, in that buffer. However, I would like to see it in another buffer, and Irssi makes this painless. So, while I’m sure WeeChat can also meet similar needs, Irssi meets my needs best.
As with my other Irssi tutorials, I hope this one was helpful. I find that I personally benefit from my own writing, and that’s the major reason why I blog. I have searched for doing solving problems in the past, only to stumble upon my own blog post, outlining the very issue I’m faced with again. So, if it won’t benefit you, at least it will benefit myself.