Difference between revisions of "Filters"
m |
|||
Line 1: | Line 1: | ||
− | + | {{notice|Main client users only, for now}} | |
Filters are a simple yet useful system to replace text. They can be applied to incoming or outgoing IRC chat. | Filters are a simple yet useful system to replace text. They can be applied to incoming or outgoing IRC chat. | ||
+ | |||
+ | ==How to Use== | ||
Just go to Prefs -> Filters and setup your own. | Just go to Prefs -> Filters and setup your own. | ||
Line 14: | Line 16: | ||
For the regular expression syntax, see https://developer.mozilla.org/En/Core_JavaScript_1.5_Guide/Regular_Expressions | For the regular expression syntax, see https://developer.mozilla.org/En/Core_JavaScript_1.5_Guide/Regular_Expressions | ||
+ | ==Possible Usages== | ||
+ | |||
+ | (Feel free to add any that you use that aren't on here.) | ||
− | |||
* Replace irritating abbreviations: | * Replace irritating abbreviations: | ||
** BRB -> Be right back | ** BRB -> Be right back | ||
Line 27: | Line 31: | ||
* Use a matched text within the replaced string | * Use a matched text within the replaced string | ||
** \b([^ ]+)url\b -> http://www.$1.com -> mozillaurl -> http://www.mozilla.com | ** \b([^ ]+)url\b -> http://www.$1.com -> mozillaurl -> http://www.mozilla.com | ||
+ | |||
+ | ==Examples== | ||
+ | |||
+ | \bmibbiturl\b | ||
+ | |||
+ | [[Category:Preferences]][[Category:Features]] |
Revision as of 01:30, 11 May 2009
Main client users only, for now |
Filters are a simple yet useful system to replace text. They can be applied to incoming or outgoing IRC chat.
How to Use
Just go to Prefs -> Filters and setup your own.
- REGEXP - This is a javascript regular expression to match against
- Replacement - The text you want to replace with
- In - If checked, it'll be applied to any incoming IRC chat
- Out - If checked, it'll be applied to any outgoing IRC chat
Note that the filters are applied from first to last, only once.
For the regular expression syntax, see https://developer.mozilla.org/En/Core_JavaScript_1.5_Guide/Regular_Expressions
Possible Usages
(Feel free to add any that you use that aren't on here.)
- Replace irritating abbreviations:
- BRB -> Be right back
- i18n -> internationalization
- Filter out offensive words:
- Damn -> by the beard of Zeus!
- Store commonly used responses:
- tellWidget -> "The widget is a fantastic thing that you can find more info about here....."
- default:
- \bmibbiturl\b -> http://www.mibbit.com/chat/ (\b = word boundary)
- Use a matched text within the replaced string
- \b([^ ]+)url\b -> http://www.$1.com -> mozillaurl -> http://www.mozilla.com
Examples
\bmibbiturl\b