All pastes #619073 Raw Edit

Something

public text v1 · immutable
·published 2007-07-14 12:55 UTC
rendered paste body
alias power {
  var %x = 1
  var %o = 0
  var %h = 0
  var %v = 0
  var %c = 0
  var %t = 0
  while (%x <= $chan(0)) {
    if ($me isop $chan(%x)) {
      inc %o
      inc %t $nick($chan(%x),0)
      inc %c $nick($chan(%x),0)
      inc %x
    }
    elseif ($me ishop $chan(%x)) {
      inc %h
      inc %t $nick($chan(%x),0)
      inc %c $calc($nick($chan(%x),0) - $nick($chan(%x),0,o))
      inc %x
    }
    elseif ($me isvoice $chan(%x)) {
      inc %v
      inc %t $nick($chan(%x),0)
      inc %x
    }
    elseif ($me isreg $chan(%x)) {
      inc %t $nick($chan(%x),0)
      inc %x
    }
  }
  msg $active I'm on ( $+ $chan(0) $+ ) channels i am opped on ( $+ %o $+ ) halfopped on ( $+ %h $+ ) and voiced on ( $+ %v $+ ) I can control ( $+ %c $+ / $+ %t $+ ) or ( $+ $round($calc(%c * 100 / %t),2) $+ % $+ ) of the people 
}