I'm guessing the original poster was thinking more along the lines of having On NICK and On QUIT trigger once per every channel you and $nick share.

This of course would have a problem of triggering the event multiple times for non-channel related events, so something would have to be added perhaps to identify how the event is going to be used. I'm not saying I support this idea, but this is one way I'd go about it if I were Khaled.

On *:NICK: <-- This triggers once and only once per nick change.

On *:NICK:#: <-- This triggers $comchan($nick,0) times, once for every channel you share.

On *:NICK:#mIRC,#irchelp,#helpdesk: <-- triggers 1 to 3 times, depending on how many of these chans he's on.

So basically, if no # event parameter is present, it works like it currently does. If a # event parameter is present, it triggers for all relative channels and populates the $chan identifier each time around.

The same can be done for QUIT too.
On *:QUIT:#mIRC: <-- Triggers only if $nick is in #mIRC, then populates $chan as necessary.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!