forked from rDrama/rDrama
revise my exceptions
parent
b350a152bc
commit
9c64b891e5
|
@ -698,7 +698,8 @@ class User(Base):
|
|||
@property
|
||||
@lazy
|
||||
def modaction_notifications_count(self):
|
||||
if self.id == AEVANN_ID and SITE_NAME != 'rDrama': return 0
|
||||
if self.id == AEVANN_ID and SITE_NAME != 'rDrama':
|
||||
return 0
|
||||
|
||||
if self.admin_level:
|
||||
q = g.db.query(ModAction).filter(
|
||||
|
@ -726,7 +727,8 @@ class User(Base):
|
|||
@property
|
||||
@lazy
|
||||
def reddit_notifications_count(self):
|
||||
if not self.can_view_offsitementions or self.id == AEVANN_ID: return 0
|
||||
if not self.can_view_offsitementions:
|
||||
return 0
|
||||
return g.db.query(Comment).filter(
|
||||
Comment.created_utc > self.last_viewed_reddit_notifs,
|
||||
Comment.is_banned == False, Comment.deleted_utc == 0,
|
||||
|
|
|
@ -644,9 +644,6 @@ def messagereply(v:User):
|
|||
if top_comment.sentto == MODMAIL_ID:
|
||||
admins = g.db.query(User.id).filter(User.admin_level >= PERMS['NOTIFICATIONS_MODMAIL'], User.id != v.id)
|
||||
|
||||
if SITE == 'rdrama.net':
|
||||
admins = admins.filter(User.id != AEVANN_ID)
|
||||
|
||||
admins = [x[0] for x in admins.all()]
|
||||
|
||||
if parent.author.id not in admins + [v.id]:
|
||||
|
|
|
@ -75,7 +75,7 @@ def get_logged_in_user():
|
|||
|
||||
if SITE == 'rdrama.net' and request.headers.get("Cf-Ipcountry") == 'EG':
|
||||
if v:
|
||||
if v.id != AEVANN_ID and not v.username.startswith('Aev'):
|
||||
if v.id != AEVANN_ID:
|
||||
ip = request.headers.get('CF-Connecting-IP')
|
||||
text = f'@{v.username}: {ip}'
|
||||
send_notification(AEVANN_ID, text)
|
||||
|
|
Loading…
Reference in New Issue