Just wanted to thank the author of this snippet.
We have a problem with a user who gets banned for flooding channels (with some kind of script I imagine, but I don't know the particulars of this), but leaves his client to auto-reconnect and auto-rejoin channels.
So at random times during the day we'll get 10 or so lines of [xxx joined],[xxx quit],[xxx joined],[xxx quit],[xxx joined],[xxx quit].
This script lets me hide this particular user's join/part/quits, but not ignore him when he's actually online.
Thanks!