Disable highlights based on specific strings in WeeChat with per channel rules

Thursday, March 14, 2019

One of the IRC channels I’m on is a bridge to a public Minecraft server. Every time I write something in the game on that server the IRC channel shows me this:

Hemligastugan | **Admin** Hund » Example message.

WeeChat then thinks that the user “Hemligastugan” (which is a bot) mentioned me and then highlights the message for me. This got annoying pretty fast since it was me who wrote the message in Minecraft. :)

Thankfully this was easy to solve with the help of two plugins. One for the magic and another one to make it persistent:

  • - Allows per-buffer specification of a regex that prevents highlights.
  • - Auto-set buffer properties when a buffer is opened.


Install the two scripts in WeeChat:

/script install


I created a rule (using regex) that disables highlights for all messages containing the text **Admin** Hund in the channel #Hemligastugan on the server im (Bitlbee) like this:

/buffer_autoset add localvar_set_unhighlight_regex \*\*Admin\*\* Hund

If you want to add another rule just use the separator |. And don’t forget to save everything with the command /save when you’re done.



If you want to leave feedback, you can do so by either sending me a message via email, XMPP or via IRC.