rendered paste bodystatus {
var %x 1
while (%x <= $chan(0)) {
if ($nick($chan(%x),$me,o)) { inc %sto | var %stpu = $calc(%stpu + $nick($chan(%x),0)) | if ($chan(%x) != #mscr) var %stchans = %stchans $chr(3) $+ 4@ $+ $v1 }
if ($nick($chan(%x),$me,h)) { inc %sth | var %stpu = $calc(%stpu + ($nick($chan(%x),0) - $nick($chan(%x),0,o) - $nick($chan(%x),0,h))) | if ($chan(%x) != #mscr) var %stchans = %stchans $chr(3) $+ 7% $+ $v1 }
if ($nick($chan(%x),$me,v)) { inc %stv | if ($chan(%x) != #mscr) var %stchans = %stchans $chr(3) $+ 2+ $+ $v1 }
if ($me isreg $chan(%x)) if ($chan(%x) != #mscr) var %stchans = %stchans $chr(3) $+ 10 $+ $v1
var %stusers = $calc(%stusers + $nick($chan(%x),0))
inc %x
}
var %x 1
while (%x <= $script(0)) {
var %stsize $calc(%stsize + $file($script(%x)).size)
var %stlines $calc(%stlines + $lines($script(%x)))
inc %x
}
if (!$and($calc(16 - $gettok($date,2,47)),1)) var %stbday = $calc((((16 - $gettok($date,2,47)) / 2) * 30) + (((16 - $gettok($date,2,47)) / 2) * 31))
else var %stbday = $calc((((((16 - $gettok($date,2,47)) + 1) / 2) * 30) + ((((16 - $gettok($date,2,47)) + 1) / 2) * 30)) - 30)
$iif($1-,$v1,msg $chan) $+ $([,0) Status $(],0) I am Op in $iif(%sto,$v1,0) $+ , HalfOp in $iif(%sth,$v1,0) $+ , Voice in $iif(%stv,$v1,0) and Regular in $calc($chan(0) - (%sto + %sth + %stv)) $+ . I have power over $($+(%stpu,/,%stusers),2) users, which is $round($calc((100 / %stusers) * %stpu),2) $+ % $+ .
unset %st*
}