From 912560327fcaeb6d8b661018c4475442af0768cf Mon Sep 17 00:00:00 2001 From: TLSM Date: Sun, 16 Oct 2022 16:18:49 -0400 Subject: [PATCH] Apply anti-grooming logic to chat. --- files/routes/chat.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/routes/chat.py b/files/routes/chat.py index 56a53b4d6a..f848dff6a6 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -86,6 +86,9 @@ def speak(data, v): if not v.is_banned: v.ban_reason = 'Blackjack' g.db.add(v) send_repeatable_notification(CARP_ID, f"{v.username} has been shadowbanned because of a chat message.") + elif ('discord.gg' in text or 'discord.com' in text or 'discordapp.com' in text): + # Follows same logic as in users.py:message2/messagereply; TODO: unify? + emit('speak', data) elif recipient: if user_ids_to_socket_ids.get(recipient): recipient_sid = user_ids_to_socket_ids[recipient]