forked from rDrama/rDrama
1
0
Fork 0

allow enabling under attack mode manually

master
Aevann 2023-09-08 16:00:11 +03:00
parent 44691792a4
commit 05c262517e
1 changed files with 3 additions and 8 deletions

View File

@ -60,14 +60,9 @@ def calc_users():
else:
ddos_threshold = 1000
if g.loggedout_counter > ddos_threshold:
if not get_setting('under_attack'):
toggle_setting('under_attack')
set_security_level('under_attack')
else:
if get_setting('under_attack'):
toggle_setting('under_attack')
set_security_level('high')
if g.loggedout_counter > ddos_threshold and not get_setting('under_attack'):
toggle_setting('under_attack')
set_security_level('under_attack')
return ''
def get_logged_in_user():