Here it is
Code: Select all
namespace eval status {
namespace eval variable {
variable trigger ".status"
}
bind pub -|- $::status::variable::trigger [namespace current]::public
proc public {nickname hostname handle channel text} {
set operator 0
set voice 0
set regular 0
set active 0
set inactive 0
set users 0
foreach c [channels] {
if {[channel get $c inactive]} { incr inactive } else { incr active }
incr users [llength [chanlist $c]]
if {[botisop $c]} {
incr operator
} elseif {[botisvoice $c]} {
incr voice
} else {
incr regular
}
}
putserv "PRIVMSG $channel :Channels Count: ([llength [channels]]/20) channel(s). Im currently on [llength [channels]] of these channels. Statistics (Active on $active - Inactive on $inactive - Operator on $operator - Voice on $voice, Regular on $regular - Total user count of all channels: $users user(s))."
}
}
Channels Count: (4/20) channel(s). Im currently on 4 of these channels. Statistics (Active on 4 - Inactive on 0 - Operator on 2 - Voice on 2, Regular on 0 - Total user count of all channels: 293 user(s)).
I would like to get it this way..
I am active in 15 channels - There is space for further 5 channels - 95.17% of our total capacity is used. Total user count of all channels: 316 User(s)
(if linked bots - there are 7 of 7 bots online)
Hope sb can help me. Thx in Advance. jonlar