All pastes #124218 Raw Edit

lol

public text v1 · immutable
·published 2006-08-09 22:06 UTC
rendered paste body
alias power {
  var %p 1 | var %totalchannels 0 | var %peons 0 | var %opchans 0 | var %totalpeons 0
  while $scon(%p) {
    var %b = $ifmatch,%f = 1,%g = 1
    scid %b
    var %x = 1
    while $chan(%x) {
      var %totalpeons = $calc(%totalpeons + $nick($chan(%x),0))
      if ($me isop $chan(%x) || $me ishop $chan(%x)) { var %peons = $calc(%peons + $nick($chan(%x),0)) | inc %opchans }
      inc %x
      inc %totalchannels
    }
    inc %p
  }
  scid -r
  say $iif(c isin $chan(#).mode,$strip(I'm opped in ( $+ %opchans $+ / $+ %totalchannels $+ ) - ( $+ $round($calc((%opchans / %totalchannels) * 100),0) $+ % $+ ) channels. I'm on ( $+ $scid(0) $+ ) server(s). I have power over ( $+ %peons $+ / $+ %totalpeons $+ ) - ( $+ $round($calc((%peons / %totalpeons) * 100),0) $+ % $+ ) people.,c),I'm opped in ( $+ %opchans $+ / $+ %totalchannels $+ ) - (I'm opped in ( $+ %opchans $+ / $+ %totalchannels $+ ) - ( $+ $round($calc((%opchans / %totalchannels) * 100),0) $+ % $+ ) channels. I'm on ( $+ $scid(0) $+ ) network(s). I have power over ( $+ %peons $+ / $+ %totalpeons $+ ) - ( $+ $round($calc((%peons / %totalpeons) * 100),0) $+ % $+ ) people.))}