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.

IRCStats ftp upload and !trigger script?

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
m
marvz
Halfop
Posts: 64
Joined: Fri Jun 18, 2010 2:37 pm

IRCStats ftp upload and !trigger script?

Post by marvz »

I just started using IRCStats and was wondering if there was a way to get it to FTP the logs after they are created? I found this script in the archives but its for pisg.

Code: Select all

#This is a rewrite of pisg.tcl so now when people request !stats
#If it is not the $statsnick requesting it, it will just show the url and not generate the logs
#also the $statsexe setting goes to a bash script i have made to generate and upload the logs via ftp
#to the directory that you set in generate_logs
#
#irc.bsdaxis.net #BSDAxis
#Trip-Out
set statsexe "~/generate_logs"
set statsurl "http://www.bsdaxis.net/stats"
set statschan "#BSDAxis"
set statsflags "nm"
set statstime "120"
set statsnick "Trip-Out"

bind pub $statsflags !stats pub:statsgen

proc pub:statsgen {nick host hand chan arg} {
        global statsurl statschan statsexe statsnick
        if {$nick != $statsnick} {
        putlog "$nick Requested Stats"
        append out "PRIVMSG $statschan :\002Stats Available At:\002 $statsurl"
        } else {
        putlog "Generating Stats..."
        exec $statsexe
        append out "PRIVMSG $statschan :\002Stats Updated:\002 $statsurl"
        putlog "Stats Updated."
        }
        puthelp $out
}

proc statstimer {} {
        global statsexe statsurl statschan statstime
        puthelp "PRIVMSG $statschan : \002Stats Updated:\002 $statsurl"
        timer $statstime statstimer
}

if {![info exists {statsset}]} {
  set statsset 1
  timer 2 statstimer
}

putlog "pisg-new.tcl 1.0 By Trip-Out Loaded"
this is something I'd be interested in to create new stats page by the users in the chan with the proper flags and also FTP the newly created stats page. Thanks in advance.
User avatar
devilsoulblack
Halfop
Posts: 62
Joined: Wed Nov 19, 2003 9:18 pm
Location: Chile
Contact:

Post by devilsoulblack »

---------
Add [SOLVED] to the thread title if your issue has been.
Search - FAQ
Post Reply