| View previous topic :: View next topic |
| Author |
Message |
Fraud Op
Joined: 19 May 2008 Posts: 101
|
Posted: Wed Jul 16, 2008 8:50 am Post subject: Status Eggdrop Script |
|
|
Hi everybody. I have a Script that posts some Channel Stats. But i would like to have it a lil bit recoded
Here it is
| Code: | 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))."
}
} |
ATM the the displayed output is
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 |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed Jul 16, 2008 11:48 am Post subject: |
|
|
Just edit this line
| Code: | | 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))." |
and put the information you need. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Fraud Op
Joined: 19 May 2008 Posts: 101
|
Posted: Wed Jul 16, 2008 3:52 pm Post subject: |
|
|
| Well, if i knew how to i would |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Jul 16, 2008 4:06 pm Post subject: |
|
|
Sounds rather like a post for the "Script Request" category... nevertheless..
Change the line mentioned above into something like this:
| Code: | | putserv "PRIVMSG $channel :I am active in [llength [channels]] channels - There is space for further [expr 20 - [llength [channels]]] channels - ?? of our total capacity is used. Total user count on all channels: $users User(s) - There are [llength [bots]] of [llength [userlist +b]] bots online" |
To be honest however, your post provides no means of information on what capacity should be calculated upon (hence just ??). _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Fraud Op
Joined: 19 May 2008 Posts: 101
|
Posted: Wed Jul 16, 2008 5:34 pm Post subject: |
|
|
Thank u very much. Sorry if i posted wrong.
1 Error?
?? of our total capacity is used.
Capacity will not be displayed |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Jul 16, 2008 5:37 pm Post subject: |
|
|
(re)Read the last line in my previous post... _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|