How to stop usernames from hilighting you in Irssi

Oct 14, 2017 using tags irssi

I use the irssi client almost exclusively for all my chat needs. Through an IRC bouncer, I am able to connect to my Slack/Freenode/Gitter/other networks, all through a single irssi interface.

It does, however, become very annoying to get hilighted in IRC channels by robots, especially when related to builds! I have a few IRC channels setup where all I see is noise like this:

16:13:11 < travis-ci> marvinpinto/ (master - 034fdf3 : Marvin Pinto): The build passed.
16:13:11 < travis-ci> Change view :
16:13:11 < travis-ci> Build details :

I found a way to prevent these robots from hilighting me (in specific channels) using the irssi script.

The following trigger prevents the bot gitter from hilighting my username (marvin) on the Gitter network. For context, I connect to through their IRC gateway at

/trigger add -all masks '*!gitter@*' -regexp '(mar)(vin)' -replace '$1\x02\x02$2' -tags 'gitter-im'

What the above says is if the *!gitter@* username on the gitter-im network mentions the name marvin in a message, break up the string marvin into two parts. This ensures that the hilight I’ve setup for marvin does not get triggered. Note that in your setup gitter-im will be whatever name you give the gitter network in your irssi config.

Read the /trigger help docs for detailed information and more examples!