forked from MarseyWorld/MarseyWorld
allow enabling under attack mode manually
parent
44691792a4
commit
05c262517e
|
@ -60,14 +60,9 @@ def calc_users():
|
||||||
else:
|
else:
|
||||||
ddos_threshold = 1000
|
ddos_threshold = 1000
|
||||||
|
|
||||||
if g.loggedout_counter > ddos_threshold:
|
if g.loggedout_counter > ddos_threshold and not get_setting('under_attack'):
|
||||||
if not get_setting('under_attack'):
|
toggle_setting('under_attack')
|
||||||
toggle_setting('under_attack')
|
set_security_level('under_attack')
|
||||||
set_security_level('under_attack')
|
|
||||||
else:
|
|
||||||
if get_setting('under_attack'):
|
|
||||||
toggle_setting('under_attack')
|
|
||||||
set_security_level('high')
|
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def get_logged_in_user():
|
def get_logged_in_user():
|
||||||
|
|
Loading…
Reference in New Issue