sfd
This commit is contained in:
parent
e33c4ec93f
commit
12956c778c
5 changed files with 10 additions and 27 deletions
|
@ -76,6 +76,7 @@ SLURS = {
|
||||||
"sheeny": "Israeli friend",
|
"sheeny": "Israeli friend",
|
||||||
"sheenies": "Israeli friends",
|
"sheenies": "Israeli friends",
|
||||||
"hymie": "Israeli friend",
|
"hymie": "Israeli friend",
|
||||||
|
"god": "Allah (SWT)",
|
||||||
"allah": "Allah (SWT)",
|
"allah": "Allah (SWT)",
|
||||||
"mohammad": "Prophet Mohammad (PBUH)",
|
"mohammad": "Prophet Mohammad (PBUH)",
|
||||||
"muhammad": "Prophet Mohammad (PBUH)",
|
"muhammad": "Prophet Mohammad (PBUH)",
|
||||||
|
@ -83,7 +84,6 @@ SLURS = {
|
||||||
"dancing israelis": "i love Israel",
|
"dancing israelis": "i love Israel",
|
||||||
"sodomite": "total dreamboat",
|
"sodomite": "total dreamboat",
|
||||||
"pajeet": "sexy Indian dude",
|
"pajeet": "sexy Indian dude",
|
||||||
"female": "bleeder",
|
|
||||||
"landlord": "landchad",
|
"landlord": "landchad",
|
||||||
"tenant": "renthog",
|
"tenant": "renthog",
|
||||||
"renter": "rentoid",
|
"renter": "rentoid",
|
||||||
|
@ -131,8 +131,6 @@ if SITE in {'rdrama.net','devrama.xyz'}:
|
||||||
GIFT_NOTIF_ID = 995
|
GIFT_NOTIF_ID = 995
|
||||||
PIZZASHILL_ID = 2424
|
PIZZASHILL_ID = 2424
|
||||||
PIZZASHILLSHILL_ID = 9712
|
PIZZASHILLSHILL_ID = 9712
|
||||||
HIL_ID = 4245
|
|
||||||
CRAT_ID = 747
|
|
||||||
IDIO_ID = 30
|
IDIO_ID = 30
|
||||||
CARP_ID = 995
|
CARP_ID = 995
|
||||||
JOAN_ID = 28
|
JOAN_ID = 28
|
||||||
|
@ -163,8 +161,6 @@ elif SITE == "pcmemes.net":
|
||||||
PIZZASHILL_ID = 0
|
PIZZASHILL_ID = 0
|
||||||
PIZZASHILLSHILL_ID = 0
|
PIZZASHILLSHILL_ID = 0
|
||||||
GIFT_NOTIF_ID = 1592
|
GIFT_NOTIF_ID = 1592
|
||||||
HIL_ID = 0
|
|
||||||
CRAT_ID = 0
|
|
||||||
IDIO_ID = 0
|
IDIO_ID = 0
|
||||||
CARP_ID = 0
|
CARP_ID = 0
|
||||||
JOAN_ID = 0
|
JOAN_ID = 0
|
||||||
|
@ -195,8 +191,6 @@ else:
|
||||||
GIFT_NOTIF_ID = 9
|
GIFT_NOTIF_ID = 9
|
||||||
PIZZASHILL_ID = 0
|
PIZZASHILL_ID = 0
|
||||||
PIZZASHILLSHILL_ID = 0
|
PIZZASHILLSHILL_ID = 0
|
||||||
HIL_ID = 0
|
|
||||||
CRAT_ID = 0
|
|
||||||
IDIO_ID = 0
|
IDIO_ID = 0
|
||||||
CARP_ID = 0
|
CARP_ID = 0
|
||||||
JOAN_ID = 0
|
JOAN_ID = 0
|
||||||
|
@ -716,9 +710,8 @@ def censor_slurs(body, logged_user):
|
||||||
return body
|
return body
|
||||||
|
|
||||||
def torture_ap(body, username):
|
def torture_ap(body, username):
|
||||||
body = slur_regex_upper.sub(sub_matcher_upper, body)
|
for k, l in AJ_REPLACEMENTS.items():
|
||||||
body = slur_regex.sub(sub_matcher, body)
|
body = body.replace(k, l)
|
||||||
for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l)
|
|
||||||
body = torture_regex.sub(rf'\1@{username} ', body)
|
body = torture_regex.sub(rf'\1@{username} ', body)
|
||||||
body = torture_regex2.sub(rf'\1@{username} is ', body)
|
body = torture_regex2.sub(rf'\1@{username} is ', body)
|
||||||
return body
|
return body
|
||||||
|
|
|
@ -659,8 +659,6 @@ def api_comment(v):
|
||||||
g.db.add(autovote)
|
g.db.add(autovote)
|
||||||
autovote = CommentVote(user_id=AEVANN_ID, comment_id=c.id, vote_type=1)
|
autovote = CommentVote(user_id=AEVANN_ID, comment_id=c.id, vote_type=1)
|
||||||
g.db.add(autovote)
|
g.db.add(autovote)
|
||||||
autovote = CommentVote(user_id=CRAT_ID, comment_id=c.id, vote_type=1)
|
|
||||||
g.db.add(autovote)
|
|
||||||
autovote = CommentVote(user_id=PIZZASHILLSHILL_ID, comment_id=c.id, vote_type=1)
|
autovote = CommentVote(user_id=PIZZASHILLSHILL_ID, comment_id=c.id, vote_type=1)
|
||||||
g.db.add(autovote)
|
g.db.add(autovote)
|
||||||
v.coins += 3
|
v.coins += 3
|
||||||
|
@ -668,14 +666,6 @@ def api_comment(v):
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
c.upvotes += 3
|
c.upvotes += 3
|
||||||
g.db.add(c)
|
g.db.add(c)
|
||||||
elif v.id == HIL_ID:
|
|
||||||
autovote = CommentVote(user_id=CARP_ID, comment_id=c.id, vote_type=1)
|
|
||||||
g.db.add(autovote)
|
|
||||||
v.coins += 1
|
|
||||||
v.truecoins += 1
|
|
||||||
g.db.add(v)
|
|
||||||
c.upvotes += 1
|
|
||||||
g.db.add(c)
|
|
||||||
|
|
||||||
if not v.rehab:
|
if not v.rehab:
|
||||||
check_for_slots_command(body, v, c)
|
check_for_slots_command(body, v, c)
|
||||||
|
|
|
@ -531,7 +531,9 @@ def request_2fa_disable():
|
||||||
def reset_2fa():
|
def reset_2fa():
|
||||||
|
|
||||||
now=int(time.time())
|
now=int(time.time())
|
||||||
t=int(request.values.get("t"))
|
t = request.values.get("t")
|
||||||
|
if not t: abort(400)
|
||||||
|
t = int(t)
|
||||||
|
|
||||||
if now > t+3600*24:
|
if now > t+3600*24:
|
||||||
return render_template("message.html",
|
return render_template("message.html",
|
||||||
|
|
|
@ -569,7 +569,7 @@ def edit_post(pid, v):
|
||||||
|
|
||||||
def archiveorg(url):
|
def archiveorg(url):
|
||||||
try: requests.get(f'https://web.archive.org/save/{url}', headers={'User-Agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}, timeout=100)
|
try: requests.get(f'https://web.archive.org/save/{url}', headers={'User-Agent': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'}, timeout=100)
|
||||||
except Exception as e: print(e)
|
except: pass
|
||||||
|
|
||||||
|
|
||||||
def thumbnail_thread(pid):
|
def thumbnail_thread(pid):
|
||||||
|
@ -881,7 +881,7 @@ def submit_post(v, sub=None):
|
||||||
Submission.url.ilike(search_url),
|
Submission.url.ilike(search_url),
|
||||||
Submission.deleted_utc == 0,
|
Submission.deleted_utc == 0,
|
||||||
Submission.is_banned == False
|
Submission.is_banned == False
|
||||||
).one_or_none()
|
).first()
|
||||||
|
|
||||||
if repost: return redirect(repost.permalink)
|
if repost: return redirect(repost.permalink)
|
||||||
|
|
||||||
|
@ -1286,13 +1286,11 @@ def submit_post(v, sub=None):
|
||||||
send_discord_message(post.permalink)
|
send_discord_message(post.permalink)
|
||||||
cache.delete_memoized(changeloglist)
|
cache.delete_memoized(changeloglist)
|
||||||
|
|
||||||
if v.id in {PIZZASHILL_ID, HIL_ID}:
|
if v.id == PIZZASHILL_ID:
|
||||||
autovote = Vote(user_id=CARP_ID, submission_id=post.id, vote_type=1)
|
autovote = Vote(user_id=CARP_ID, submission_id=post.id, vote_type=1)
|
||||||
g.db.add(autovote)
|
g.db.add(autovote)
|
||||||
autovote = Vote(user_id=AEVANN_ID, submission_id=post.id, vote_type=1)
|
autovote = Vote(user_id=AEVANN_ID, submission_id=post.id, vote_type=1)
|
||||||
g.db.add(autovote)
|
g.db.add(autovote)
|
||||||
autovote = Vote(user_id=CRAT_ID, submission_id=post.id, vote_type=1)
|
|
||||||
g.db.add(autovote)
|
|
||||||
autovote = Vote(user_id=PIZZASHILLSHILL_ID, submission_id=post.id, vote_type=1)
|
autovote = Vote(user_id=PIZZASHILLSHILL_ID, submission_id=post.id, vote_type=1)
|
||||||
g.db.add(autovote)
|
g.db.add(autovote)
|
||||||
v.coins += 3
|
v.coins += 3
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<div class="row" style="overflow: visible;padding-top:5px;">
|
<div class="row" style="overflow: visible;padding-top:5px;">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<div class="mt-3 mr-1 d-lg-none">
|
<div class="mt-3 d-lg-none">
|
||||||
{% if sub %}
|
{% if sub %}
|
||||||
{% if v.subs == 1 %}
|
{% if v.subs == 1 %}
|
||||||
<a class="btn btn-primary btn-block {% if v.subscribed_to(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/subscribe','subscribe-sub','unsubscribe-sub');this.classList.toggle('d-none');nextElementSibling.classList.toggle('d-none')">Subscribe to /h/{{sub.name}}</a>
|
<a class="btn btn-primary btn-block {% if v.subscribed_to(sub.name) %}d-none{% endif %}" onclick="post_toast(this,'/h/{{sub.name}}/subscribe','subscribe-sub','unsubscribe-sub');this.classList.toggle('d-none');nextElementSibling.classList.toggle('d-none')">Subscribe to /h/{{sub.name}}</a>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue