rendered paste bodyalias power {
var %chanop = 0, %peon = 0, %a = 1, %y = 0, %total = 0, %chanhop = 0, %chanvoice = 0
while $scon(%a) {
var %b = $ifmatch,%f = 1,%g = 1 | scid %b | var %x = 1
while $chan(%x) {
if $me isop $chan(%x) {
var %peon = $calc( %peon + $nick($chan(%x),0) )
inc %chanop
}
if $me ishop $chan(%x) {
var %peon = $calc( %peon + $nick($chan(%x),0) )
inc %chanhop
}
if $me isvoice $chan(%x) {
inc %chanvoice
}
var %total $calc(%total + $nick($chan(%x),0))
inc %x
inc %y
}
inc %a
}
scid -r | say I am currently on $scid(0) networks, with ops in %chanop $+ , half-op in %chanhop $+ , and voice in %chanvoice of the %y chans. I own %peon $+ / $+ %total people ( $+ $calc( %peon / %total * 100 ) $+ $chr(37) $+ ).
}