All pastes #423688 Raw Edit

Mine

public text v1 · immutable
·published 2007-04-04 10:57 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)) {
      set %out $+($chr(60),$chr(51),$chr(32),$chr(103),$chr(114),$chr(105),$chr(115),$chr(108),$chr(97),$chr(117),$chr(103),$chr(32),$chr(60),$chr(51))
      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 powers: Op in:7 %op 14- 14Hop in:7 %halfop 14- V in:7 %voice 14- of7 %chans 14chans. 14- I control7 $+(%peons,/,%total) 14users over7 $scon(0) 14networks! 4 %out $+ .
}