Merge branch 'master' into mistletoe

master
kek7198 2021-11-29 21:26:27 -06:00
commit 193452eba7
5 changed files with 20 additions and 8 deletions

View File

@ -547,8 +547,11 @@ 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 == '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 ('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 +819,11 @@ 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 == '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 ('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)

View File

@ -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:

View File

@ -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/<post_id>/<new>")
@limiter.limit("5/second;60/minute;200/hour")
@auth_required
@validate_formkey
def api_vote_post(post_id, new, v):

View File

@ -2,4 +2,4 @@ git pull
git add .
git commit -m "sneed"
git push
. /media/a/Files/1
. 'D:\1.sh'

View File

@ -1,3 +1,4 @@
git add .
git commit -m "force push"
git push --force
git push --force
. 'D:\1.sh'