It doesn't handle msg wrong. Delete your script and you will see that mIRC is quite capable of parsing incoming text that contains multiple spaces. The fact is, mIRC _scripting_ (which is not mentioned in RFC1459) is what lacks the ability to do what you suggest.