(RADIATOR) Session-timeout="until Time" and Time = "MoTuWe0800-1400,Wk2200-0400"

Jason Godsey radiator at corp.fidalgo.net
Wed May 12 09:31:29 CDT 2004


For my senario:   The time is Friday, 02:00.

select password, time_left, rad_reply from users where username='%n'
 password="test"
 time_left=6600
 rad_reply = Time = "MoTuWe0800-1400,Wk2200-0400", \
Session-timeout="until Time"

02:00 to 04:00 is 2 hours (7200 seconds) but I also want to enforce maximum usage constraints (say 100 hours / month).

So my user has 6600 seconds left on her account, but 7200 seconds to the end of their Time = access window.

This is basically what I want to do:
perl -e '$max=shift; $value=shift; printf("Session-Timeout=%d\n", $value > $max ? $max : $value); ' 6600(time_left) 7200(until Time)

yeilding Session-Timeout = 6600

and the same is true of the user having 8000 seconds left:
perl -e '$max=shift; $value=shift; printf("Session-Timeout=%d\n", $value > $max ? $max : $value); ' 8000(time_left) 7200(until Time)

and Session-Timeout = 7200

Thank you,

Jason

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list