Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

Custom Filters

rocketman10404 edited this page Jul 16, 2013 · 8 revisions

The custom 'Filters' settings menu contains the interface for creating, configuring, and managing user-defined filters. These filters are stored on a server-by-server basis (same as Server Settings).

The collection of custom filters for a server are saved in a file called 'filters.cfg' located in a separate folder for each server, where the server folders can be found in .minecraft/config/tabbychat. For server-folder naming convention, see Server Settings.

Filter Interface

The New/Delete buttons located to the bottom-left of the filter window are used to create a new filter or delete the currently-displayed filter, respectively.

####Filter Name


The name given to a filter. The only purpose to this name is to help the user remember the purpose or function of the filter itself.

####Send matches to tab


When an incoming chat message matches a filter, these options are some of several available defining an action TabbyChat can take. In particular, these options define additional places the matching messages should appear in.

  • All tabs: Incoming messages matching the filter expression will be displayed in all currently-existing tabs
  • Tab Name: Matching messages will be displayed in a tab, which is created if it doesn't already exist, with the defined name.

####Hide matches from chat


When this option is enabled, incoming messages that match the filter will only be displayed in the master tab, and will not appear in any other tabs. (See Notes)

####Highlight matches


This option forms a set of options along with the following 'Color' and 'Format' options. Using this, when the filter's expression matches a portion of an incoming message, the matching portion will be displayed with the defined text color and style.

####Audio notification


This option forms a set along with the following 'Sound' option. Using this, when the filter's expression matches a portion of an incoming message, the sound defined in the 'Sound' option will be played.

####Inverse match


With this option enabled, TabbyChat will the consider the filter to be matching an incoming message if the expression doesn't match any portion of an incoming message.

####Case sensitive


When this option is enabled, TabbyChat will apply the filter expression in a manner that the letter case must match as well. By default, expressions are case-insensitive.

####Expression


This is the single most important setting for a custom filter. The text box here contains the Regular Expression (in conventional Java syntax) which should be applied to each incoming message in order to locate a match for the filter. (See Notes, Reference)

##Notes

  1. In order to provide predictable and sensible behavior, some options may be disabled depending on the state of other options. Here is a list of situations where some options are disabled:
  • An 'Inverse' match filter cannot have highlighting applied, and vice-versa
  • A filter configured to hide matches also cannot have highlighting applied, nor can it have an audio notification defined.
  • Hiding matches and sending matches to a tab cannot be used together.
  • Sending matches to a named tab and to all tabs cannot be used together.
  1. Highlighting is applied to the entire portion of the incoming message that matches the filter expression. Moreover, any highlighting/formatting codes which existed prior in the to-be-highlighted region will be removed, and potentially re-applied at the end of the highlighted region if appropriate.

  2. When defining a filter that hides its matches from chat, users may find their continued presence in the master tab undesirable if they find themselves typically watching the contents of the master tab. In this case, desired functionality can be obtained by making a 'copy' of the master tab. This can be achieved by defining a filter to send its matches to a new tab with the expression .* which will match every message. However, messages that match a 'hide matches' filter will not be displayed in this copy as they would be in the master tab, making this copy a more desirable tab for chat-watching.

  3. When crafting a filter expression, beware that some characters have special meaning in Regular Expression syntax. For instance, brackets [] are used to define a character 'class' or 'set' inside an expression. An example of a character set would be [d-g], which in a regular expression match a single occurrence of either d, e, f, or g. If a user is attempting to match an occurrence of those special characters, they must be 'escaped' by preceding them with a backslash. See Reference for more information on which characters constitute 'special' characters.

##Reference

  1. Regular Expression Basic Syntax reference, including special characters and constructs.
  2. Regular Expression Test Page for Java at regexplanet.com: Allows you to provide a test expression and test input to see detailed information on how your expression is applied, and what specifically it matches.
Clone this wiki locally