you are closing the socket when $sockbr evaluates to zero ($null), so you only get information up to the first time $sockbr is zero.

try this code instead:
Code:

on *:sockread:test:{ 
  if ($sockerr) { 
    echo -ati3 SOCKET: error $sockname > ip: $sock($sockname).ip $chr(124) $&
      port: $sock($sockname).port
    return 
  }
  :read
  sockread %test
  if (%test) { echo -ati3 $sockbr > %test }
  if ($sockbr) { goto read }
}

in this case, $sockbr is checked to see if anything was read and if so, does another read to look for extra data. if $sockbr is zero, it ends the procedure. note that information from sockets comes in packets, so there are multiple on sockread events for each download.

Last edited by Hammer; 15/03/03 01:31 PM.