i once wrote a power script with colors, and made an option for users to do !power.
over time i found this to be a little annoying when others would start typing !power over and over.
so i did some modification to it. where you see BOT-OWNER replace it with your own nick so that your bot only responds to you and you alone on its power stats.
here i give you two choices:
1 with color
1 without color
just copy the one you want and you should be good to go.
(Thanks RusselB for helping me tweak this out a bit)
Bot Stats With Color:
alias bot.stats {
var %a = 1, %b = $scon(0)
var %networks = network $+ $iif(%b > 1,s), %chan = channel
while %a <= %b {
.scon %a
var %c = 1, %d = $chan(0)
inc %chans %d
if %d > 1 || %chan == channels {
%chan = channels
}
%chan = $remove(%chan,$chr(32))
while %c <= %d {
inc %uzers $iif($me ison $chan(%c),$nick($chan(%c),0,a,o),$iif($me ishop $chan(%c),$nick($chan(%c),0,a,oh),$nick($chan(%c),0,r)))
inc %Op $iif($me isop $chan(%c),1,0)
inc %hop $iif($me ishop $chan(%c),1,0)
inc %Voice $iif($me isvoice $chan(%c),1,0)
inc %c
}
inc %a
}
scon -r
msg %powerchan 12C10onnected 12H10ere 12V10ia15: 14<04 $+ $server $+ 14>15. 12I H10ave15: 14<07 $+(%op, $+ 15/06 $+ ,%chans) 14> 12O10ps15, 14<07 $+(%hop, $+ 15/06 $+ ,%chans) 14> 12H10elp14-12O10ps 12a10nd 14<07 $+(%voice, $+ 15/06 $+ ,%chans) 14> 12V10oices15. 12I O10wn 14<04 %uzers 14> 12u10sers15.
unset %Op
unset %hop
unset %voice
unset %chans
unset %uzers
}
on *:TEXT:!BotStats:#: {
if ($nick == BOT-OWNER) {
set %powerchan $chan | bot.stats
}
}
Bot Stats Without Color:
alias bot.stats {
var %a = 1, %b = $scon(0)
var %networks = network $+ $iif(%b > 1,s), %chan = channel
while %a <= %b {
.scon %a
var %c = 1, %d = $chan(0)
inc %chans %d
if %d > 1 || %chan == channels {
%chan = channels
}
%chan = $remove(%chan,$chr(32))
while %c <= %d {
inc %uzers $iif($me ison $chan(%c),$nick($chan(%c),0,a,o),$iif($me ishop $chan(%c),$nick($chan(%c),0,a,oh),$nick($chan(%c),0,r)))
inc %Op $iif($me isop $chan(%c),1,0)
inc %hop $iif($me ishop $chan(%c),1,0)
inc %Voice $iif($me isvoice $chan(%c),1,0)
inc %c
}
inc %a
}
scon -r
msg %powerchan Connected Here Via: 14<04 $+ $server $+ 14> I Have: < $+(%op, $+ / $+ ,%chans) > Ops, < $+(%hop, $+ / $+ ,%chans) > Help-Ops and < $+(%voice, $+ / $+ ,%chans) > Voices. I Own < %uzers > users.
unset %Op
unset %hop
unset %voice
unset %chans
unset %uzers
}
on *:TEXT:!BotStats:#: {
if ($nick == BOT-OWNER) {
set %powerchan $chan | bot.stats
}
}