In some cases (probably rare) mIRC doesn't actually re-trigger the on sockread event when it should:
alias tests {
sockclose test
sockopen test www.youtube.com 80
}
on *:sockopen:test:{
sockwrite -n test GET /results?search_query=madonna HTTP/1.0
sockwrite -n test Host: www.youtube.com
sockwrite -n test
}
on *:sockread:test:{
var %test
;echo -a $sockerr $sock(test).rq
sockread -f %test
echo -a > %test
;sockread -f %test
;echo -a > %test
}
on *:sockclose:test:echo 4 -a CLOSED
The end of the source code of
that page is actually:
if (window.yt.timing) {yt.timing.tick("js_foot");} </script>
<div id="debug">
</div>
</body>
</html>
But using the above code and /tests, you actually get this as the last line:
if (window.yt.timing) {yt.timing.tick("js_foot");} </script>
I left the comment so you can easily debug, if you use the second /sockread, you correctly get the last line. If you check $sock().rq, it returns the correct value.