on *:SOCKREAD:dcc.*:{
if ($sockerr) { echo sockerror! | return }
sockread 4096 &dcc
while ($sockbr) {
bwrite %filename -1 -1 &dcc
sockread 4096 &dcc
}
;get number of received bytes
var %rcvd = $sock($sockname).rcvd
;$longip converts this from decimal to base 256
; (you could use some complicated $calc with a lot of % 256 but this takes less code)
;then replace the dots with spaces, put it in the binvar and send it
bset &rcvd 1 $replace($longip(%rcvd),.,$chr(32))
sockwrite $sockname &rcvd
}