[A] - Channel Power (V1.0B#2004)

By Advanced on Oct 05, 2004

This alias calculates your total channel power and messages it to your current active channel when you use the /power command. Channel power is calculated by the total number of people the you have control over (eg: Can ban or kick). * For further help join #Advanced on IRC.AustNet.Org (paagrio.at.eu.austnet.org or sg.austnet.org)

alias power {
  unset %power.*
  %power.n = 0
  while (%power.n < $chan(0)) {
    inc %power.n
    inc %power.people $nick($chan(%power.n),0)
    if ($me isop $chan(%power.n)) { 
      inc %power.chan 
      %power.ppl = $calc(%power.ppl + $nick($chan(%power.n),0))
    }
  }
  %power.ppl = $calc(%power.ppl - 2)
  %power.people = $calc(%power.people - 2)
  msg $active Operator status in %power.chan out of $chan(0) Channels ( $+ $round($calc((%power.chan / $chan(0)) * 100),2) $+ $chr(37) $+ )
  msg $active Channel control over %power.ppl out of %power.people people ( $+ $round($calc((%power.ppl / %power.people) * 100),1) $+ $chr(37) $+ )
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.