forked from rDrama/rDrama
better DDOS mitigation
parent
817defda85
commit
bb11bf899e
|
@ -101,11 +101,6 @@ MODACTION_TYPES = {
|
||||||
"icon": 'fa-images',
|
"icon": 'fa-images',
|
||||||
"color": 'bg-muted'
|
"color": 'bg-muted'
|
||||||
},
|
},
|
||||||
'disable_automatic_DDOS_mitigation': {
|
|
||||||
"str": 'disabled automatic DDOS mitigation',
|
|
||||||
"icon": 'fa-shield-virus',
|
|
||||||
"color": 'bg-danger'
|
|
||||||
},
|
|
||||||
'distinguish_comment': {
|
'distinguish_comment': {
|
||||||
"str": 'distinguished {self.target_link}',
|
"str": 'distinguished {self.target_link}',
|
||||||
"icon": 'fa-crown',
|
"icon": 'fa-crown',
|
||||||
|
@ -176,11 +171,6 @@ MODACTION_TYPES = {
|
||||||
"icon": 'fa-images',
|
"icon": 'fa-images',
|
||||||
"color": 'bg-success',
|
"color": 'bg-success',
|
||||||
},
|
},
|
||||||
'enable_automatic_DDOS_mitigation': {
|
|
||||||
"str": 'enabled automatic DDOS mitigation',
|
|
||||||
"icon": 'fa-shield-virus',
|
|
||||||
"color": 'bg-success',
|
|
||||||
},
|
|
||||||
'flair_post': {
|
'flair_post': {
|
||||||
"str": 'set a flair on {self.target_link}',
|
"str": 'set a flair on {self.target_link}',
|
||||||
"icon": 'fa-tag',
|
"icon": 'fa-tag',
|
||||||
|
@ -429,5 +419,4 @@ MODACTION_TYPES__FILTERED = deepcopy({t:v for t,v in MODACTION_TYPES.items()
|
||||||
if not t in MODACTION_PRIVILEGED__TYPES})
|
if not t in MODACTION_PRIVILEGED__TYPES})
|
||||||
AEVANN_MODACTION_TYPES = {'ban_user','unban_user',
|
AEVANN_MODACTION_TYPES = {'ban_user','unban_user',
|
||||||
'shadowban','unshadowban',
|
'shadowban','unshadowban',
|
||||||
'delete_media',
|
'delete_media'}
|
||||||
'enable_automatic_DDOS_mitigation', 'disable_automatic_DDOS_mitigation'}
|
|
||||||
|
|
|
@ -15,8 +15,7 @@ _SETTINGS = {
|
||||||
"login_required": False,
|
"login_required": False,
|
||||||
"under_siege": False,
|
"under_siege": False,
|
||||||
"dm_images": True,
|
"dm_images": True,
|
||||||
"under_attack": False,
|
"under_attack": False
|
||||||
"automatic_DDOS_mitigation": True,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_setting(setting:str):
|
def get_setting(setting:str):
|
||||||
|
|
|
@ -77,8 +77,7 @@ def calc_users():
|
||||||
loggedin_counter = len(loggedin)
|
loggedin_counter = len(loggedin)
|
||||||
loggedout_counter = len(loggedout)
|
loggedout_counter = len(loggedout)
|
||||||
|
|
||||||
if get_setting('automatic_DDOS_mitigation'):
|
if SITE == 'watchpeopledie.tv': mul = 3
|
||||||
if SITE == 'watchpeopledie.tv': mul = 5
|
|
||||||
else: mul = 1
|
else: mul = 1
|
||||||
|
|
||||||
if loggedout_counter > (loggedin_counter * mul):
|
if loggedout_counter > (loggedin_counter * mul):
|
||||||
|
|
Loading…
Reference in New Issue