From f821bddd56ada9195d2b761d6da43b76ca0212a7 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 7 Sep 2025 03:46:42 -0700 Subject: feat(roleplay_limiter): Increase limits --- src/umabot/config.py | 12 ++++++------ src/umabot/rules/roleplay_limiter.py | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/umabot/config.py b/src/umabot/config.py index 8748693..f86bed5 100644 --- a/src/umabot/config.py +++ b/src/umabot/config.py @@ -35,9 +35,9 @@ class Config: dry_run: bool = False # Surge-based roleplay limiting - roleplay_surge_threshold_1: int = 20 # First threshold for surge detection - roleplay_surge_threshold_2: int = 40 # Second threshold for surge detection - roleplay_surge_threshold_3: int = 60 # Third threshold for surge detection + roleplay_surge_threshold_1: int = 30 # First threshold for surge detection + roleplay_surge_threshold_2: int = 60 # Second threshold for surge detection + roleplay_surge_threshold_3: int = 90 # Third threshold for surge detection @classmethod def from_env(cls) -> "Config": @@ -63,9 +63,9 @@ class Config: post_limit_window_hours=int(os.getenv("POST_LIMIT_WINDOW_HOURS", "24")), roleplay_limit_window_hours=int(os.getenv("ROLEPLAY_LIMIT_WINDOW_HOURS", "24")), dry_run=os.getenv("DRY_RUN", "false").lower() == "true", - roleplay_surge_threshold_1=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_1", "20")), - roleplay_surge_threshold_2=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_2", "40")), - roleplay_surge_threshold_3=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_3", "60")), + roleplay_surge_threshold_1=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_1", "30")), + roleplay_surge_threshold_2=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_2", "60")), + roleplay_surge_threshold_3=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_3", "90")), ) def validate(self) -> None: diff --git a/src/umabot/rules/roleplay_limiter.py b/src/umabot/rules/roleplay_limiter.py index 5aea520..5b5b2b6 100644 --- a/src/umabot/rules/roleplay_limiter.py +++ b/src/umabot/rules/roleplay_limiter.py @@ -18,11 +18,11 @@ class RoleplayLimiter(Rule): self.roleplay_flair = "Roleplay" # Surge-based limits configuration - self.base_limit = 5 # Base limit when no surge (maximum posts per user) + self.base_limit = 10 # Base limit when no surge (maximum posts per user) self.surge_thresholds = [ - (config.roleplay_surge_threshold_1, 3), # First threshold = 3 posts per user - (config.roleplay_surge_threshold_2, 1), # Second threshold = 1 post per user - (config.roleplay_surge_threshold_3, 0), # Third threshold = 0 posts per user (block all) + (config.roleplay_surge_threshold_1, 7), # First threshold = 7 posts per user + (config.roleplay_surge_threshold_2, 4), # Second threshold = 4 posts per user + (config.roleplay_surge_threshold_3, 2), # Third threshold = 2 posts per user ] def should_remove(self, submission: praw.models.Submission) -> bool: -- cgit v1.2.3