From bf3ef893aa803ded5f964768c832041c08c25375 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 2 Aug 2019 12:46:42 +0100 Subject: [PATCH] Instance level blocks --- blocking.py | 2 ++ webinterface.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/blocking.py b/blocking.py index c6632af09..1a669fba8 100644 --- a/blocking.py +++ b/blocking.py @@ -52,6 +52,8 @@ def isBlocked(baseDir: str,nickname: str,domain: str, \ blockingFilename=baseDir+'/accounts/'+nickname+'@'+domain+'/blocking.txt' blockHandle=blockNickname+'@'+blockDomain if os.path.isfile(blockingFilename): + if '*@'+blockDomain in open(blockingFilename).read(): + return True if blockHandle in open(blockingFilename).read(): return True return False diff --git a/webinterface.py b/webinterface.py index 3807cdbde..12f56880f 100644 --- a/webinterface.py +++ b/webinterface.py @@ -96,7 +96,7 @@ def htmlEditProfile(baseDir: str,path: str,domain: str,port: int) -> str: '
Filtered words' \ ' ' \ '
Blocked accounts' \ - ' ' \ + ' ' \ ' ' \ '
' \ ' ' \