forked from rDrama/rDrama
Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost
commit
dfcf55b351
|
@ -88,6 +88,10 @@ def add_notif(cid, uid):
|
||||||
|
|
||||||
|
|
||||||
def NOTIFY_USERS(text, v):
|
def NOTIFY_USERS(text, v):
|
||||||
|
# Restrict young accounts from generating notifications
|
||||||
|
if v.age < NOTIFICATION_SPAM_AGE_THRESHOLD:
|
||||||
|
return set()
|
||||||
|
|
||||||
notify_users = set()
|
notify_users = set()
|
||||||
for word, id in NOTIFIED_USERS.items():
|
for word, id in NOTIFIED_USERS.items():
|
||||||
if id == 0 or v.id == id: continue
|
if id == 0 or v.id == id: continue
|
||||||
|
|
|
@ -168,6 +168,7 @@ PIN_LIMIT = 3
|
||||||
POST_RATE_LIMIT = '1/second;2/minute;10/hour;50/day'
|
POST_RATE_LIMIT = '1/second;2/minute;10/hour;50/day'
|
||||||
LOGGEDIN_ACTIVE_TIME = 15 * 60
|
LOGGEDIN_ACTIVE_TIME = 15 * 60
|
||||||
PFP_DEFAULT_MARSEY = True
|
PFP_DEFAULT_MARSEY = True
|
||||||
|
NOTIFICATION_SPAM_AGE_THRESHOLD = 3 * 86400
|
||||||
|
|
||||||
HOLE_NAME = 'hole'
|
HOLE_NAME = 'hole'
|
||||||
HOLE_STYLE_FLAIR = False
|
HOLE_STYLE_FLAIR = False
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from files.cli import g, app, db_session
|
from files.cli import g, app, db_session
|
||||||
import click
|
import click
|
||||||
from files.helpers.const import *
|
from files.helpers.const import *
|
||||||
|
from files.helpers.alerts import send_repeatable_notification
|
||||||
from files.classes import *
|
from files.classes import *
|
||||||
|
|
||||||
import files.helpers.lottery as lottery
|
import files.helpers.lottery as lottery
|
||||||
|
@ -48,6 +49,7 @@ def sub_inactive_purge_task():
|
||||||
one_week_ago = time.time() - 604800
|
one_week_ago = time.time() - 604800
|
||||||
active_holes = [x[0] for x in g.db.query(Submission.sub).distinct() \
|
active_holes = [x[0] for x in g.db.query(Submission.sub).distinct() \
|
||||||
.filter(Submission.sub != None, Submission.created_utc > one_week_ago).all()]
|
.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()
|
dead_holes = g.db.query(Sub).filter(Sub.name.notin_(active_holes)).all()
|
||||||
names = [x.name for x in dead_holes]
|
names = [x.name for x in dead_holes]
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{"Bots": true, "Fart mode": false, "Read-only mode": false, "Signups": true}
|
{"Bots": true, "Fart mode": true, "Read-only mode": false, "Signups": true}
|
Loading…
Reference in New Issue