I noticed that arbiter's power alias wasn't yet submitted here. So, I took the liberty of doing it. I find this to be a great script. Props to Arbiter/Mr.White on SwiftIRC for this.
Note I have no link to the site were he originally submitted it. I had the script for so long... I don't remember the url to the site and Arbiter is very hard to get hold to these days.
Usage:
/power - Displays channel power.
/power -s - Displays the networks you are currently connected to.
/power -u - Displays your Computer uptime and your mIRC uptime along with your lag and your active servers IP.
/power -a - Displays all 3 of the above.
Change the '14' and '04' in the c1 and c2 alias's to change the colors.
alias power {
if (!%status.ret) {
if (!$1) { set %status.all power }
elseif ($1 == -a) { set %status.all power -a }
elseif ($1 == -u) { set %status.all power -u }
elseif ($1 == -s) { set %status.all power -s }
.set %status.chan $active
.set %status.11 1
.set %status.snd $ticks
.raw ss'ping
}
else {
var %op = 0, %halfop = 0, %voice = 0, %peons = 0, %total = 0, %chans = 0, %reg = 0
var %i = $scon(0), %tempserv
while %i {
%tempserv = %tempserv $+($c2($chr(40)),$c1($scon(%i).$network),$c2($chr(41)),$c2($chr(44)))
scon %i
var %b = $chan(0)
inc %chans %b
while %b {
if ($me isop $chan(%b)) { inc %op | inc %total $nick($chan(%b),0) | inc %peons $nick($chan(%b),0,a) }
elseif ($me ishop $chan(%b)) { inc %halfop | inc %total $nick($chan(%b),0) | inc %peons $nick($chan(%b),0,a,oh) }
elseif ($me isvoice $chan(%b)) { inc %voice | inc %total $nick($chan(%b),0) }
elseif ($me isreg $chan(%b)) { inc %reg | inc %total $nick($chan(%b),0) }
else { inc %total $nick($chan(%b),0) }
dec %b
}
scon -r
dec %i
}
var %a = 1,%lag
while (%a <= $chan(0)) {
inc %a
}
%lag = $calc(%status.ret - %status.snd)
%lag = $iif(%lag < 1000,$+(%lag,ms),$+($calc(%lag / 1000),s))
if ($1 == -a) {
msg $active $+($c2([),$c1(Power),$c2(])) $c2(I am Op on) $+($c2(@),$c1(%op),$c2(/),$c1(%chans)) $+($c2($chr(40)),$c1($ceil($calc((%op / %chans)*100))),$c1(%),$c2($chr(41))) $+ $c2($chr(44) HelpOp on) $+($c2(%),$c1(%halfop),$c2(/),$c1(%chans)) $+($c2($chr(40)),$c1($ceil($calc((%halfop / %chans)*100))),$c1(%),$c2($chr(41))) $+ $c2($chr(44) Voice on) $+($c2(+),$c1(%voice),$c2(/),$c1(%chans)) $+($c2($chr(40)),$c1($ceil($calc((%voice / %chans)*100))),$c1(%),$c2($chr(41))) $+ $c2($chr(44) and Regular on) $+($c1(%reg),$c2(/),$c1(%chans)) $+($c2($chr(40)),$c1($ceil($calc((%reg / %chans)*100))),$c1(%),$c2($chr(41))) $+ $c2(. I control) $+($c1($bytes(%peons,bd)),$c2(/),$c1($bytes(%total,bd))) $c2($chr(40)) $+ $c1($ceil($calc((%peons / %total)*100))) $+ $c1(%) $+ $c2($chr(41)) $c2(users.))
msg $active $+($c2([),$c1(Networks),$c2(])) $c2(I am currently connected on) $c1($scon(0)) $c2($iif($scon(0) == 1,network,networks)) $left(%tempserv,-2)
msg $active $+($c2([),$c1(Uptime),$c2(])) $c2(System Uptime:) $c1($uptime(system,1)) $c2(-) $c2(mIRC uptime:) $c1($uptime(mirc,1)) $c2(-) $c1($server) $+($c2($chr(40)),$c1(SIP),$c2(:),$c1($serverip),$c2($chr(41))) $c2(connection time:) $c1($uptime(server,1)) $c2(- Lag:) $c1(%lag)
}
elseif ($1 == -u) { msg $active $+($c2([),$c1(Uptime),$c2(])) $c2(System Uptime:) $c1($uptime(system,1)) $c2(-) $c2(mIRC uptime:) $c1($uptime(mirc,1)) $c2(-) $c1($server) $+($c2($chr(40)),$c1(SIP),$c2(:),$c1($serverip),$c2($chr(41))) $c2(connection time:) $c1($uptime(server,1)) $c2(- Lag:) $c1(%lag) }
elseif ($1 == -s) { msg $active $+($c2([),$c1(Networks),$c2(])) $c2(I am currently connected on) $c1($scon(0)) $c2($iif($scon(0) == 1,network,networks)) $left(%tempserv,-2) }
elseif (!$1) { msg $active $+($c2([),$c1(Power),$c2(])) $c2(I am Op on) $+($c2(@),$c1(%op),$c2(/),$c1(%chans)) $+($c2($chr(40)),$c1($ceil($calc((%op / %chans)*100))),$c1(%),$c2($chr(41))) $+ $c2($chr(44) HelpOp on) $+($c2(%),$c1(%halfop),$c2(/),$c1(%chans)) $+($c2($chr(40)),$c1($ceil($calc((%halfop / %chans)*100))),$c1(%),$c2($chr(41))) $+ $c2($chr(44) Voice on) $+($c2(+),$c1(%voice),$c2(/),$c1(%chans)) $+($c2($chr(40)),$c1($ceil($calc((%voice / %chans)*100))),$c1(%),$c2($chr(41))) $+ $c2($chr(44) and Regular on) $+($c1(%reg),$c2(/),$c1(%chans)) $+($c2($chr(40)),$c1($ceil($calc((%reg / %chans)*100))),$c1(%),$c2($chr(41))) $+ $c2(. I control) $+($c1($bytes(%peons,bd)),$c2(/),$c1($bytes(%total,bd))) $c2($chr(40)) $+ $c1($ceil($calc((%peons / %total)*100))) $+ $c1(%) $+ $c2($chr(41)) $c2(users.)) }
.unset %status.*
}
}
raw 421:*: {
if (%status.11) {
.set %status.ret $ticks
%status.all
}
halt
}
alias c1 { return $+($chr(3),14,$1-,$chr(3)) }
alias c2 { return $+($chr(3),04,$1-,$chr(3)) }
Lol, I love how I found this when I was trying to find an old version of my highlight script on pastebin. I wrote this so long ago <_< I belive when I gave it to you, Supermetalfreak, I posted it on pastebin. That post is probably deleted by now. Oh well, thanks for posting this and giving me credit. I acctually had some help on it on hawkee forums a while back.