Code: Select all
#How often to update stats(in minutes)?
set interval "1"
set chan "#kc"
set pisgpath "/home/stylez/pisg/pisg"
set pisgtimer_trigger [timer $interval pisg:generate]
#bind time - "01 * * * *" pisg:generate
#bind time - "01 * * * *" pisg:ftp
proc pisg:generate {} {
global chan
global pisgpath
exec $pisgpath
set pisgtimer_ftp [timer 1 pisg:ftp]
puthelp "PRIVMSG $chan:IRC Stats Page Updating begun..."
#set pisgtimer_trigger [timer $interval update:pisg
}
proc pisg:ftp {} {
global chan
puthelp "PRIVMSG $chan:IRC Stats Page Updated, FTPing..."
if {[set er [sendftp /home/stylez/pisg/kc-stats.html ftp.kronicconcerz.com login pass /httpdocs/kc-stats.html]] != "1"} {
putlog "Error in sendftp: $er"
puthelp "PRIVMSG $chan:IRC Stats Page FTP Failed"
}
else {puthelp "PRIVMSG $chan:"IRC Stats Page Update Successful."}
#putlog "IRC Stats Page Update Successful."
}
putlog "Pisg update loaded"
It interprets this as an error and quits the script.<KronBot> Analyzing log(/home/stylez/eggdrop/mel/logs/kc.12.10.2002.log) in 'eggdrop' format...
<KronBot> Finished analyzing log, 1 days total.
<KronBot> Analyzing log(/home/stylez/eggdrop/mel/logs/kc.12.11.2002.log) in 'eggdrop' format...
There is an argument for pisg, --silent, which wont output any of this, but I cant seem to execute it from the script, I get the No Such File Or Directory error.
Also have a basic question about timers.. When a timer goes through its cycle, then executes whatever command, what happens to it? Does it just stop a 0? Does it kill itself off? Or does it restart?