I think I may have found a bug with the $line() identifier in mIRC v6.16.
The following command works in almost every window in mIRC:
//echo -a $line($active,0)
That would return the number of lines in the active window.
If you try using that command in a DCC Chat window, you get the following error:
* /echo: insufficient parameters
I would say this is a bug...