PDA

View Full Version : [TCL] OnUploadComplete event


Guardian
06-03-2004, 12:43 AM
Looks like that ioftpd updates the userfiles after all OUC events are done ... but i need it to grab certain correct userstats straight after a file got uploaded (in that case after io updated the userfiles) :\

Anyone any idea ?

Grtz
Guardian

neoxed
06-03-2004, 12:51 AM
Well the logical reason ioFTPD updates the userfiles after the scripts have finished running is in the event that a script returns non-zero to block/invalidate the action. If you return non-zero on for an OnUploadComplete event, ioFTPD doesn't update the userfiles, no point adding the credits and stats if the file was deleted. (Then it would take a second update to remove the stats.)

Why not just retrieve the file size, (for credits: multiply by the user's ratio for that particular credit section) read the userfile and add the stats to the appropriate credit or stats section. (Tcl vars: $creditsection and $statssection)