forked from rDrama/rDrama
1
0
Fork 0

restore auto under_attack

master
Aevann 2024-05-17 01:51:07 +03:00
parent 3583f14f6f
commit a4166f271c
1 changed files with 14 additions and 0 deletions

View File

@ -56,6 +56,20 @@ def calc_users():
g.loggedin_counter = len(loggedin)
g.loggedout_counter = len(loggedout)
if SITE == 'watchpeopledie.tv':
ddos_threshold = 3500
else:
ddos_threshold = 1000
if g.loggedin_counter + g.loggedout_counter > ddos_threshold or (SITE == 'watchpeopledie.tv' and get_setting('login_required')):
if not get_setting('under_attack'):
set_setting('under_attack', True)
set_security_level('under_attack')
else:
if get_setting('under_attack'):
set_setting('under_attack', False)
set_security_level('high')
return ''
def get_logged_in_user():