From a7347f4a0b88abba47d5490249791880cb5e614f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 28 Nov 2021 16:51:31 +0200 Subject: [PATCH] dfdf\ --- files/routes/comments.py | 4 ++++ files/routes/posts.py | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index fd22f7656..844798302 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -547,6 +547,8 @@ def api_comment(v): if v.any_block_exists(user): continue 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 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': @@ -817,6 +819,8 @@ def edit_comment(cid, v): if v.any_block_exists(user): continue 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 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': diff --git a/files/routes/posts.py b/files/routes/posts.py index 104986ec6..5c692250b 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -57,10 +57,11 @@ def publish(pid, v): username = mention["href"].split("@")[1] 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 == '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 ('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: @@ -363,9 +364,10 @@ 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 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 ('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: @@ -846,9 +848,10 @@ def submit_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 == '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 ('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: