From 3811babd75169ea758318958c479c3be598e266d Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 6 Aug 2023 10:42:31 +0300 Subject: [PATCH] discord changed their username scheme --- files/helpers/regex.py | 2 -- files/helpers/sanitize.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/files/helpers/regex.py b/files/helpers/regex.py index f2d147823..7ae3fec83 100644 --- a/files/helpers/regex.py +++ b/files/helpers/regex.py @@ -220,8 +220,6 @@ def command_regex_matcher(match, upper=False): reason_regex_post = re.compile('(/post/[0-9]+)', flags=re.A) reason_regex_comment = re.compile('(/comment/[0-9]+)', flags=re.A) -discord_username_regex = re.compile("(\s|^|>).{2,32}#[0-9]{4}(?=[^0-9]|$)", flags=re.A) - numbered_list_regex = re.compile('((\s|^)[0-9]+)\. ', flags=re.A) image_link_regex = re.compile(f"https://(i\.)?{SITE}\/(chat_)?images\/[0-9]{{11,17}}r?\.webp", flags=re.A) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index cb044c1ee..63b1817e2 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -532,8 +532,6 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis if g.v and g.v.admin_level >= PERMS["IGNORE_DOMAIN_BAN"]: banned_domains = [] else: - if discord_username_regex.match(sanitized): - return error("Stop grooming!") banned_domains = [x.domain for x in g.db.query(BannedDomain.domain).all()] for link in links: