From f6e87fae8a5a866c26e1467b06a2ec8540c31a88 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 2 Dec 2021 20:54:44 +0200 Subject: [PATCH] sdffsd --- files/routes/comments.py | 6 ++++-- files/routes/posts.py | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 292c84ebf..733c5cb3d 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -549,14 +549,15 @@ def api_comment(v): if request.host == 'pcmemes.net': if 'kippy' in body_html.lower() and 1592 not in notify_users: notify_users.add(1592) - if request.host in ['rdrama.net','pcmemes.net']: if ('aevan' in body_html.lower() or 'avean' in body_html.lower()) and 1 not in notify_users: 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: 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 (x in body_html.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users: notify_users.add(253) for x in notify_users: n = Notification(comment_id=c.id, user_id=x) @@ -821,14 +822,15 @@ def edit_comment(cid, v): if request.host == 'pcmemes.net': if 'kippy' in body_html.lower() and 1592 not in notify_users: notify_users.add(1592) - if request.host in ['rdrama.net','pcmemes.net']: if ('aevan' in body_html.lower() or 'avean' in body_html.lower()) and 1 not in notify_users: 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: 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 (x in body_html.lower() for x in ('landlord_messiah', 'landlordmessiah', ' llm ', 'landlet')) and 253 not in notify_users: 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 807d3cb95..205faff14 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -64,14 +64,15 @@ def publish(pid, v): 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 request.host in ['rdrama.net','pcmemes.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 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: 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 (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) for x in notify_users: send_notification(x, f"@{v.username} has mentioned you: http://{site}{post.permalink}") @@ -383,14 +384,15 @@ def edit_post(pid, v): if request.host == 'pcmemes.net': if 'kippy' in f'{body_html}{title}'.lower() and 1592 not in notify_users: notify_users.add(1592) - if request.host in ['rdrama.net','pcmemes.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 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: 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 (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) for x in notify_users: send_notification(x, message) @@ -877,14 +879,15 @@ def submit_post(v): if request.host == 'pcmemes.net': if 'kippy' in f'{body_html}{title}'.lower() and 1592 not in notify_users: notify_users.add(1592) - if request.host in ['rdrama.net','pcmemes.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 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: 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 (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) for x in notify_users: send_notification(x, f"@{v.username} has mentioned you: http://{site}{new_post.permalink}")