Code:
on 1:sockread:DCC:{
  if ($sockerr > 0) { return }
  sockread %dcc.data
  if ($sockbr == 0) { return }
  set %file.bytesent $calc(%file.bytesent + $sockbr)
  echo -s %dcc.data 
  ;
  bunset &fbs.nbo
  bset &fbs.nbo 1 $int($calc(%file.bytesent / 16777216)) $int($calc(%file.bytesent / 65536 % 256)) $int($calc(%file.bytesent / 256 % 256)) $calc(%file.bytesent % 256)
  ; (^^ im sure those calculations can be optimized but im too lazy to do it)
  ;
  sockwrite -b $sockname 4 &fbs.nbo
}


Give that a whirl, and see what happens

NETWORK BYTE ORDER is Most significant byte first, unlike x86 which stores least significant byte first.

In my dcc protocol doc it says "The recipient should acknowledge each packet by transmitting the total number of bytes received as an unsigned, 4 byte integer in network byte order", you were sending the last bytes read count, and you were sending it as text.
With luck the above well fix it.