forked from MarseyWorld/MarseyWorld
try fixing the issue with the under attack toggle
parent
7925e1236e
commit
f6b5723308
|
@ -31,6 +31,10 @@ def toggle_setting(setting):
|
|||
_save_settings()
|
||||
return val
|
||||
|
||||
def set_setting(setting, val):
|
||||
_SETTINGS[setting] = val
|
||||
_save_settings()
|
||||
|
||||
def reload_settings():
|
||||
global _SETTINGS
|
||||
if not os.path.isfile(SETTINGS_FILENAME):
|
||||
|
|
|
@ -63,11 +63,11 @@ def calc_users():
|
|||
|
||||
if g.loggedout_counter > ddos_threshold:
|
||||
if not get_setting('under_attack'):
|
||||
toggle_setting('under_attack')
|
||||
set_setting('under_attack', True)
|
||||
set_security_level('under_attack')
|
||||
else:
|
||||
if get_setting('under_attack'):
|
||||
toggle_setting('under_attack')
|
||||
set_setting('under_attack', False)
|
||||
set_security_level('high')
|
||||
return ''
|
||||
|
||||
|
|
Loading…
Reference in New Issue