mIRC Home    About    Download    Register    News    Help

Print Thread
#22466 05/05/03 11:39 AM
Joined: Dec 2002
Posts: 196
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Dec 2002
Posts: 196
Hi i use a socket to check for updates on my website, but when I notice when i use /echo -a %temp (after sockread %temp of course), it always show an error for the last line and not show it...

Whats the problem with it?


trenzterra
AustNet #trenzterra and #w
Head Scripter @ http://trenzterra.uni.cc
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Try using sockread -f Temp

Joined: Dec 2002
Posts: 196
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Dec 2002
Posts: 196
it will still not show anything although the error is gone. whats wrong


trenzterra
AustNet #trenzterra and #w
Head Scripter @ http://trenzterra.uni.cc
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Perhaps it's an empty line (containing only CRLF) Are you positive the last line should contain data?

Joined: Dec 2002
Posts: 196
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Dec 2002
Posts: 196
well it has a fullstop on the last line.

and on all other pages i tried it doesn't work too (which has </html> on the last line)


trenzterra
AustNet #trenzterra and #w
Head Scripter @ http://trenzterra.uni.cc
Joined: Dec 2002
Posts: 44
P
Ameglian cow
Offline
Ameglian cow
P
Joined: Dec 2002
Posts: 44
Is your site retuning a CRLF after the line in question?

mIRC splits texts using this as the toekn delimeter, without it, it doesn't know the line is complete.


Suck it, lick it, milk it then put it away.
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Interesting. If you haven't yet found a solution, please post your code here in addition to the website address, so we can reproduce the bug and see what's wrong.

Joined: Dec 2002
Posts: 196
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Dec 2002
Posts: 196
on *:sockopen:mirc:{
sockwrite -n $sockname GET /scriptupdate/versions.txt HTTP/1.1
sockwrite -n $sockname Host: trenzterraz.sourceforge.net $+ $str($crlf ,2)

sockwrite -n $sockname Connection: Keep-Alive

}

on *:sockread:mirc:{
sockread -f %temp
echo -a %temp
}


trenzterra
AustNet #trenzterra and #w
Head Scripter @ http://trenzterra.uni.cc
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Put an empty line after the line with the "." on its own.

e.g.
.
text text text
text text text
.
<empty line>

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Bug in -f?

Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Seems like it, yes.

Joined: Dec 2002
Posts: 196
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Dec 2002
Posts: 196
that solves it, but not all html pages on the internet will change that just for one application called mIRC.

it would be better if mIRC 'fixed' that?


trenzterra
AustNet #trenzterra and #w
Head Scripter @ http://trenzterra.uni.cc

Link Copied to Clipboard