All pastes #795298 Raw Edit

wut man wut wut

public text v1 · immutable
#795298 ·published 2007-11-23 23:52 UTC
rendered paste body
alias power { 
  var %i = 1  | var %op = 0 | var %hop = 0 | var %voice = 0 | var %reg = 0 | var %power.total = 0 | var %b = $chr(2)
  while ($chan(%i)) {
    if ($me isop $chan(%i)) {
      inc %op | var %ops = %ops $chan(%i) | var %power = $calc(%power + $nick($chan(%i),0)) | inc %power.total $nick($chan(%i),0,ohvr) | inc %i | continue
    }
    if ($me ishop $chan(%i)) {
      inc %hop | var %hops = %hops $chan(%i) | var %power = $calc(%power + $nick($chan(%i),0)) | inc %power.total $nick($chan(%i),0,hvr) | inc %i | continue
    }
    if ($me isvoice $chan(%i)) {
      inc %voice | var %voices = %voices $chan(%i) | var %power = $calc(%power + $nick($chan(%i),0)) | inc %power.total $nick($chan(%i),0,vr) | inc %i | continue
    }
    if ($me isreg $chan(%i)) {
      inc %reg | var %regs = %regs $chan(%i) | var %power = $calc(%power + $nick($chan(%i),0)) | inc %i | continue
    }
  }
  msg $active 4[4P14ower4]14 I am on4 $chan(0) 14channels. 4@14Op on4 %op 7%14halfop on4 %hop 12+14voice on4 %voice 14and Regular on4 %reg 14I can control:4 $+(%power.total,14/,4 %power) $round($calc((%power.total / %power) * 100),$chr(37)) or:4 $+($chr(91),%b,$chr(3),04,$str(¦,$floor($calc(%power.total / %power *10))),$chr(3),¦,$chr(3),14,$str(¦,$calc(10- $round($calc(%power.total / %power *10),0))),%b,$c2,4,$chr(93)) 14of the people.
}