Subj : Re: user.adjust_minutes -- Not working..? To : Noisome Poison From : Digital Man Date : Thu Jun 18 2009 05:26 pm 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 þ telnet://vert.synchro.net .