alias modtest {
sockclose modtest
sockopen modtest www.weebl00.nl 80
}
on *:sockopen:modtest:{
sockwrite -n $sockname GET /rixxon/modules/modules.txt HTTP/1.1
sockwrite -n $sockname Host: www.weebl00.nl
sockwrite -n $sockname
}
on *:sockread:modtest:{
set -l %read
sockread %read
echo -s . %read
}
Yes, the code is not perfect, but it is just an example of what I think is a bug. Test the script (/modtest) and it echos the HTTP headers and the first line of the text document.
Not the last line. First I had only one line and then I got only the headers.
I solved the problem by reading to a &binvar and bwrite it to a file, and read it on sockclose.
I think maybe mIRC isn't reading the line breaks correctly when reading to a %variable. /sockread -f doesn't solve the problem, though...
Or is something wrong with my code?