Here it happens whenever I'm connected or not. The error is :
The instruction at "0x0042cc27" referenced memory at "0x01830120". The memory could not be "read".
I've gathered some other debug info when mIRC crashed randomly (ie without using the above script, so the "real" and "hard to catch" bug), always just after somebody disconnects from the dcc chat server, and the instruction EIP were either 0x0042c827 or 0x0042c82f. If it can help... (this is not very far from 0x0042cc27, so probably this is actually the same bug).
I've noticed that the random crashes happen with 6.15 and 6.16, where the script above crashes everything starting from 6.0 (note : you have to higher a bit the 20 limit to make 6.0 => 6.14 crash)