I had some issues when running this script on mIRC 7.1 - upgraded to 7.19 and worked like a charm.
Thanks for the help Thelmrac