egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Status Eggdrop Script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Fraud
Op


Joined: 19 May 2008
Posts: 101

PostPosted: Wed Jul 16, 2008 8:50 am    Post subject: Status Eggdrop Script Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Jul 16, 2008 11:48 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Fraud
Op


Joined: 19 May 2008
Posts: 101

PostPosted: Wed Jul 16, 2008 3:52 pm    Post subject: Reply with quote

Well, if i knew how to i would
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Jul 16, 2008 4:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Fraud
Op


Joined: 19 May 2008
Posts: 101

PostPosted: Wed Jul 16, 2008 5:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Jul 16, 2008 5:37 pm    Post subject: Reply with quote

(re)Read the last line in my previous post...
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber