$active should be used when you want to refer to the $active window... What is your point ?
My point was about $chan() returning a value for a window that in't a channel, but in fact (and in general in mIRC) it takes any invalid parameter as 0.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel