forked from rDrama/rDrama
1
0
Fork 0

fgMerge branch 'frost' of https://github.com/Aevann1/Drama into frost

master
Aevann1 2022-02-08 19:05:12 +00:00
commit 3fc5bcafb0
2 changed files with 4 additions and 1 deletions

View File

@ -138,7 +138,7 @@ AGENDAPOSTER_MSG = """Hi @{username},\n\nYour {type} has been automatically remo
included. \n\n*This is an automated message; if you need help,
you can message us [here](/contact).*"""
if SITE_NAME == 'Drama':
if SITE_NAME in ('Drama','2Much4You'):
PW_ID = 3750
BASEDBOT_ID = 0
KIPPY_ID = 7150

View File

@ -341,6 +341,9 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
if (sort == "hot" or (v and v.id == Q_ID)) and page == 1 and ccmode == "false" and not gt and not lt:
pins = g.db.query(Submission).filter(Submission.stickied != None, Submission.is_banned == False)
if sub: pins = pins.filter_by(sub=sub.name)
elif SITE_NAME == '2Much4You': pins = pins.filter(Submission.sub != None)
else: pins = pins.filter_by(sub=None)
if v and v.admin_level == 0:
blocking = [x[0] for x in g.db.query(UserBlock.target_id).filter_by(user_id=v.id).all()]
blocked = [x[0] for x in g.db.query(UserBlock.user_id).filter_by(target_id=v.id).all()]