Old 05-05-2004, 05:55 AM   #1
darko
Member
FlashFXP Registered User
ioFTPD Foundation User
 
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
Old 05-05-2004, 10:33 AM   #2
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default Re: Weekly ADD credits (instead of CHANGE)

Quote:
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.

Quote:
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.
Mouton is offline   Reply With Quote
Old 05-05-2004, 07:32 PM   #3
darko
Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: May 2004
Posts: 74
Default

thanks mouton
darko is offline   Reply With Quote
Reply

Tags
added, credits, creds, user, weeklyadd

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:23 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)