I like the IRC client irssi a lot. I’ve been using it for many years now, and have learned many tricks about it. In these irssi blog entries, I’ll be sharing some tricks with you.
The /ignore command is quite powerful and can be used to remove lots of unwanted lines. If there is someone you don’t want to see in your channel, you can use it like this:
1 |
/ignore *!username@host.example.com ALL |
to ignore all messages from this person, on channels and in private, as well as things like joins and topic changes.
But it gets better. If other people are talking to this person in the channel, using the standard “Nickname: text here” structure, you can ignore this as well:
1 |
/ignore -replies *!username@host.example.com ALL |
Some channels have people who use expressions like “lol” and “rofl” a lot, including many variations like “lawl” and “rulf”. I don’t like it when such expressions appear as the only word on a line, and this ignore helps me avoid seeing them:
1 |
/ignore -regexp -pattern ^l[aoeui]+w?lz?|r[aoeui]+[lfk][lfk]z?$ |
With the -regexp flag, you indicate that this hilight is a regular expression. With regexps, you can match very specific strings. As you can see, you can just go wild with such regular expressions.
Sometimes, you’re on a channel with a lot of activity. All the joins, parts, and modes can really pollute the window. You can hide those lines with this command:
1 |
/ignore #channel JOINS PARTS QUITS TOPICS MODES |
You might also not want that channel to show up in your activity bar. You can accomplish that with:
1 |
/set activity_hide_targets #channel #channel2 #channel3 |
Actually, why would you want a channel to show up in your activity bar when someone parts it? Or voices someone? I have the following setting in my irssi:
1 |
/set activity_hide_level QUITS JOINS PARTS KICKS MODES TOPIC NICKS |
To get a list of all the existing message levels, type this:
1 |
/help levels |
My friends are sometimes a bit creative with my nickname, Garion. To make sure that their creative versions are hilighted properly, I’ve done this:
1 |
/hilight -regexp ga+ri+o+n+ |
1 |
/hilight -regexp gaa+r(k|tj)e+ |
So, if someone calls me Gaaaarioon or gaaartjeeee, it will still hilight properly.
Hilighted text, by default, appears as a purple/red/pink (depending on your terminal and colour perception) number in your activity bar. I like to have different subjects trigger different hilight colours in my activity bar, for example:
1 |
/hilight -full -color %G -actcolor %Y tea |
The -full flag makes sure that only the full word “tea” causes a hilight, and “steam” does not, even though it contains “tea”. The -color %G flag makes sure that the nickname of the hilighter is shown in green, instead of the default yellow. This flag also causes the activity number in your statusbar to turn green. The -actcolor %Y flag overrides this green-ness, and turns the activity number yellow instead.
I don’t think there is a way to manipulate the contents of messages themselves via built-in irssi commands. For example, you might want to remove “lol” from the end of sentences, or replace “god” by “flying spaghetti monster”.
If you want to modify messages, one option is to use Wouter Coekaerts‘s script trigger.pl, also available from the Irssi script archive.
Stay tuned for more irssi tricks!
Really helpful, thanks for all tips.
Give us more.
Hey,
thanks for useful tips. My question is this – is it possible to restrict ignoring some user only to a specific channel? As it happens I am on two channels which have two different people with same nickname.
Thanks
Hello grndzero,
do these two people have different user@host hostmasks? You could ignore one of them based on that, instead of their nickname.
Ha, yes, they do, I didn’t think of that. I guess host-mask would do the trick then.
Thanks again
Gaaaaaarrrion!
How do you remove ignores and would that display the messages (at list private ones) that were ignored in the past?
Thanks
You remove ignores via /unignore [ignore_number]. You can see the number of the ignore via the list that is shown when you type /ignore.
Removing an ignore will not show the previously ignored messages. Whatever has been ignored, is not retrievable.
I know this post is ancient, but just so you know: there is a way to automatically change your messages, with /completion -auto. I have:
/completion -auto ):
to correct a common typo, for example.
Awesome.
I searched quite a bit till i found this, but it was worth it. Finally no more notifications for nick changes, joins etc.
Thanks!
Dank je wel
Is there possibility to remove blank lines?
Im on a channel where sometimes someone spams lot of stuff in colors, but i have colors hidden so they appear as blank lines.
Id like to remove those blank lines, so is it possible?
I don’t think it’s possible using the standard /ignore command.
You could always use a Perl script to accomplish this, though. Good luck!
Hello, how can be stopped hilighting word? E.g. stop hilighting word hello. I can’t find it. Thank you.
Do you mean that you have in the past added a hilight to “hello” and you want to remove it? You can do that via /dehilight.
Thanks!
How to use regexp? I want to match “Free” but not “Free shipping”.
free (?!shipping) doesn’t work. TIA.
Ignoring lines where people play with the bots.
/ignore -regex -pattern ^! * ALL
/ignore -regex -pattern ^. * ALL