Commit 49d8f28e authored by Estelle's avatar Estelle
Browse files

More function cleanup

parent 5d56a899
Pipeline #274 passed with stage
in 33 seconds
......@@ -176,7 +176,7 @@ sub post_auth_hook
#
# Allow for capping overrides by client attribute
allowOverideCappingByClient($server,$user);
allowOverideCappingByClient($server,$user,$trafficLimitWithTopups,$accountingUsage, $uptimeLimitWithTopups);
#
# Check if we've exceeded our limits
......@@ -253,27 +253,6 @@ sub post_auth_hook
#Auto TopUp
#
#
if (defined ($user->('SMRadius-AutoTopup-TrafficEnable'))){
if $totalused < 100 {
return MOD_RES_SKIP;
}
# if $used >= 100 && $used < ($assigned + $allowed){
# we calculate the top up needed
# $trafficAutoTopupAlreadyAdded = $accountUsage->{'TotalDataUsage'} -$accountUsage->{'TermAllocatedData'} ;
# $trafficAutoTopupsRequired = floor(($accountUsage->{'TotalDataUsage'} - $trafficLimitWithTopups) / $trafficAutoTopupSize) + 1;
# $trafficAutoTopupsAllowed = floor(($trafficAutoTopupLimit - $trafficAutoTopupAlreadyAdded) / $trafficAutoTopupSize); # $trafficAutoTopupsToAdd = min($trafficAutoTopupsRequired,$trafficAutoTopupsAllowed);
#}
}
## @post_acct_hook($server,$user,$packet)
# Post authentication hook
#
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment