aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-09-16 14:51:51 -0700
committerFuwn <[email protected]>2025-09-16 14:51:51 -0700
commit64b88e531f7866feae3ca4263cc0aebb3c6b335a (patch)
treec36cb729e5ad28ad5d934eb2a27ac8a55dac0682 /src
parentfeat(spam_detector): Use UTC time as limit reset time (diff)
downloadumabot-64b88e531f7866feae3ca4263cc0aebb3c6b335a.tar.xz
umabot-64b88e531f7866feae3ca4263cc0aebb3c6b335a.zip
feat(roleplay_limiter): Lower surge thresholds
Diffstat (limited to 'src')
-rw-r--r--src/umabot/config.py12
-rw-r--r--src/umabot/rules/roleplay_limiter.py8
2 files changed, 10 insertions, 10 deletions
diff --git a/src/umabot/config.py b/src/umabot/config.py
index 7f635f1..a58c446 100644
--- a/src/umabot/config.py
+++ b/src/umabot/config.py
@@ -34,9 +34,9 @@ class Config:
dry_run: bool = False
# Surge-based roleplay limiting
- 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
+ roleplay_surge_threshold_1: int = 25 # First threshold for surge detection
+ roleplay_surge_threshold_2: int = 45 # Second threshold for surge detection
+ roleplay_surge_threshold_3: int = 70 # Third threshold for surge detection
@classmethod
def from_env(cls) -> "Config":
@@ -58,9 +58,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", "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")),
+ roleplay_surge_threshold_1=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_1", "25")),
+ roleplay_surge_threshold_2=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_2", "45")),
+ roleplay_surge_threshold_3=int(os.getenv("ROLEPLAY_SURGE_THRESHOLD_3", "70")),
)
def validate(self) -> None:
diff --git a/src/umabot/rules/roleplay_limiter.py b/src/umabot/rules/roleplay_limiter.py
index ea83cd1..cc261fa 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 = 10 # Base limit when no surge (maximum posts per user)
+ self.base_limit = 6 # Base limit when no surge (maximum posts per user)
self.surge_thresholds = [
- (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
+ (config.roleplay_surge_threshold_1, 4), # First threshold = 4 posts per user
+ (config.roleplay_surge_threshold_2, 2), # Second threshold = 2 posts per user
+ (config.roleplay_surge_threshold_3, 1), # Third threshold = 1 post per user
]
def should_remove(self, submission: praw.models.Submission) -> bool: