All pastes #974934 Raw Edit

Stuff

public text v1 · immutable
·published 2008-04-07 04:42 UTC
rendered paste body
alias power1 {
  var %x = 1, %i = 1
  var %Ocount = 0, %Hcount = 0, %Vcount = 0, %chancount = 0, %infcount = 0, %usercount = 0
  while (%i <= $scon(0)) {
    scon %i {
      while ($chan(%x) <= $chan(0)) {
        if ($me isop $chan(%x)) { inc %Ocount | inc %Ousercount = $nick($chan(%x),0) }
        elseif ($me ishop $chan(%x)) { inc %Hcount | inc %Husercount = $nick($chan(%x),0) }
        elseif ($me isvoice $chan(%x)) { inc %Vcount | inc %Vusercount = $nick($chan(%x),0) }
        if ($me isop $chan(%x)) || ($me ishop $chan(%x)) inc %infcount $nick($chan(%x),0,$iif($me isop $chan(%x),rvh,rv)))       
        inc %usercount $nick($chan(%x),0)
        inc %Chancount
        inc %x
      }
    }
    inc %i
    var %x = 1
  }
  scid -r
  msg $active 1I have: 4Op in %ocount $+ , 7Halfop in %hcount $+ , 12Voice in %Vcount $+ , 1and 10regular in $calc(%chancount - %Ocount - %Hcount - %Vcount) 1out of %chancount channels over $scid(0) networks. I control4 $+(%infcount,/,%usercount) 1( $+ $ceil($calc((%infcount / %usercount)*100)) $+ % $+ )

}