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.

PISG Script by LaW

Support & discussion of released scripts, and announcements of new releases.
Post Reply
G
GeeX
Voice
Posts: 29
Joined: Mon Sep 19, 2005 4:29 am

Post by GeeX »

Pisg TCL:

Code: Select all

#  __                __      __    
# /\ \              /\ \  __/\ \   
# \ \ \         __  \ \ \/\ \ \ \  
#  \ \ \  __  /'__`\ \ \ \ \ \ \ \ 
#   \ \ \_\ \/\ \_\ \_\ \ \_/ \_\ \
#    \ \____/\ \__/ \_\\ `\___ ___/
#     \/___/  \/__/\/_/ '\/__//__/ 
#
# 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"
            }
        }

m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

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 :roll:

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.
G
GeeX
Voice
Posts: 29
Joined: Mon Sep 19, 2005 4:29 am

Post by GeeX »

it wasnt really a release, i posted it for a user, who was searching for such a "snippet" (how you call it) :roll:
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

GeeX wrote:it wasnt really a release, i posted it for a user, who was searching for such a "snippet" (how you call it) :roll:
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
G
GeeX
Voice
Posts: 29
Joined: Mon Sep 19, 2005 4:29 am

Post by GeeX »

Well, he can use this script to update pisg, because he was searching for a tcl script not a crontab script!
User avatar
sKy
Op
Posts: 194
Joined: Thu Apr 14, 2005 5:58 pm
Location: Germany

Post by sKy »

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.
G
GeeX
Voice
Posts: 29
Joined: Mon Sep 19, 2005 4:29 am

Post by GeeX »

Very good ideas, i will try to implement those features in this script. ;)
Post Reply