Power Code

By Romeo on Aug 25, 2005

Type /power and put in remotes

alias power {
  set %Power1 0
  set %Power2 $comchan($me,0)
  set %opchans 0
  set %halfopchans 0
  set %voicechans 0
  set %total $comchan($me,0)
  goto start
  :start
  while (%Power1 < %Power2) {
    inc %Power1 1
    if ($comchan($me,%Power1).op == $true) { inc %opchans 1 | goto start }
    if ($comchan($me,%Power1).help == $true) { inc %halfopchans 1 | goto start }
    if ($comchan($me,%Power1).voice == $true) { inc %voicechans 1 | goto start }
  }
  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 8,1<15I0>12 am op in %opchans Channels! 8,1<15H0>13alfop in %halfopchans channels! 8,1<15V0>7oiced in %voicechans channels! 8,1<15C0>4hannel control over %power.ppl out of %power.people people ( $+ $round($calc((%power.ppl / %power.people) * 100),1) $+ $chr(37) $+ ) $+ ! 8,1<15O0>8perator status in %power.chan out of $chan(0) Channels ( $+ $round($calc((%power.chan / $chan(0)) * 100),2) $+ $chr(37) $+ ) $+ 
  unset %opchans |  unset %halfopchans |  unset %voicechans |  unset %Power1 |  unset %Power2
}

Comments

Sign in to comment.
supergeo   -  Aug 25, 2005

set %opchans 0
set %halfopchans 0
set %voicechans 0
set %Power1 0

All of the above should be deleted. It does nothing. Also, like Yoinx said, the goto\'s do nothing also.

 Respond  
supergeo   -  Aug 25, 2005

unset %Power1 | unset %Power2

You can change that to unset %Power*

 Respond  
Yoinx   -  Aug 25, 2005

you dont need the goto start or :start

 Respond  
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.