I beleive this is a mIRC bug, rather than your script, but I'm not very sure if it was fixed..