Irssi tricks: ignores and hilights

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:

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:

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:

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:

The irssi activity bar

The irssi activity bar

You might also not want that channel to show up in your activity bar. You can accomplish that with:

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:

To get a list of all the existing message levels, type this:

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:


This interesting version of my nickname hilights as well.

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:

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, also available from the Irssi script archive.

Stay tuned for more irssi tricks!

This entry was posted in irssi and tagged , , , . Bookmark the permalink.

16 Responses to Irssi tricks: ignores and hilights

  1. yabbah says:

    Really helpful, thanks for all tips. :)

    Give us more.

  2. grndzero says:


    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.


    • Garion says:

      Hello grndzero,

      do these two people have different user@host hostmasks? You could ignore one of them based on that, instead of their nickname.

      • grndzero says:

        Ha, yes, they do, I didn’t think of that. I guess host-mask would do the trick then.

        Thanks again

  3. Meh says:

    How do you remove ignores and would that display the messages (at list private ones) that were ignored in the past?

    • Garion says:

      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.

  4. Daniel says:

    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.

  5. John says:

    I searched quite a bit till i found this, but it was worth it. Finally no more notifications for nick changes, joins etc.

  6. Willow says:

    Dank je wel :)

  7. tony says:

    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?

    • Garion says:

      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!

  8. parison says:

    Hello, how can be stopped hilighting word? E.g. stop hilighting word hello. I can’t find it. Thank you.

  9. joe says:

    How to use regexp? I want to match “Free” but not “Free shipping”.
    free (?!shipping) doesn’t work. TIA.

  10. clort says:

    Ignoring lines where people play with the bots.
    /ignore -regex -pattern ^! * ALL
    /ignore -regex -pattern ^. * ALL

Leave a Reply

Your email address will not be published.