All pastes #351302 Raw Edit

Stuff

public text v1 · immutable
·published 2007-02-12 02:21 UTC
rendered paste body
alias myservers {
  var %op = 0, %halfop = 0, %voice = 0, %peons = 0, %total = 0, %chans = 0 
  var %b = 1
  inc %chans $chan(0)
  while (%b <= $chan(0)) { 
    if ($me isop $chan(%b)) { .inc %op | inc %total $nick($chan(%b),0) | inc %peons $nick($chan(%b),0,rh) | inc %b } 
    elseif ($me ishop $chan(%b)) { inc %halfop | inc %total $nick($chan(%b),0) | inc %peons $nick($chan(%b),0,rh) | inc %b } 
    elseif ($me isvoice $chan(%b)) { inc %voice | inc %total $nick($chan(%b),0) | inc %b } 
    else { inc %total $nick($chan(%b),0) | inc %b } 
  } 
  set %i 1
  var %tempserv
  while (%i <= $scon(0)) {
    %tempserv = %tempserv 15(» 7 $+ $scon(%i).$server 15«)
    inc %i
  }
  /msg $active 7[15Servers7] I am currently connected on $scon(0) $iif($scon(0) == 1,server,servers) %tempserv I control $+(%peons,/,%total) ( $+ $calc((%peons / %total)*100) $+ % $+ ) users accross those servers.
  /msg $active 7[15Power7] I am Op on $+(@,%op,/,%chans) $+ , I am HalfOP on $+(%,%halfop,/,%chans) $+ , I am Voice on $+(+,%voice,/,%chans)
}