TheWhistler, this snippet is incompatible with mIRC version BELOW 6.17. Maybe a check will help:
if ($version >= 6.17) { ..... } else { ; please upgrade your mIRC version }