bind pub - `ops pub:ops
proc pub:ops { nick host hand channel args } {
set test [chanlist $channel]
set ops($channel) 0
for { set number 0 } { $number < [llength $test] } { incr number } {
if {[isop [lindex $test $number] $channel]} {
incr ops($channel)
}
}
#line added
set voice($channel) 0
for { set number 0 } { $number < [llength $test] } { incr number } {
if {[isvoice [lindex $test $number] $channel]} {
incr voice($channel)
}
}
#end of line
set operators($channel) 0
foreach nick [userlist o] {
if {[onchan [hand2nick $nick] $channel]} {
incr operators($channel)
}
}
puthelp "PRIVMSG $channel :There are currently $ops($channel) people opped and\
$operators($channel) operators in $channel."
}
return 0
}
bind pub - `power pub:power
proc pub:power { nick host hand channel args } {
set test [chanlist $channel]
# The channels bot is in
set reg($channel) 0
for { set number 0 } { $number < [llength $test] } { incr number } {
if {[botisin [lindex $test $number] $channel]} {
incr reg($channel)
}
}
# The channels bot is op
set ops($channel) 0
for { set number 0 } { $number < [llength $test] } { incr number } {
if {[botisop [lindex $test $number] $channel]} {
incr ops($channel)
}
}
# The number of users are in chan with bot
set usera($channel) 0
for { set number 0 } { $number < [llength $test] } { incr number } {
if {[nickisin [lindex $test $number] $channel]} {
incr usera($channel)
}
}
# The number of users are in chan with bot with no op
set usern($channel) 0
for { set number 0 } { $number < [llength $test] } { incr number } {
if {![isop $nick $channel] } {
incr usern($channel)
}
}
puhelp "PRIVMSG $channel :I'm oped in $ops($channel) channels out of $reg($channel), \
and can fool around with $usern($channel) of $usera($channel)
}
return 0
}
}
Could this work? i was trying to make it, so i can user "expr" for calculations, but i had no idea how to put it in there, but i took a wild guess.