From 425834301ee7dd78ec45fe753f07146900b5a49c Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 22 Jul 2023 20:44:21 +0300 Subject: [PATCH] do this https://rdrama.net/h/chudrama/post/188663/-/4606229#context --- files/helpers/actions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/files/helpers/actions.py b/files/helpers/actions.py index 8513b49dda..97da408bb4 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -60,7 +60,11 @@ def execute_snappy(post:Post, v:User): ping_cost = None - if v.id == CARP_ID: + post_ping_group_count = len(list(group_mention_regex.finditer(post.body))) + + if post_ping_group_count > 3: + body = "Unnecessary and uncalled for ping :marseydownvotemad: two more strikes and you're getting blocked + megadownvoted buddy, don't test your luck" + elif v.id == CARP_ID: if random.random() < 0.02: body = "i love you carp" elif random.random() < 0.02: