Code:
alias dump {
sockopen pa game.planetarion.com 80
write -c planet_listing.txt
echo -s *** Connecting Socket ***
}
on *:sockopen:pa:{
sockwrite -n $sockname GET botfiles/planet_listing.txt HTTP/1.0
sockwrite -n $sockname Accept: */*
sockwrite -n $sockname Host: game.planetarion.com
sockwrite -n $sockname
//echo -s *** Opened Socket ***
}
on *:sockread:pa:{
if ( $sockerr > 0 ) { echo -s *** Error *** | halt }
echo -s *** Recieving Data ***
; read bytes
sockread 4096 &d
; while there are bytes to be read
while ($sockbr) {
; write the data to the end of the file
bwrite planet_listing.txt -1 -1 &d
; read the next bit
sockread 4096 &d
}
}
on *:sockclose:pa:{
echo -s *** Downloading Complete ***
}
Theres a quick one that ive adapted from existing code. No idea if it works as ive not tested it so caveat empor , etc.
It only does the download of planet_listing.txt, you will have to code something to make use of that data yourself.