PDA

View Full Version : Weekly ADD credits (instead of CHANGE)


darko
05-05-2004, 05:55 AM
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.


__________________________________________________
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

Mouton
05-05-2004, 10:33 AM
Originally posted by darko
maybe some one knows how i could pass the old creds variable to the .bat or a nice way to pass date/time). Can't be done. The script is executed as a different user, so it can't get someone's else cookies.

Originally posted by darko
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? Yes.

darko
05-05-2004, 07:32 PM
thanks mouton