forked from indymedia/epicyon
Instance level blocks
parent
3a9bdea0f7
commit
bf3ef893aa
|
@ -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
|
||||
|
|
|
@ -96,7 +96,7 @@ def htmlEditProfile(baseDir: str,path: str,domain: str,port: int) -> str:
|
|||
' <br>Filtered words' \
|
||||
' <textarea id="message" name="filteredWords" placeholder="Filtered words or phrases (one per line)" style="height:200px">'+filterStr+'</textarea>' \
|
||||
' <br>Blocked accounts' \
|
||||
' <textarea id="message" name="blocked" placeholder="Blocked accounts, one per line, in the form nickname@domain" style="height:200px">'+blockedStr+'</textarea>' \
|
||||
' <textarea id="message" name="blocked" placeholder="Blocked accounts, one per line, in the form nickname@domain or *@blockeddomain" style="height:200px">'+blockedStr+'</textarea>' \
|
||||
' </div>' \
|
||||
' <div class="container">' \
|
||||
' <input type="submit" name="submitProfile" value="Submit">' \
|
||||
|
|
Loading…
Reference in New Issue