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 

PISG Script by LaW

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
GeeX
Voice


Joined: 19 Sep 2005
Posts: 29

PostPosted: Mon May 15, 2006 1:14 pm    Post subject: Reply with quote

Pisg TCL:

Code:

#  __                __      __   
# /\ \              /\ \  __/\ \   
# \ \ \         __  \ \ \/\ \ \ \ 
#  \ \ \  __  /'__`\ \ \ \ \ \ \ \
#   \ \ \_\ \/\ \_\ \_\ \ \_/ \_\ \
#    \ \____/\ \__/ \_\\ `\___ ___/
#     \/___/  \/__/\/_/ '\/__//__/
#
# PISG Script by LaW.
#
# Don't change anything.
# Report bugs to #GeeX on Quakenet.


#  Automatic PISG Updater

  #  configuration

     #  variables

          set pisg(trigger) "\$"
          set pisg(author)  "LaW (#GeeX on Quakenet)"
          set pisg(version) "1.0"
          set pisg(url)     "http://stats.myGeeX.de/"
          set pisg(perl)    "/home/eggdrop/public_html/pisg/pisg"
          set pisg(chan)    "#GeeX"

     #  bindings

          bind PUB  n|- "$pisg(trigger)stats" upd:pisg
          bind TIME -|- {00 * * * *}          upd:pisg

     #  copyright

          putlog "PISG Script version $pisg(version) scripted by $pisg(author)"

     #  source (again DO NOT change anything if you are not 100% sure)
       
        proc upd:pisg { nick host hand chan arg } {
            global pisg
            if {[catch {exec $pisg(perl)} error]} {
                putserv "PRIVMSG $pisg(chan) :\0031,0\x5B\0032\002\xBB\002\0031 An error occured, while updating the channel statistics! \0032\002\xAB\002\0031\x5D\003"
            } else {
                putserv "PRIVMSG $pisg(chan) :\0031,0\x5B\0032\002\xBB\002\0031 Channel statistics updated \0032\002\xAB\002\0031\x5D\x5B\0032\002\xBB\002\0031 $pisg(url) \0032\002\xAB\002\0031\x5D\003"
            }
        }

Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Tue May 16, 2006 5:06 am    Post subject: Reply with quote

What exactly is the point of this piece of scripting?
It does the exact same that other scripts do in the tcl archive with the exception that you add lots of pointless colors Rolling Eyes

It doesn't even use any parameters that perl may need in the case of any possible exceptions that you need to supply extra options.

So i would rather call it a snippet that won't even work for all systems rather than a script.
Back to top
View user's profile Send private message
GeeX
Voice


Joined: 19 Sep 2005
Posts: 29

PostPosted: Tue May 16, 2006 5:04 pm    Post subject: Reply with quote

it wasnt really a release, i posted it for a user, who was searching for such a "snippet" (how you call it) Rolling Eyes
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue May 16, 2006 6:39 pm    Post subject: Reply with quote

GeeX wrote:
it wasnt really a release, i posted it for a user, who was searching for such a "snippet" (how you call it) Rolling Eyes

And how exactly did a question on whether they had a crontab entry correct actually ask for a 'snippet'. The post was irrelevant to the topic and was moved to an appropriate (?) forum.
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
GeeX
Voice


Joined: 19 Sep 2005
Posts: 29

PostPosted: Wed May 17, 2006 8:23 am    Post subject: Reply with quote

Well, he can use this script to update pisg, because he was searching for a tcl script not a crontab script!
Back to top
View user's profile Send private message
sKy
Op


Joined: 14 Apr 2005
Posts: 194
Location: Germany

PostPosted: Fri May 19, 2006 6:01 am    Post subject: Reply with quote

Uhm. This script isn`t vey modern.
Exec blocks the hole bot. If you have many big statsfiles to prase the bot will ping timeout cause pisg could need about 20-30++ seconds to finish.
Pisg should be executed in the backround.

A new kind of pisg.tcl is needed. To give a few ideas what it should do:
- execute pisg into the backround
- cut the statsfiles if them are to big (delete some first old lines)
- adding new entrys in pisg.cfg (pisg channel config file) if a new chan is added to the eggdrop
- changing pisg settings via irc
- upload the updated stats.html to ftp in a nonblocking way with trying to output error messages while uploading (wrong password, wrong server and so on)
_________________
socketapi | Code less, create more.
Back to top
View user's profile Send private message
GeeX
Voice


Joined: 19 Sep 2005
Posts: 29

PostPosted: Fri May 19, 2006 2:13 pm    Post subject: Reply with quote

Very good ideas, i will try to implement those features in this script. Wink
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 Support & Releases 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