View Single Post
Old 05-29-2005, 01:23 PM  
r3flux
Member
 
Join Date: Feb 2005
Posts: 48
Default

Quote:
Originally posted by Harm
Mouton has created something similar a while ago.
http://www.ioftpd.com/board/showthre...=&threadid=740
I know it adds the dirnames to the database instead of reading from it but it might help.
Not really I already read this post before i post my question here.

Quote:
Originally posted by Harm
You could also edit the readlog proc (I think that's how it's called in dZSbot) to call your script when [string equal "NEWDIR" $msgtype] or when [string equal "SFV" $msgtype] (if you want it on sfv upload).
Yeah, this seems to be what im looking for.

Here is what i have now in dZSbot.tcl

Code:
proc readlog {} {

    seek $of $lastoct
    while {![eof $of]} {
        
	// [...]

        if { $msgtype == "NEWDIR" } {
	    set path [lindex $line 5]
	    performDupe pretime $path $user $host $chan
	}
    }

    close $of
    set lastoct [file size $location(IOLOG)/ioFTPD.log]
    launchnuke
    utimer 1 "readlog"
    return 0
}
But when i now make a new dir on the site, this happens in the sitechan:

[SECTION] + [PRETIME] :: test.folder :: was pre'd 12m 43s ago.
[SECTION] + [NEW RELEASE] :: 0529/test.folder by xxx/xxxx

but it should be the other way, first new folder and then pretime.

would be nice if anyone could help me further with that one, im not very familiar with tcl at all

thx

** update **
problem solved. i found a solution:

got the solution:

Code:
// [...]
if { [info exists variables($msgtype)] } {
    set echoline [parse $msgtype $var1 $section]
    sndall $section $echoline
} else {
    set echoline [parse DEFAULT $var1 $section]
    sndall $section $echoline
}

if { $msgtype == "NEWDIR" } {
    set path [lindex $line 5]
    performDupe pretime $path $user $host $chan
}
all works fine
r3flux is offline   Reply With Quote