Another update:
Just thought id fix up some things... Basically still the exact same script, just replaced some set's with var's and cleaned up a little.
UPDATE:
-Fixed bug causing it to not see other networks other than your first.
-Added an alias for the number of people you own, incase you want to use it in another script or something. $npower will return however many people you own.
-Cleaned it up a bit.
[5:56:51][iACTION!] * NIGathan owns 73 people across the 2 currently connected networks.
Unlike the wIRC power script, this one is actually ACCURATE. Sure the wIRC power script seems correct... Wrong, all it does is check if your an op in each chan and if so then you own EVERY person in it.
As I realized this tonight, I knew I had to do something about it. So I threw this script together. It will check whether you're owner, protected, op, halfop, or voice and checks that across every nick in the channel to see if your higher than they are and it returns the total number of nicks you outrank.
To install, simply add to remote.
Use: /power or $power
alias power {
var %a = 1, %b = 1, %c = 1, %mypow = 0, %ownage = 0
while ($scon(%a)) {
scid $scon(%a)
var %f = 1,%g = 1,%c = 1
if ($status != connected) { var %b 1 | inc %a | goto end }
var %kungpow $left($nick($chan(%b),$me).pnick,1)
if (%kungpow != $left($me,1)) { set %mypow $replace(%kungpow,$chr(126),5,$chr(38),4,$chr(64),3,$chr(37),2,$chr(43),1) }
else { set %mypow 0 }
while (%c <= $nick($chan(%b),0)) {
if ($left($nick($chan(%b),%c).pnick,1) != $left($nick($chan(%b),%c),1)) { var %d $replace($mid($nick($chan(%b),%c).pnick,1,1),$chr(126),5,$chr(38),4,$chr(64),3,$chr(37),2,$chr(43),1) }
else { set %d 0 }
if (%mypow > %d) { inc %ownage }
inc %c
}
inc %b
if (%b > $chan(0)) { inc %a | var %b 1 }
:end
}
scid -r
if (!$isid) me owns %ownage people across the $scon(0) currently connected $iif($scon(0) == 1,network.,networks.)
else return %ownage
}