expand 593b74c969 + make AEVANN_ID default 0

remotes/1693045480750635534/spooky-22
Aevann1 2022-08-13 05:11:44 +02:00
parent d4f996a5a6
commit d0083b579f
3 changed files with 8 additions and 8 deletions

View File

@ -206,7 +206,7 @@ IDIO_ID = 0
CARP_ID = 0
JOAN_ID = 0
MOOSE_ID = 0
AEVANN_ID = 5
AEVANN_ID = 0
SNAKES_ID = 0
HOMO_ID = 0
SOREN_ID = 0
@ -216,8 +216,6 @@ MOM_ID = 0
DONGER_ID = 0
GEESE_ID = 0
GIFT_NOTIF_ID = CARP_ID if CARP_ID else AEVANN_ID
BUG_THREAD = 0
POLL_THREAD = 0
WELCOME_MSG = f"Welcome to {SITE_NAME}!"
@ -379,6 +377,10 @@ else: # localhost or testing environment implied
FEATURES['HOUSES'] = True
FEATURES['REPOST_DETECTION'] = False
if CARP_ID: GIFT_NOTIF_ID = CARP_ID
elif AEVANN_ID: GIFT_NOTIF_ID = AEVANN_ID
else: GIFT_NOTIF_ID = 5
bots = {AUTOJANNY_ID, SNAPPY_ID, LONGPOSTBOT_ID, ZOZBOT_ID, BASEDBOT_ID}
IMGUR_KEY = environ.get("IMGUR_KEY").strip()

View File

@ -212,7 +212,7 @@ def submit_contact(v):
g.db.flush()
new_comment.top_comment_id = new_comment.id
for admin in g.db.query(User).filter(User.admin_level > 2).all():
for admin in g.db.query(User).filter(User.admin_level > 2, User.id != AEVANN_ID).all():
notif = Notification(comment_id=new_comment.id, user_id=admin.id)
g.db.add(notif)

View File

@ -789,13 +789,11 @@ def messagereply(v):
if c.top_comment.sentto == 2:
admins = [x[0] for x in g.db.query(User.id).filter(User.admin_level > 2, User.id != v.id).all()]
admins = [x[0] for x in g.db.query(User.id).filter(User.admin_level > 2, User.id != v.id, User.id != AEVANN_ID).all()]
if parent.author.id not in admins:
admins.append(parent.author.id)
if CARP_ID and AEVANN_ID in admins:
admins.remove(AEVANN_ID)
for admin in admins:
notif = Notification(comment_id=c.id, user_id=admin)
g.db.add(notif)