here, try this (attached file)
Quote:
[FTP_Pre-Command_Events]
retr = EXEC ..\scripts\ionoDLrace\ionoDLrace.exe *COMPLETE*100%*
where *COMPLETE*100%* can be replaced by anything (file or directory) that can be found
in the directory ONLY after a race is complete
|
this is prettty much all the code (besides the wildcardmatch):
Code:
// script by mr_F http://nrscripts.staghosting.com
//
//
//
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <windows.h>
#include "wildcardmatch.h"
#define DEBUG 0
#define DEBUG_PATH "C:\\"
int raceover(char *the_path, char *blockvar);
int
main(int argc, char **argv)
{
char *physical_path;
char *skiplist[] ={"*.nfo","*.jpg","*.m3u","*.sfv","*.log","*.txt","*.avi","*.diz","*.mpg","*.mpeg",NULL};
int i;
#if (DEBUG)
physical_path = DEBUG_PATH;
#else
physical_path = getenv("REALPATH");
#endif
for (i=0; skiplist[i]!=NULL; i++)
if (wild_match(skiplist[i],argv[3]))
return 0;
if (raceover(physical_path, argv[1]))
return 0;
printf("550 %s: Permission denied. No downloading while this race is in progress.\n",argv[3]);
return 1;
}
int
raceover(char *the_path, char *blockvar)
{
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
char *pathonly;
pathonly = malloc(sizeof(char) * (strlen(the_path)+512));
hFind=NULL;
strcpy(pathonly,the_path);
strcat(pathonly,blockvar);
FindFileData.cFileName[0]=0;
hFind=FindFirstFile(pathonly, &FindFileData);
if (hFind!=0xffffffff)
return 1;
FindClose(hFind);
free(pathonly);
return(0);
}
source code included, minus, agian, the wildcard match. if you need it to compile your own let me know. the skiplist allows users to download sample files and stuff, dont know if it's complete enough for your liking