Quote:
I have that before. I don't think that there's problem.
That's the problem.

Quote:
And if I use sockwrite -n $sockname $str($crlf, 2) it will return all lines without last one #EOF, but if I use
sockwrite -n $sockname $crlf $crlf it will result a bunch of HTML tags and data from file also.
if you are missing a line, it mean you're not reading correctly, and indeed, both your code and mine are missing the -f switch on /sockread.

Quote:
Is there a good explanation of using $crlf?

The use of $crlf is completely a specification of the HTTP protocol, read the protocol...

Code:
on *:sockread:download_*:{
if ($sock($sockname).mark) {
while ($sock($sockname).rq > 0) {
  sockread -f &download_file
  .bwrite $qt(filename.mrc) -1 -1 &download_file
}
}
else {
 var %a
 sockread %a
 if (%a == $null) sockmark $sockname 1
 }
}


@Tomao: the "/sockmark $sockname 0" isn't needed


#mircscripting @ irc.swiftirc.net == the best mIRC help channel