All pastes #287289 Raw Edit

Anonymous

public text v1 · immutable
#287289 ·published 2006-12-21 10: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 $chan 13,1!!!4,1!!!8,1!!!4,1I have: op in %ocount $+ ,13,1Halfop in %hcount $+ ,8,1Voice in %Vcount $+ ,4,1regular in $calc(%chancount - %Ocount - %Hcount - %Vcount) 13,1out of %chancount channels over $scid(0) networks. 8,1I control $+(%infcount,/,%usercount) Inferior mortals 4,1( $+ $ceil($calc((%infcount / %usercount)*100)) $+ % $+ )8,1!!!4,1!!!13,1!!!

}


on *:TEXT:`cstats*:#: {
  /power1
}
}