mirror of
https://codeberg.org/prof_x_pvt_ltd/captive.whump.shanti-portal
synced 2024-08-14 22:46:42 +00:00
fancy
This commit is contained in:
parent
9033a4d484
commit
148d409d3b
1 changed files with 8 additions and 8 deletions
|
@ -150,7 +150,7 @@ if args.refresh:
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
print('Failed to init client:{ip}: {error}'.format(
|
print('Failed to init client:{ip}: {error}'.format(
|
||||||
ip=client_ip,
|
ip=client_ip.ljust(12),
|
||||||
error=str(e)
|
error=str(e)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@ -167,9 +167,9 @@ if args.refresh:
|
||||||
# The _new attribute is only set on brand new clients not previously
|
# The _new attribute is only set on brand new clients not previously
|
||||||
# in DB. This will get less and less common as DB builds up.
|
# in DB. This will get less and less common as DB builds up.
|
||||||
if client._new:
|
if client._new:
|
||||||
if args.verbose:
|
if args.verbose > 1:
|
||||||
print('Creating new client:{ip}'.format(
|
print('Client:{ip} created'.format(
|
||||||
ip=client.ip_address
|
ip=client.ip_address.ljust(13)
|
||||||
))
|
))
|
||||||
client.enabled = True
|
client.enabled = True
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ if args.refresh:
|
||||||
if int(packets_val) > client.last_packets:
|
if int(packets_val) > client.last_packets:
|
||||||
if args.verbose > 1:
|
if args.verbose > 1:
|
||||||
print('Client:{ip} updated'.format(
|
print('Client:{ip} updated'.format(
|
||||||
ip=client.ip_address
|
ip=client.ip_address.ljust(13)
|
||||||
))
|
))
|
||||||
|
|
||||||
client.last_packets = packets_val
|
client.last_packets = packets_val
|
||||||
|
@ -196,7 +196,7 @@ if args.refresh:
|
||||||
# unique clients life-time.
|
# unique clients life-time.
|
||||||
if args.verbose > 1:
|
if args.verbose > 1:
|
||||||
print('Client:{ip} reset'.format(
|
print('Client:{ip} reset'.format(
|
||||||
ip=client.ip_address
|
ip=client.ip_address.ljust(13)
|
||||||
))
|
))
|
||||||
|
|
||||||
client.last_packets = packets_val
|
client.last_packets = packets_val
|
||||||
|
@ -208,7 +208,7 @@ if args.refresh:
|
||||||
if not client.last_activity and expired:
|
if not client.last_activity and expired:
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
print('Client:{ip} disabled, no activity logged'.format(
|
print('Client:{ip} disabled, no activity logged'.format(
|
||||||
ip=client.ip_address
|
ip=client.ip_address.ljust(13)
|
||||||
))
|
))
|
||||||
|
|
||||||
client.enabled = False
|
client.enabled = False
|
||||||
|
@ -223,7 +223,7 @@ if args.refresh:
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
print('Client:{ip} disabled, no activity since "{last_activity}"'.format(
|
print('Client:{ip} disabled, no activity since "{last_activity}"'.format(
|
||||||
last_activity=client.last_activity,
|
last_activity=client.last_activity,
|
||||||
ip=client.ip_address
|
ip=client.ip_address.ljust(13)
|
||||||
))
|
))
|
||||||
|
|
||||||
client.enabled = False
|
client.enabled = False
|
||||||
|
|
Loading…
Reference in a new issue