Re: Re: user.adjust_minutes -- Not working..?ã By: Noisome Poison to Digital Man on Thu Jun 18 2009 08:33 amãã > >ã > > 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.ãã > 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"?ããbbs.get_time_left() is the correct method.ãã > Sorry for my ignorance, but what is the 'T' exemption?ããThe "Time Online" exemption. Seeã
http://synchro.net/docs/user_editor.html#UserEditCommands for details.ãã > 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.ããAh, okay good.ãã > The door itself is not set on suspend time as well.ãã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.ãã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ããSnapple "Real Fact" #161:ãThe first TV network kids show in the U.S. was "Captain Kangaroo." ã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã