mIRC does not support next-line braces on if-statements.
Example:
if ($something == something)
{
; This will not work as expected
}
if ($something == something) {
; this will work properly
}
Other than that, everything appears correct.
-genius_at_work