This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Status Eggdrop Script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
F
Fraud
Op
Posts: 101
Joined: Mon May 19, 2008 7:57 am

Status Eggdrop Script

Post by Fraud »

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: 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))."
   }
}
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
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Just edit this line

Code: Select all

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.
F
Fraud
Op
Posts: 101
Joined: Mon May 19, 2008 7:57 am

Post by Fraud »

Well, if i knew how to i would
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Sounds rather like a post for the "Script Request" category... nevertheless..

Change the line mentioned above into something like this:

Code: Select all

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
F
Fraud
Op
Posts: 101
Joined: Mon May 19, 2008 7:57 am

Post by Fraud »

Thank u very much. Sorry if i posted wrong.


1 Error?

?? of our total capacity is used.

Capacity will not be displayed
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

(re)Read the last line in my previous post...
NML_375
Post Reply