All pastes #478728 Raw Edit

Someone

public text v1 · immutable
·published 2007-05-09 10:33 UTC
rendered paste body
alias statsme {
  var %chanop = 0, %peon = 0, %a = 1, %y = 0, %total = 0, %chanhop = 0, %chanvoice = 0, %pm = 0
  while $scon(%a) {
    var %b = $ifmatch,%f = 1,%g = 1 | scid %b | var %x = 1
    var %pm $calc(%pm + $query(0))
    while $chan(%x) {
      if $me isop $chan(%x) { 
        var %peon = $calc( %peon + $nick($chan(%x),0) ) 
        inc %chanop 
      } 
      if $me ishop $chan(%x) { 
        var %peon = $calc( %peon + $nick($chan(%x),0) ) 
        inc %chanhop 
      } 
      if $me isvoice $chan(%x) { 
        inc %chanvoice  
      } 
      var %total $calc(%total + $nick($chan(%x),0))
      inc %x 
      inc %y
    }
    inc %a
  }
  scid -r | say I am currently on $scid(0) networks, with ops in %chanop $+ , half-op in %chanhop $+ , and voice in %chanvoice of the %y chans. I own %peon $+ / $+ %total people ( $+ $calc( %peon / %total * 100 ) $+ $chr(37) $+ ).  I also have %pm private messages open.
}