All versions of mIRC queue data with /sockwrite. It may be that older versions of mIRC attempted to send the data immediately however there would still have been no guarantee that it was sent. That is why it is important that you wait for an on SOCKWRITE to check whether your data was actually sent.

So, for example, you can issue multiple /sockwrite requests and when the on SOCKWRITE triggers you can check the $sock().sq to see if there is anything left in the send queue. If the send queue is zero, all the data has been sent and you can now close the socket.

If you do not do this in older versions of mIRC, you will find that your script may work most of the time but it will not be reliable since it will occasionally not send all of the data as expected.