aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Sebastiaan Zeeff <[email protected]>2020-09-04 20:05:03 +0200
committerGravatar Sebastiaan Zeeff <[email protected]>2020-09-04 20:05:03 +0200
commit1512dcc994dfacd0995a93320efc001550f15212 (patch)
treeb103e66d76ed0718d4fc748ea57c4cd64d05e3c0
parentMerge pull request #1132 from python-discord/bug/filters/1130/ignore-codebloc... (diff)
Disable burst_shared filter of the AntiSpam cog
Our AntiSpam cog suffers from a race condition that causes it to try and infract the same user multiple times. As that happens frequently with the burst_shared filter, it means that our bot joins in and starts spamming the channel with error messages. Another issue is that burst_shared may cause our bot to send a lot of DMs to a lot of different members. This caused our bot to get a DM ban from Discord after a recent `everyone` ping incident. I've decided to disable the `burst_shared` filter by commenting out the relevant lines but leave the code in place otherwise. This means we still have the implementation handy in case we want to re-enable it on short notice. Signed-off-by: Sebastiaan Zeeff <[email protected]>
-rw-r--r--bot/cogs/antispam.py3
-rw-r--r--config-default.yml10
2 files changed, 9 insertions, 4 deletions
diff --git a/bot/cogs/antispam.py b/bot/cogs/antispam.py
index d003f962b..b8939113f 100644
--- a/bot/cogs/antispam.py
+++ b/bot/cogs/antispam.py
@@ -27,7 +27,8 @@ log = logging.getLogger(__name__)
RULE_FUNCTION_MAPPING = {
'attachments': rules.apply_attachments,
'burst': rules.apply_burst,
- 'burst_shared': rules.apply_burst_shared,
+ # burst shared is temporarily disabled due to a bug
+ # 'burst_shared': rules.apply_burst_shared,
'chars': rules.apply_chars,
'discord_emojis': rules.apply_discord_emojis,
'duplicates': rules.apply_duplicates,
diff --git a/config-default.yml b/config-default.yml
index 766f7050c..e9324c62f 100644
--- a/config-default.yml
+++ b/config-default.yml
@@ -352,9 +352,13 @@ anti_spam:
interval: 10
max: 7
- burst_shared:
- interval: 10
- max: 20
+ # Burst shared it (temporarily) disabled to prevent
+ # the bug that triggers multiple infractions/DMs per
+ # user. It also tends to catch a lot of innocent users
+ # now that we're so big.
+ # burst_shared:
+ # interval: 10
+ # max: 20
chars:
interval: 5