Minimum word length

main
Bob Mottram 2020-12-19 13:07:42 +00:00
parent c7051f191f
commit 50ae2cec61
1 changed files with 5 additions and 2 deletions

View File

@ -97,8 +97,11 @@ def isFiltered(baseDir: str, nickname: str, domain: str, content: str) -> bool:
if wordsFile: if wordsFile:
wordsList = wordsFile.read().split('\n') wordsList = wordsFile.read().split('\n')
for word in wordsList: for word in wordsList:
if word in content: if not word:
return True continue
if len(word) > 1:
if word in content:
return True
if not nickname or not domain: if not nickname or not domain:
return False return False