From 7e45d6492c712f7dfa5748a7da24e7843cf6de0c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 2 Dec 2021 22:29:38 +0200 Subject: [PATCH] fdfds --- files/routes/comments.py | 28 +++++++++++++-------------- files/routes/posts.py | 42 ++++++++++++++++++++-------------------- files/routes/settings.py | 4 ++-- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 4311ca3a3..a895bb294 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -548,16 +548,16 @@ def api_comment(v): if user.id != v.id: notify_users.add(user.id) if request.host == 'pcmemes.net': - if 'kippy' in body_html.lower() and 1592 not in notify_users: notify_users.add(1592) - if ('aevan' in body_html.lower() or 'avean' in body_html.lower()) and 1 not in notify_users: notify_users.add(1) + if 'kippy' in body_html.lower() and 1592 not in notify_users and v.id != 1592: notify_users.add(1592) + if ('aevan' in body_html.lower() or 'avean' in body_html.lower()) and 1 not in notify_users and v.id != 1: notify_users.add(1) if request.host == 'rdrama.net': - if ('aevan' in body_html.lower() or 'avean' in body_html.lower()) and 1 not in notify_users: notify_users.add(1) - if ('joan' in body_html.lower() or 'pewkie' in body_html.lower()) and 28 not in notify_users: notify_users.add(28) - if 'carp' in body_html.lower() and 995 not in notify_users: + if ('aevan' in body_html.lower() or 'avean' in body_html.lower()) and 1 not in notify_users and v.id != 1: notify_users.add(1) + if ('joan' in body_html.lower() or 'pewkie' in body_html.lower()) and 28 not in notify_users and v.id != 28: notify_users.add(28) + if 'carp' in body_html.lower() and 995 not in notify_users and v.id != 995: notify_users.add(995) notify_users.add(541) - if ('idio3' in body_html.lower() or 'idio ' in body_html.lower()) and 30 not in notify_users: notify_users.add(30) - if any(x in body_html.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users: notify_users.add(253) + if ('idio3' in body_html.lower() or 'idio ' in body_html.lower()) and 30 not in notify_users and v.id != 30: notify_users.add(30) + if any(x in body_html.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users and v.id != 253: notify_users.add(253) for x in notify_users: n = Notification(comment_id=c.id, user_id=x) @@ -821,16 +821,16 @@ def edit_comment(cid, v): if user.id != v.id: notify_users.add(user.id) if request.host == 'pcmemes.net': - if 'kippy' in body_html.lower() and 1592 not in notify_users: notify_users.add(1592) - if ('aevan' in body_html.lower() or 'avean' in body_html.lower()) and 1 not in notify_users: notify_users.add(1) + if 'kippy' in body_html.lower() and 1592 not in notify_users and v.id != 1592: notify_users.add(1592) + if ('aevan' in body_html.lower() or 'avean' in body_html.lower()) and 1 not in notify_users and v.id != 1: notify_users.add(1) if request.host == 'rdrama.net': - if ('aevan' in body_html.lower() or 'avean' in body_html.lower()) and 1 not in notify_users: notify_users.add(1) - if ('joan' in body_html.lower() or 'pewkie' in body_html.lower()) and 28 not in notify_users: notify_users.add(28) - if 'carp' in body_html.lower() and 995 not in notify_users: + if ('aevan' in body_html.lower() or 'avean' in body_html.lower()) and 1 not in notify_users and v.id != 1: notify_users.add(1) + if ('joan' in body_html.lower() or 'pewkie' in body_html.lower()) and 28 not in notify_users and v.id != 28: notify_users.add(28) + if 'carp' in body_html.lower() and 995 not in notify_users and v.id != 995: notify_users.add(995) notify_users.add(541) - if ('idio3' in body_html.lower() or 'idio ' in body_html.lower()) and 30 not in notify_users: notify_users.add(30) - if any(x in body_html.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users: notify_users.add(253) + if ('idio3' in body_html.lower() or 'idio ' in body_html.lower()) and 30 not in notify_users and v.id != 30: notify_users.add(30) + if any(x in body_html.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users and v.id != 253: notify_users.add(253) for x in notify_users: notif = g.db.query(Notification).filter_by(comment_id=c.id, user_id=x).first() diff --git a/files/routes/posts.py b/files/routes/posts.py index 6257ba8cb..6176979d9 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -63,16 +63,16 @@ def publish(pid, v): if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user.id) if request.host == 'pcmemes.net': - if 'kippy' in f'{post.body_html}{post.title}'.lower() and 1592 not in notify_users: notify_users.add(1592) - if ('aevan' in f'{post.body_html}{post.title}'.lower() or 'avean' in f'{post.body_html}{post.title}'.lower()) and 1 not in notify_users: notify_users.add(1) + if 'kippy' in f'{post.body_html}{post.title}'.lower() and 1592 not in notify_users and v.id != 1592: notify_users.add(1592) + if ('aevan' in f'{post.body_html}{post.title}'.lower() or 'avean' in f'{post.body_html}{post.title}'.lower()) and 1 not in notify_users and v.id != 1: notify_users.add(1) if request.host == 'rdrama.net': - if ('aevan' in f'{post.body_html}{post.title}'.lower() or 'avean' in f'{post.body_html}{post.title}'.lower()) and 1 not in notify_users: notify_users.add(1) - if ('joan' in f'{post.body_html}{post.title}'.lower() or 'pewkie' in f'{post.body_html}{post.title}'.lower()) and 28 not in notify_users: notify_users.add(28) - if 'carp' in f'{post.body_html}{post.title}'.lower() and 995 not in notify_users: + if ('aevan' in f'{post.body_html}{post.title}'.lower() or 'avean' in f'{post.body_html}{post.title}'.lower()) and 1 not in notify_users and v.id != 1: notify_users.add(1) + if ('joan' in f'{post.body_html}{post.title}'.lower() or 'pewkie' in f'{post.body_html}{post.title}'.lower()) and 28 not in notify_users and v.id != 28: notify_users.add(28) + if 'carp' in f'{post.body_html}{post.title}'.lower() and 995 not in notify_users and v.id != 995: notify_users.add(995) notify_users.add(541) - if ('idio3' in f'{post.body_html}{post.title}'.lower() or 'idio ' in f'{post.body_html}{post.title}'.lower()) and 30 not in notify_users: notify_users.add(30) - if any(x in f'{post.body_html}{post.title}'.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users: notify_users.add(253) + if ('idio3' in f'{post.body_html}{post.title}'.lower() or 'idio ' in f'{post.body_html}{post.title}'.lower()) and 30 not in notify_users and v.id != 30: notify_users.add(30) + if any(x in f'{post.body_html}{post.title}'.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users and v.id != 253: notify_users.add(253) for x in notify_users: send_notification(x, f"@{v.username} has mentioned you: http://{site}{post.permalink}") @@ -383,16 +383,16 @@ def edit_post(pid, v): message = f"@{v.username} has mentioned you: http://{site}{p.permalink}" if request.host == 'pcmemes.net': - if 'kippy' in f'{body_html}{title}'.lower() and 1592 not in notify_users: notify_users.add(1592) - if ('aevan' in f'{body_html}{title}'.lower() or 'avean' in f'{body_html}{title}'.lower()) and 1 not in notify_users: notify_users.add(1) + if 'kippy' in f'{body_html}{title}'.lower() and 1592 not in notify_users and v.id != 1592: notify_users.add(1592) + if ('aevan' in f'{body_html}{title}'.lower() or 'avean' in f'{body_html}{title}'.lower()) and 1 not in notify_users and v.id != 1: notify_users.add(1) if request.host == 'rdrama.net': - if ('aevan' in f'{body_html}{title}'.lower() or 'avean' in f'{body_html}{title}'.lower()) and 1 not in notify_users: notify_users.add(1) - if ('joan' in f'{body_html}{title}'.lower() or 'pewkie' in f'{body_html}{title}'.lower()) and 28 not in notify_users: notify_users.add(28) - if 'carp' in f'{body_html}{title}'.lower() and 995 not in notify_users: + if ('aevan' in f'{body_html}{title}'.lower() or 'avean' in f'{body_html}{title}'.lower()) and 1 not in notify_users and v.id != 1: notify_users.add(1) + if ('joan' in f'{body_html}{title}'.lower() or 'pewkie' in f'{body_html}{title}'.lower()) and 28 not in notify_users and v.id != 28: notify_users.add(28) + if 'carp' in f'{body_html}{title}'.lower() and 995 not in notify_users and v.id != 995: notify_users.add(995) notify_users.add(541) - if ('idio3' in f'{body_html}{title}'.lower() or 'idio ' in f'{body_html}{title}'.lower()) and 30 not in notify_users: notify_users.add(30) - if any(x in f'{body_html}{title}'.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users: notify_users.add(253) + if ('idio3' in f'{body_html}{title}'.lower() or 'idio ' in f'{body_html}{title}'.lower()) and 30 not in notify_users and v.id != 30: notify_users.add(30) + if any(x in f'{body_html}{title}'.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users and v.id != 253: notify_users.add(253) for x in notify_users: send_notification(x, message) @@ -878,16 +878,16 @@ def submit_post(v): if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user.id) if request.host == 'pcmemes.net': - if 'kippy' in f'{body_html}{title}'.lower() and 1592 not in notify_users: notify_users.add(1592) - if ('aevan' in f'{body_html}{title}'.lower() or 'avean' in f'{body_html}{title}'.lower()) and 1 not in notify_users: notify_users.add(1) + if 'kippy' in f'{body_html}{title}'.lower() and 1592 not in notify_users and v.id != 1592: notify_users.add(1592) + if ('aevan' in f'{body_html}{title}'.lower() or 'avean' in f'{body_html}{title}'.lower()) and 1 not in notify_users and v.id != 1: notify_users.add(1) if request.host == 'rdrama.net': - if ('aevan' in f'{body_html}{title}'.lower() or 'avean' in f'{body_html}{title}'.lower()) and 1 not in notify_users: notify_users.add(1) - if ('joan' in f'{body_html}{title}'.lower() or 'pewkie' in f'{body_html}{title}'.lower()) and 28 not in notify_users: notify_users.add(28) - if 'carp' in f'{body_html}{title}'.lower() and 995 not in notify_users: + if ('aevan' in f'{body_html}{title}'.lower() or 'avean' in f'{body_html}{title}'.lower()) and 1 not in notify_users and v.id != 1: notify_users.add(1) + if ('joan' in f'{body_html}{title}'.lower() or 'pewkie' in f'{body_html}{title}'.lower()) and 28 not in notify_users and v.id != 28: notify_users.add(28) + if 'carp' in f'{body_html}{title}'.lower() and 995 not in notify_users and v.id != 995: notify_users.add(995) notify_users.add(541) - if ('idio3' in f'{body_html}{title}'.lower() or 'idio ' in f'{body_html}{title}'.lower()) and 30 not in notify_users: notify_users.add(30) - if any(x in f'{body_html}{title}'.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users: notify_users.add(253) + if ('idio3' in f'{body_html}{title}'.lower() or 'idio ' in f'{body_html}{title}'.lower()) and 30 not in notify_users and v.id != 30: notify_users.add(30) + if any(x in f'{body_html}{title}'.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users and v.id != 253: notify_users.add(253) for x in notify_users: send_notification(x, f"@{v.username} has mentioned you: http://{site}{new_post.permalink}") diff --git a/files/routes/settings.py b/files/routes/settings.py index fda9a962c..abf7240e9 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -247,7 +247,7 @@ def settings_profile_post(v): user = g.db.query(User).filter_by(username=username).first() if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user.id) - if request.host == 'rdrama.net' and ('aevan' in friends_html.lower() or 'avean' in friends_html.lower()) and 1 not in notify_users: notify_users.add(1) + if request.host == 'rdrama.net' and ('aevan' in friends_html.lower() or 'avean' in friends_html.lower()) and 1 not in notify_users and v.id != 1: notify_users.add(1) for x in notify_users: message = f"@{v.username} has added you to their friends list!" @@ -291,7 +291,7 @@ def settings_profile_post(v): user = g.db.query(User).filter_by(username=username).first() if user and not v.any_block_exists(user) and user.id != v.id: notify_users.add(user.id) - if request.host == 'rdrama.net' and ('aevan' in enemies_html.lower() or 'avean' in enemies_html.lower()) and 1 not in notify_users: notify_users.add(1) + if request.host == 'rdrama.net' and ('aevan' in enemies_html.lower() or 'avean' in enemies_html.lower()) and 1 not in notify_users and v.id != 1: notify_users.add(1) for x in notify_users: message = f"@{v.username} has added you to their enemies list!"