mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
355524595c
commit
0a1f09175f
|
@ -25,7 +25,7 @@ from utils import setConfigParam
|
||||||
from utils import has_users_path
|
from utils import has_users_path
|
||||||
from utils import get_full_domain
|
from utils import get_full_domain
|
||||||
from utils import remove_id_ending
|
from utils import remove_id_ending
|
||||||
from utils import isEvil
|
from utils import is_evil
|
||||||
from utils import locate_post
|
from utils import locate_post
|
||||||
from utils import evil_incarnate
|
from utils import evil_incarnate
|
||||||
from utils import getDomainFromActor
|
from utils import getDomainFromActor
|
||||||
|
@ -315,7 +315,7 @@ def isBlockedDomain(base_dir: str, domain: str,
|
||||||
if '.' not in domain:
|
if '.' not in domain:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if isEvil(domain):
|
if is_evil(domain):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
shortDomain = _getShortDomain(domain)
|
shortDomain = _getShortDomain(domain)
|
||||||
|
@ -361,7 +361,7 @@ def isBlocked(base_dir: str, nickname: str, domain: str,
|
||||||
blockedCache: [] = None) -> bool:
|
blockedCache: [] = None) -> bool:
|
||||||
"""Is the given nickname blocked?
|
"""Is the given nickname blocked?
|
||||||
"""
|
"""
|
||||||
if isEvil(blockDomain):
|
if is_evil(blockDomain):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
blockHandle = None
|
blockHandle = None
|
||||||
|
|
4
posts.py
4
posts.py
|
@ -50,7 +50,7 @@ from utils import has_users_path
|
||||||
from utils import valid_post_date
|
from utils import valid_post_date
|
||||||
from utils import get_full_domain
|
from utils import get_full_domain
|
||||||
from utils import get_followers_list
|
from utils import get_followers_list
|
||||||
from utils import isEvil
|
from utils import is_evil
|
||||||
from utils import get_status_number
|
from utils import get_status_number
|
||||||
from utils import createPersonDir
|
from utils import createPersonDir
|
||||||
from utils import urlPermitted
|
from utils import urlPermitted
|
||||||
|
@ -4333,7 +4333,7 @@ def getPublicPostDomainsBlocked(session, base_dir: str,
|
||||||
continue
|
continue
|
||||||
# get the domain after the @
|
# get the domain after the @
|
||||||
domainName = domainName.split('@')[1].strip()
|
domainName = domainName.split('@')[1].strip()
|
||||||
if isEvil(domainName):
|
if is_evil(domainName):
|
||||||
blockedDomains.append(domainName)
|
blockedDomains.append(domainName)
|
||||||
continue
|
continue
|
||||||
if domainName in blockedStr:
|
if domainName in blockedStr:
|
||||||
|
|
4
utils.py
4
utils.py
|
@ -742,7 +742,7 @@ def evil_incarnate() -> []:
|
||||||
'kiwifarms.cc', 'djitter.com')
|
'kiwifarms.cc', 'djitter.com')
|
||||||
|
|
||||||
|
|
||||||
def isEvil(domain: str) -> bool:
|
def is_evil(domain: str) -> bool:
|
||||||
# https://www.youtube.com/watch?v=5qw1hcevmdU
|
# https://www.youtube.com/watch?v=5qw1hcevmdU
|
||||||
if not isinstance(domain, str):
|
if not isinstance(domain, str):
|
||||||
print('WARN: Malformed domain ' + str(domain))
|
print('WARN: Malformed domain ' + str(domain))
|
||||||
|
@ -818,7 +818,7 @@ def domainPermitted(domain: str, federation_list: []):
|
||||||
|
|
||||||
|
|
||||||
def urlPermitted(url: str, federation_list: []):
|
def urlPermitted(url: str, federation_list: []):
|
||||||
if isEvil(url):
|
if is_evil(url):
|
||||||
return False
|
return False
|
||||||
if not federation_list:
|
if not federation_list:
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in New Issue