rendered paste bodyalias power {
var %y,%c,%z,%x = 0,%chn,%o,%cid = $activecid
while %x < $scon(0) {
inc %x
%c = 0
scon %x
inc %chn $chan(0)
while %c < $chan(0) {
inc %c
if $me isop $chan(%c) && $me ishop $chan(%c) {
inc %o
inc %y $nick($chan(%c),0) && $nick($chan(%c),h)
}
inc %z $nick($chan(%c),0)
}
}
%x = 0
while %x < $scon(0) { inc %x | .scon %x | if $window(status window).cid == %cid { %cid = %x } }
scon %cid
if $1 == -e || $active == status window || $left($active,1) == @ {
echo $color(info) -a $timestamp echo 14I have op in 4,01(00,01 $+ %o $+ 4/14 $+ %chn $+ 4,01) 14Channels and so the Power over 4,01(00,01 $+ %y $+ 4/14 $+ %z $+ 4,01) 14users on 4,01(00,01 $+ $scon(0) $+ 4,01) 14Network $+ $iif($scon(0) != 1,9s) 4(14 $+ $percent(%y,%z) $+ 4)
}
else { mes 4I have op in 4,01(00,01 $+ %o $+ 04,01/00,01 $+ %chn $+ 04,01) 04,01Channels and so the Power over 04,01(00,01 $+ %y $+ 04,01/00,01 $+ %z $+ 04,01) 4users on 4,01(00,01 $+ $scon(0) $+ 4,01) 4Network $+ $iif($scon(0) != 1,9s) 04,01(00,01 $+ $percent(%y,%z) $+ 04,01) }
}
alias percent { if $1 && $2 { return $round($calc($1 * 100 / $2),$iif($3,$3,1)) $+ % } }