diff options
| author | 2019-05-13 13:47:59 +0200 | |
|---|---|---|
| committer | 2019-05-13 13:47:59 +0200 | |
| commit | f2fafa631c06804efb110161560d85122ac45fab (patch) | |
| tree | 680722797877e06a08c719b792ab252ad1c5f153 | |
| parent | Merge pull request #356 from python-discord/urllib3-vuln-fix (diff) | |
Removing special handling (allowance) for self-deprecating uses of the word 'retarded' from the filter. All bad words are now, once again, equal.
| -rw-r--r-- | bot/cogs/filtering.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py index 25aaf8420..418297fc4 100644 --- a/bot/cogs/filtering.py +++ b/bot/cogs/filtering.py @@ -27,9 +27,6 @@ INVITE_RE = ( URL_RE = r"(https?://[^\s]+)" ZALGO_RE = r"[\u0300-\u036F\u0489]" -RETARDED_RE = r"(re+)tar+(d+|t+)(ed)?" -SELF_DEPRECATION_RE = fr"((i'?m)|(i am)|(it'?s)|(it is)) (.+? )?{RETARDED_RE}" -RETARDED_QUESTIONS_RE = fr"{RETARDED_RE} questions?" class Filtering: @@ -237,18 +234,6 @@ class Filtering: for expression in Filter.word_watchlist: if re.search(fr"\b{expression}\b", text, re.IGNORECASE): - - # Special handling for `retarded` - if expression == RETARDED_RE: - - # stuff like "I'm just retarded" - if re.search(SELF_DEPRECATION_RE, text, re.IGNORECASE): - return False - - # stuff like "sorry for all the retarded questions" - elif re.search(RETARDED_QUESTIONS_RE, text, re.IGNORECASE): - return False - return True return False |