All pastes #545608 Raw Edit

Something

public text v1 · immutable
·published 2007-06-06 20:15 UTC
rendered paste body
alias data { 
  var %cid = $cid
  var %x = 1
  set %u 0
  while (%x <= $scon(0)) {
    var %y = 1
    scon %x
    while (%y <= $chan(0)) {
      set %u $calc(%u + $nick($chan(%y),0))
      if ($me isop $chan(%y)) {
        inc %o 
        set %po $calc(%po + $nick($chan(%y),0))
      }
      if ($me ishop $chan(%y)) { 
        inc %h 
        var %f = 1
        while (%f <= $nick($chan(%y),0)) {
          if (($nick($chan(%y),%f) isreg $chan) || ($nick($chan(%y),%f) isvoice $chan)) {
            inc %po
          }
          inc %f
        }
      }
      if ($me isvoice $chan(%y)) { 
        inc %v 
        var %f = 1
        while (%f <= $nick($chan(%y),0)) {
          if ($nick($chan(%y),%f) isreg $chan) {
            inc %po
          }
          inc %f
        }
      }
      elseif ($me isreg $chan(%y)) {  inc %r }
      inc %y
      set %users 
    }
    set %c $calc(%c + $chan(0))
    inc %x
  }
  scid %cid
  msg $active 14I am currently on 07 $+ %c 14channels over 07 $+ $calc(%x -1) 14networks. I am an op on 07 $+ %o $+ 14, halfop on 07 $+ %h $+ 14, voiced on 07 $+ %v $+ 14, and a regular user on 07 $+ %r $+ 14. I have power over 07 $+ %po $+ 14/07 $+ %u $+ 14 (07 $+ $round($calc((%po / %u) *100),0) $+ % $+ 14) users.
  unset %u
  unset %v  
  unset %o
  unset %po
  unset %r
  unset %h
  unset %c
}