From c7e349c55807528819bf15ac7ee0908fe1266c7d Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 27 Nov 2021 21:41:37 +0200 Subject: [PATCH 1/4] fdsfsd --- files/routes/votes.py | 2 ++ push.sh | 2 +- pushforce.sh | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/files/routes/votes.py b/files/routes/votes.py index bc3f59e3c..46500832d 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -8,6 +8,7 @@ from sqlalchemy.orm import joinedload from .front import frontlist @app.get("/votes") +@limiter.limit("5/second;60/minute;200/hour") @auth_desired def admin_vote_info_get(v): @@ -59,6 +60,7 @@ def admin_vote_info_get(v): @app.post("/vote/post//") +@limiter.limit("5/second;60/minute;200/hour") @auth_required @validate_formkey def api_vote_post(post_id, new, v): diff --git a/push.sh b/push.sh index 64da5305b..e5639e0a7 100644 --- a/push.sh +++ b/push.sh @@ -2,4 +2,4 @@ git pull git add . git commit -m "sneed" git push -. /media/a/Files/1 +. 'D:\1.sh' \ No newline at end of file diff --git a/pushforce.sh b/pushforce.sh index 1181e0ef2..0f8016366 100644 --- a/pushforce.sh +++ b/pushforce.sh @@ -1,3 +1,4 @@ git add . git commit -m "force push" -git push --force \ No newline at end of file +git push --force +. 'D:\1.sh' \ No newline at end of file From fc9be66fb48924635e2f0576694f7c9d8a46d4d6 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 28 Nov 2021 09:24:04 +0200 Subject: [PATCH 2/4] gfhf --- files/routes/comments.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 77f441237..fd22f7656 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -547,8 +547,9 @@ def api_comment(v): if v.any_block_exists(user): continue if user.id != v.id: notify_users.add(user.id) - if request.host == 'rdrama.net': + 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 ('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) @@ -816,8 +817,9 @@ 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 == 'rdrama.net': + 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 ('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) From 339c3f2dcaa8d1eccb4da4b5e7c83d7b990a9837 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 28 Nov 2021 09:59:22 +0200 Subject: [PATCH 3/4] fdsdf --- files/templates/submission.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/templates/submission.html b/files/templates/submission.html index 3ced44fea..7eb9abab2 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -646,7 +646,7 @@ {% endif %} {% if v and v.admin_level > 1 %} Pin - Unpin + Unpin {% if v==p.author %} Distinguish Undistinguish From a7347f4a0b88abba47d5490249791880cb5e614f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 28 Nov 2021 16:51:31 +0200 Subject: [PATCH 4/4] 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: