mirror of
https://codeberg.org/prof_x_pvt_ltd/captive.whump.shanti-portal
synced 2024-08-14 22:46:42 +00:00
forgot int
This commit is contained in:
parent
3c69e4374f
commit
5b92fb2b5e
1 changed files with 3 additions and 2 deletions
|
@ -145,13 +145,14 @@ if args.refresh:
|
|||
|
||||
if int(packets_val) != client.last_packets:
|
||||
client.last_activity = current_date
|
||||
client.last_packets = packets_val
|
||||
client.last_packets = int(packets_val)
|
||||
client.commit()
|
||||
|
||||
# Also do a purge of clients that have no traffic for 24 hrs
|
||||
if client.last_activity:
|
||||
time_diff = client.last_activity-client.created
|
||||
if client.last_packets >= packets_val and time_diff.days >= 1:
|
||||
|
||||
if client.last_packets >= int(packets_val) and time_diff.days >= 1:
|
||||
client.enabled = False
|
||||
client.commit()
|
||||
|
||||
|
|
Loading…
Reference in a new issue