| View previous topic :: View next topic |
| Author |
Message |
GeeX Voice
Joined: 19 Sep 2005 Posts: 29
|
Posted: Mon May 15, 2006 1:14 pm Post subject: |
|
|
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 |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Tue May 16, 2006 5:06 am Post subject: |
|
|
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
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 |
|
 |
GeeX Voice
Joined: 19 Sep 2005 Posts: 29
|
Posted: Tue May 16, 2006 5:04 pm Post subject: |
|
|
it wasnt really a release, i posted it for a user, who was searching for such a "snippet" (how you call it)  |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue May 16, 2006 6:39 pm Post subject: |
|
|
| GeeX wrote: | it wasnt really a release, i posted it for a user, who was searching for such a "snippet" (how you call it)  |
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 |
|
 |
GeeX Voice
Joined: 19 Sep 2005 Posts: 29
|
Posted: Wed May 17, 2006 8:23 am Post subject: |
|
|
| Well, he can use this script to update pisg, because he was searching for a tcl script not a crontab script! |
|
| Back to top |
|
 |
sKy Op

Joined: 14 Apr 2005 Posts: 194 Location: Germany
|
Posted: Fri May 19, 2006 6:01 am Post subject: |
|
|
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 |
|
 |
GeeX Voice
Joined: 19 Sep 2005 Posts: 29
|
Posted: Fri May 19, 2006 2:13 pm Post subject: |
|
|
Very good ideas, i will try to implement those features in this script.  |
|
| Back to top |
|
 |
|