Skip to content

Message Blacklist

Carl Bennett edited this page Feb 18, 2017 · 2 revisions

BNRBot supports hiding messages that match exact strings or regular expressions.

Using the feature

The message blacklist exists in the settings for BNRBot in the Global Settings page.

Right-click the list to add, modify, or remove entries. The pattern column is editable by left-clicking into it, but the list must be focused first before clicking to edit will work. Your first click on the list box will focus it, then the next click will allow editing.

There are two types of pattern matching. You can change the type by right-clicking the entry and changing the type from the menu.

Exact matches

Use this when you have an exact word, phrase, or sentence you wish for the bot to hide. Common scenarios are when a user has an idle message in the channel that doesn't change frequently.

Regex matches

These are PCRE-flavored regular expression matches. This is a bit more advanced but is super powerful for hiding messages that change slightly frequently, such as bot's idle uptimes or variating idle messages.

Note that it is not necessary to use / prefix or suffix in the pattern, and in fact, you shouldn't. The website Regex Pal is an excellent resource for testing a regex pattern against a message the bot might receive.

Examples

The following are examples of blacklist entries that @carlbennett uses with BNRBot:

Type Pattern
Exact - RealChat v0.9
Exact Roar v0.2
Regex -: System Uptime: .* :: Connection Uptime: .* :: StealthBot .* :-
Regex ^System \[.*\] Connection \[.*\]-: Emerge v2\.3 - EmNet Build :-$
Regex Asgard3-GUI:W:\d+:By M!ke$ *

* Due to GitHub formatting, this entry doesn't appear correctly. There's an extra space in the beginning of this pattern.

Clone this wiki locally