From 50ae2cec61836d963aa05abef705364fa39ac23c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 19 Dec 2020 13:07:42 +0000 Subject: [PATCH] Minimum word length --- filters.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/filters.py b/filters.py index 4ae1fcede..7bb70eecf 100644 --- a/filters.py +++ b/filters.py @@ -97,8 +97,11 @@ def isFiltered(baseDir: str, nickname: str, domain: str, content: str) -> bool: if wordsFile: wordsList = wordsFile.read().split('\n') for word in wordsList: - if word in content: - return True + if not word: + continue + if len(word) > 1: + if word in content: + return True if not nickname or not domain: return False