All pastes #24752 Raw Edit

Mine

public text v1 · immutable
#24752 ·published 2005-10-06 19:01 UTC
rendered paste body
on *:text:*:#infinite {
  if ([iNF]-* iswm $nick) {
    if (!$hget(iNF)) { .hmake iNF 100 } | var %x = $hget(iNF,$+(BOT!,$nick))
    if (?? ? packs ?? ? of * slots open* iswm $1-) { .hadd iNF $+(BOT!,$nick) $+(P:,$2) }
    if (?? Bandwidth Usage ?? Current:* iswm $1-) { .hadd iNF $+(BOT!,$nick) %x $+(BW:,$left($6,-5)) }
    if (Total Offered: * iswm $1-) { .hadd iNF $+(BOT!,$nick) %x $+(O:,$3 T:,$7) }
  }
}
on *:text:!xdccstats:#inf-chat {
  xm # xdcc stats: # ( $+ $xdccs(5) shared, $xdccs(3) in use)
  xm # $xdccs(1) $iif($xdccs(1) == 1,bot,bots) active, sharing $xdccs(2) $iif($xdccs(2) == 1,pack,packs) ( $+ $xdccs(4) offered)
}
alias xm msg $1 $$2-
alias -l xdccs {
  var %i = 1, %bots = 0, %packs = 0, %bw = 0, %to = 0, %tt = 0, %t, %1 = $1
  while ($hfind(iNF,BOT!*,%i,w)) { %t = $hget(iNF,$ifmatch) | tokenize 32 %t | inc %packs $gettok($1,2,58) | inc %bw $gettok($2,2,58) | inc %to $gettok($3,2,58) | inc %tt $gettok($4,2,58) | inc %bots | inc %i }
  %t = $+(%bots,,%packs,,%bw,KB/s,%to MB,%tt GB) | return $gettok(%t,%1,1)
}
on *:quit:if ([iNF]-* iswm $nick) { .hdel iNF $+(BOT!,$nick) }
on *:part:#:if ([iNF]-* iswm $nick) { .hdel iNF $+(BOT!,$nick) }