View Single Post
Old 05-05-2004, 05:55 AM  
darko
Member
 
Join Date: May 2004
Posts: 74
Default Weekly ADD credits (instead of CHANGE)

hi i have the kinda WEIRD situation of a user which gets 20gb allotment AND trades for extra creds.. so the allotment needs to get ADDED to his credz every week.

Code:
__________________________________________________
so i added this in ioFTPD.ini:

 [Scheduler]
WeeklyAddUser	    = 0 0 * 0	    EXEC ..\scripts\silver_scripts\weeklyadd.bat user 20480000

[FTP_Custom_Commands]
weeklyadd		= EXEC ..\scripts\silver_scripts\weeklyadd.bat

FTP_Site_Permissions]
weeklyadd			= 1M
__________________________________________________

__________________________________________________
this is the weeklyadd.bat:

@echo !CHANGE %1 CREDITS +%2
@echo %date% %time% 'SiTEBOT' changed credits for user '%1' from '.' to '%2' on section '0'. >> ..\logs\SysOp.log
@exit 0
__________________________________________________

which gives me this output in the adminchan (using ioB):

·-::1 xxx sysop operation ::- wo 05-05-2004 12:48:40,07 'SiTEBOT' changed credits for user 'test' from '.' to '124000' on section '0'.

which is kinda almost what i want (maybe some one knows how i could pass the old creds variable to the .bat or a nice way to pass date/time).

The batch works nicely when i do "site weeklyadd test 1024000" the creds get added and the output is shown in sitechan. My question is: will my line in the [Scheduler] work? I want the creds to be added everysunday night @ 0.00, is it correct for that?

Thanks
darko is offline   Reply With Quote