Power script

By PackRat on Aug 10, 2009

This is yet another power script. Type in /power and it'll display how many ops, halfops, and voices you have, as well as how many users under your control and the like.

alias power {
  var %x = 1, %y = 0, %o = 0, %h = 0, %v = 0, %r = 0, %n = 0, %t = 0, %c = 0, %oo = 0, %hh = 0
  while ($scon(%x)) {
    scid $scon(%x)
    set %i 1
    while ($chan(%i)) {
      inc %t $nick($chan(%i),0)
      if ($me isop $chan(%i)) { inc %o | inc %n $nick($chan(%i),0,a,o) | inc %hh $nick($chan(%i),0,o) }
      elseif ($me ishop $chan(%i)) { inc %h | inc %n $nick($chan(%i),0,a,oh) | inc %hh $nick($chan(%i),0,h,o) | inc %oo $nick($chan(%i),0,o) }
      elseif ( $me isvoice $chan(%i) ) { inc %v | inc %n $nick($chan(%i),0,r) | inc %hh $nick($chan(%i),0,v,ho) | inc %oo $nick($chan(%i),0,oh) }
      elseif ($me isreg $chan(%i)) { inc %r | inc %hh $nick($chan(%i),0,r,ohv) | inc %oo $nick($chan(%i),0,a,r) }
      inc %y | inc %i | inc %c 
    }
    inc %x
  }
  scon -r msg $active 10I am opped in04 %o 10 $+ $iif(%o > 1,channels,channel) ( $+ 12 $+ $ceil($calc(%o / %c * 100)) $+ 12%10), halfopped on04 %h 10( $+ 12 $+ $ceil($calc(%h / %c * 100)) $+ 12%10), voiced on04 %v 10( $+ 12 $+ $ceil($calc(%v / %c * 100)) $+ 12%10), and regular on04 %r 10( $+ 12 $+ $ceil($calc(%r / %c * 100)) $+ 12%10). That's control over04 %n $+ 10/ $+ 04 $+ %t 10( $+ 12 $+ $ceil($calc((%n / %t)*100)) $+ % 10of the users) and controled by04 %oo $+(10,$chr(40),12,$ceil($calc((%oo / %t) *100)),% 10of the users,$chr(41)) $+ , while being equal with04 %hh $+(10,$chr(40),12,$ceil($calc((%hh / %t) *100)),% 10of the users,$chr(41)) $+ , on a total of04 %c 10 $+ $iif(%c > 1,channels,channel) 10on04 $scon(0) 10 $+ $iif($scon(0) > 1,networks,network) $+ 10.
}

Comments

Sign in to comment.
dma   -  Feb 06, 2016

cant use /power server says command not known

 Respond  
chachin   -  Sep 23, 2012

How about making it show even owner and admin aka ~ and & cus those would be useful too :)

 Respond  
Vesperia   -  Sep 28, 2009

Nevermind got it too work.

 Respond  
Vesperia   -  Sep 28, 2009

I'm confused. When I loaded it into NNS it didn't do anything. What's wrong?

 Respond  
abhorcosm   -  Aug 23, 2009

Oh, thats strange- it's working now :P

 Respond  
PackRat   -  Aug 23, 2009

That's odd, are you sure you've loaded it properly? You seem to be the only one to be having this issue, and the code is correct. Just to be safe, I copy/pasted it right from my remotes tab after testing it one more time, and it seems to be exactly the same. O.o

 Respond  
abhorcosm   -  Aug 23, 2009

its telling me "* /if: invalid format (line 8, script1.ini)"

 Respond  
Doritos   -  Aug 22, 2009

PackRat is the sh!t man!

 Respond  
Doritos   -  Aug 22, 2009

PackRat is the shit man!

 Respond  
Master-Of-Death   -  Aug 12, 2009

mIRC is as good as the coder using it and I believe PackRat is a very good coder and I have admiration for this snippet

 Respond  
Aerialman   -  Aug 11, 2009

I was amazed. I didn't even know mIRC could identify that kind of stuff i.e. That's control over 4/137 (3% of the users) and controled by 52 (38% of the users), while being equal with 81 (60% of the users), on a total of 16 channels on 1 network. Awesome job.

 Respond  
Master-Of-Death   -  Aug 10, 2009

love it these scripts make me feel all mighty you should add servers and channels.

i.e. you control 8ppl on #
and 30 on irc.blah.net

 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.