same as last commit
parent
caf0f2f54f
commit
7347124552
|
@ -55,20 +55,6 @@ def calc_users():
|
||||||
cache.set(LOGGED_OUT_CACHE_KEY, loggedout, timeout=86400)
|
cache.set(LOGGED_OUT_CACHE_KEY, loggedout, timeout=86400)
|
||||||
g.loggedin_counter = len(loggedin)
|
g.loggedin_counter = len(loggedin)
|
||||||
g.loggedout_counter = len(loggedout)
|
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:
|
|
||||||
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 ''
|
return ''
|
||||||
|
|
||||||
def get_logged_in_user():
|
def get_logged_in_user():
|
||||||
|
|
Loading…
Reference in New Issue