forked from rDrama/rDrama
1
0
Fork 0

Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost

master
Aevann1 2022-07-29 23:52:28 +02:00
commit dfcf55b351
4 changed files with 8 additions and 1 deletions

View File

@ -88,6 +88,10 @@ def add_notif(cid, uid):
def NOTIFY_USERS(text, v):
# Restrict young accounts from generating notifications
if v.age < NOTIFICATION_SPAM_AGE_THRESHOLD:
return set()
notify_users = set()
for word, id in NOTIFIED_USERS.items():
if id == 0 or v.id == id: continue

View File

@ -168,6 +168,7 @@ PIN_LIMIT = 3
POST_RATE_LIMIT = '1/second;2/minute;10/hour;50/day'
LOGGEDIN_ACTIVE_TIME = 15 * 60
PFP_DEFAULT_MARSEY = True
NOTIFICATION_SPAM_AGE_THRESHOLD = 3 * 86400
HOLE_NAME = 'hole'
HOLE_STYLE_FLAIR = False

View File

@ -1,6 +1,7 @@
from files.cli import g, app, db_session
import click
from files.helpers.const import *
from files.helpers.alerts import send_repeatable_notification
from files.classes import *
import files.helpers.lottery as lottery
@ -48,6 +49,7 @@ def sub_inactive_purge_task():
one_week_ago = time.time() - 604800
active_holes = [x[0] for x in g.db.query(Submission.sub).distinct() \
.filter(Submission.sub != None, Submission.created_utc > one_week_ago).all()]
active_holes.append('changelog') # system hole immune from deletion
dead_holes = g.db.query(Sub).filter(Sub.name.notin_(active_holes)).all()
names = [x.name for x in dead_holes]

View File

@ -1 +1 @@
{"Bots": true, "Fart mode": false, "Read-only mode": false, "Signups": true}
{"Bots": true, "Fart mode": true, "Read-only mode": false, "Signups": true}