Power Script

By Jonesy44 on Dec 09, 2008

My version of a power script, technically it's not accurate since you don't have power over ~ if you are @ but hey! it gets the idea accross

/power
alias power {
  if ($chan) {
    var %cid = $cid
    var %x.servers = 1, %t.chans = 0, %t.power = 0, %t.max = 0
    while (%x.servers <= $scon(0)) {
      scid $scon(%x.servers)
      var %x.chans = 1
      inc %t.chans $chan(0)
      while (%x.chans <= $chan(0)) {   
        inc %t.max $nick($chan(%x.chans),0)
        if ($me isop $chan(%x.chans)) {
          inc %t.power $nick($chan(%x.chans),0)
        }
        inc %x.chans
      }
      inc %x.servers
    }
    scid %cid
    describe $active is on [4 %t.chans ] channels, over [4 $scon(0) ] server $+ $iif($scon > 1,s,) $+ , and have power over [4 %t.power /4 %t.max ( $+ $calc((%t.power / %t.max) * 100) $+ 4% $+ ) ]
  }
  else {
    echo -a You must be in an active channel
  }
}

Comments

Sign in to comment.
Jonesy44   -  Dec 11, 2008

Nope i didn't! But now i do, i'll edit i a bit :P

 Respond  
Gummo   -  Dec 10, 2008

Did you know that /scid -r resets the connection to the original, removing the need for that $cid variable?

 Respond  
NIGathan   -  Dec 10, 2008

It does in a +m channel ;P

 Respond  
Jonesy44   -  Dec 10, 2008

Not too hard to do :P but voice doesn't really give you "power" :s

 Respond  
NIGathan   -  Dec 09, 2008

Heh, my script here: http://www.hawkee.com/snippet/4791/ checks every mode including voice. It also works as an identifier. Dont know why its only got a 2 :/

 Respond  
KronicDreamer   -  Dec 09, 2008

only thing i dont like is it dont count +q +a or +h on ircx servers :/

good code though

 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.