Powertrip
Platform: mIRC
Published Jul 13, 2009
Updated Nov 10, 2009
Just a simple little thinggy to show...:
amount of networks you are on,
amount of channels you are on,
total usermodes (~&!@%+) if any,
amount of users you have control over.
can probably be done a lot better, but that's for another time.
I've updated it a little bit, it shows a percentage too now, and fixed a bug so that it'll actually show a '0' when you do not have a certain mode anywhere.
alias powertrip {
var %pt.net.count 1
var %pt.net.total $scon(0)
var %pt.chan.count 1
while (%pt.net.count <= %pt.net.total) {
scid $scon(%pt.net.count)
var %tmp.chan.count 1
var %tmp.chan.total $comchan($me, 0)
while (%tmp.chan.count <= %tmp.chan.total) {
inc %pt.mode.count. [ $+ [ $modenum2($comchan($me, %tmp.chan.count), $me) ] ]
var %tmp.nick.total $nick($comchan($me, %tmp.chan.count), 0)
var %tmp.nick.chan $comchan($me, %tmp.chan.count)
var %tmp.nick.count 1
while (%tmp.nick.count <= %tmp.nick.total) {
if ($modenum2(%tmp.nick.chan, $me) > $modenum2(%tmp.nick.chan, %tmp.nick.count)) {
inc %pt.pwn.count
}
inc %pt.total.nicks
inc %tmp.nick.count
}
inc %tmp.chan.count
}
var %pt.chan.total $calc(%pt.chan.total + %tmp.chan.count)
inc %pt.net.count
}
var %x 1
while (%x <= 6) {
if (%pt.mode.count. [ $+ [ %x ] ] == $null) {
var %pt.mode.count. [ $+ [ %x ] ] 0
}
inc %x
}
scid -r
say I'm on $+(,%pt.chan.total,) channels, spread across $+(,$calc(%pt.net.count - 1),) networks. Powers: $+(,%pt.mode.count.6,) ~, $+(,%pt.mode.count.5,) &, $+(,%pt.mode.count.4,) @, $+(,%pt.mode.count.3,) $+($(%),$chr(44)) $+(,%pt.mode.count.2,) +. I'm more important than $+(,%pt.pwn.count,/,%pt.total.nicks,) $+($chr(40),,$round($calc((%pt.pwn.count / %pt.total.nicks) * 100), 2),,$(%),$chr(41)) lamers.
unset %pt.*
unset %tmp.*
}
alias -l modenum2 {
return $iif($left($nick($1, $2).pnick, 1) isin $prefix, $replacex($left($nick($1, $2).pnick, 1), ~, 6, !, 5, &, 5, @, 4, %, 3, +, 2), 1)
}