Silver's Simple Site - Weblog - 2005 - June - 10


Filtering

Filtering stuff is one of those things everyone wants to do, no-one wants to write the code, and even fewer debug it when it breaks. Luckly, this doesn't stop some intrepid people from adding message filtering to ChatZilla.

Of course, the killer questions are:

  1. what to filter with, and
  2. what to do when a filter matches?

The first question is relatively easy, we only have a limited number of things known about a message anyway.

  • Actual message text, of course
  • The type of message (PRIVMSG, NOTICE, JOIN, etc.)
  • Source (e.g. the user object)
  • Destination (e.g. the channel object)
  • Handler source. This one is the fun one - it is where the message was displayed 'from', e.g. what code handled it. It may sound useless, except that it will be the default destination if no filters match, and will mean messages for a particular channel will appear on that channel (at least by default!).

That was easy. So what about the actions? They are more fun, as this is where the real flexibility will lie in the system. What I see being included:

  • display on source view
  • display on destination view
  • display on handler view
  • display on handler's parent view
  • set message priority (superfluous, activity, attention)
  • make sound (beep or WAV file)
  • activate/flash window
  • run some JS?

Update: Draft spec is here: http://hannibal.digitalrice.com/msgfilter/

Permalink | Author: | Tags: Mozilla, ChatZilla, RFE | Posted: 04:13PM on Friday, 10 June, 2005 | Modified: 09:57AM on Tuesday, 14 June, 2005 | Comments: 0

Powered by the Content Parser System, copyright 2002 - 2019 James G. Ross.