Hey there, I have a basic script, when run it just runs:ã...ã > Thanks,ã > ã > NoisomeãããForgot to post:ããSynchronet BBS for Win32 Version 3.15aãRevision a Jun 3 2009 05:05 SMBLIB 2.51 MSC 1200ãCopyright 2009 Rob Swindell - http://www.synchro.netãJavaScript-C 1.7.0 2007-10-03ãWinSock 2.0ãWindows NT Version 5.0 (Build 2195) Service Pack 4ãã---ã þ Synchronet þ Digital 52 - bbs.digital52.comã
ã > I'm not really sure what you're trying to do.ã > ã > The user.get_time_left() function requires an argument which indicates theã > start time (e.g. login time) to base the time-left calculation on. If theã > user represented by the 'user' object when this script is run has the 'T'ã > exemption, then the user.get_time_left() return value is never going toã > change and the start-time argument value (if supplied) is irrelevant. Youã > need to make sure the account doesn't have the 'T' exemption if youã > actually want the user.adjust_minutes() call to have an effect.ã > ã > The bbs.get_time_left() return value will also not change if the currentã > user has the 'T' exemption.ã > ã > digital manã > ã > Snapple "Real Fact" #180:ã > The first VCR was made in 1956 and was the size of a piano. ã > ã > ---ã > þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.netããI'm just trying to reduce the user's time by five or ten minutes when aãprogram is run. The get_time_left I was using was just to verify that theãtime has changed, and will be removed later on. Is there a better option toãget the remaining time of the user than "bbs/user.get_time_left"?ããSorry for my ignorance, but what is the 'T' exemption? I have changedãeveryone's level to the default level 15, with 15 minutes per day and aãmaximum of 15 minutes per call, and the user I'm testing this on is on thatãlevel, a regular user account. ããThe door itself is not set on suspend time as well.ããThanks for your help!ããJeffãã---ã þ Synchronet þ Digital 52 - bbs.digital52.comã
user.adjust_minutes() is the correct function to call to add or subtractã > minutes from the user's time bank. You need to understand that you cannotã > subtract from the number of minutes that the user is given based on theirã > security level using this function. What this function/method does is addã > or subtract from the user's "time bank", which normally has 0 minutes in.ã > And you cannot go less than 0. This time bank is automatically added toã > their available time online.ã > ããI did not realize it was for the time bank. I read the source to find out theãdifferent commands I can use and I did not see in the help that it was toãremove from the time bank. Thanks!ãã > What you probably want to do instead is adjust the bbs.start_time propertyã > (in seconds). The user's time online is based on their time per day, timeã > per call, minutes (time bank), the current time, and this start time value.ã > By adjusting the start time value you change their available time for theã > current "call".ã > ã > digital manããOkay, excellent. I did use the bbs.start_time property and it works. ããThank you very much for the help.ããNoisomeãã---ã þ Synchronet þ Digital 52 - bbs.digital52.comã
Sysop: | Karloch |
---|---|
Location: | Madrid, Spain |
Users: | 54 |
Nodes: | 8 (0 / 8) |
Uptime: | 129:45:33 |
Calls: | 700 |
Files: | 17,895 |
D/L today: |
128 files (60,769K bytes) |
Messages: | 66,010 |