I'm sorry, but the first part of your post is based on a flawed understanding on how receiving data on sockets works. Simply put, mIRC always retrieves data from WinSock into a local per-socket buffer (the "receive queue", referred to by eg $sock().rq) first, and it is then copied to the binvar from there. As such, the size of the binvar need not be determined by the size of the substring that is being obtained from the socket.

Even then, that would not be a good excuse for the current behavior. The result of the current situation is that the script gets bytes that were not received on the socket. This is a bug, plain and simple. Not a major one (it looks like it's been there since at least 6.x and it seems that Wims is the first to have run into it), but a bug nonetheless.


Saturn, QuakeNet staff