All pastes #423676 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-04-04 10:42 UTC
rendered paste body
alias power {
  var %op = 0, %halfop = 0, %voice = 0, %peons = 0, %total = 0, %chans = 0
  var %a = 1
  while (%a <= $scon(0)) {
    .scon %a
    var %b = 1
    inc %chans $chan(0)
    while (%b <= $chan(0)) {
      if ($me isop $chan(%b)) { .inc %op | inc %total $nick($chan(%b),0) | inc %peons $nick($chan(%b),0,%) | inc %peons $calc( $nick($chan(%b),0) - $nick($chan(%b),0,@) - $nick($chan(%b),0,%) - $nick($chan(%b),0,r) ) | inc %peons $nick($chan(%b),0,r) | inc %b }
      elseif ($me ishop $chan(%b)) { inc %halfop | inc %total $nick($chan(%b),0) | inc %peons $calc( $nick($chan(%b),0) - $nick($chan(%b),0,@) - $nick($chan(%b),0,%) - $nick($chan(%b),0,r) ) | inc %peons $nick($chan(%b),0,r) | inc %b } 
      elseif ($me isvoice $chan(%b)) { inc %voice | inc %total $nick($chan(%b),0) | inc %b }
      else { inc %total $nick($chan(%b),0) | inc %b }
    }
    inc %a
  }
  .scon -r
  msg $chan 14My grislaug: Op in:7 %op 14- 14Hop in:7 %halfop 14- V in:7 %voice 14- of7 %chans 14chans. 14- 4<3<3I love grisen<3<37 $+(%peons,/,%total) 14users over7 $scon(0) 14networks! 
}