I cant get it to work..
I have this now:
Code:
 
on *:sockread:download:{
  sockread %size
  if (Content-Length: * iswm %size) { set %file.size $gettok(%size,2,32) }
  did -a update.now 2 %file.size
  :loop
  if ($sockerr > 0) return
  sockread &temp
  if (!$sockbr) return
  bwrite %version $+ .exe -1 &temp
  did -ra update.now 4 $bytes($sock(download).rcvd,m3).suf
  did -ra update.now 6 $dur($sock(download).to)
  goto loop
}
 


What is wrong here? Thanks!