rename /h/chudtopia to /h/chudrama

master
Aevann1 2022-08-20 00:20:25 +02:00
parent 5bcf824717
commit a88b9d59c4
7 changed files with 25 additions and 25 deletions

View File

@ -1127,7 +1127,7 @@ def approve_post(post_id, v):
post = get_post(post_id)
if post.author.id == v.id and post.author.agendaposter and AGENDAPOSTER_PHRASE not in post.body.lower() and post.sub != 'chudtopia':
if post.author.id == v.id and post.author.agendaposter and AGENDAPOSTER_PHRASE not in post.body.lower() and post.sub != 'chudrama':
return {"error": "You can't bypass the chud award!"}
if not post:
@ -1322,7 +1322,7 @@ def approve_comment(c_id, v):
comment = get_comment(c_id)
if not comment: abort(404)
if comment.author.id == v.id and comment.author.agendaposter and AGENDAPOSTER_PHRASE not in comment.body.lower() and comment.post.sub != 'chudtopia':
if comment.author.id == v.id and comment.author.agendaposter and AGENDAPOSTER_PHRASE not in comment.body.lower() and comment.post.sub != 'chudrama':
return {"error": "You can't bypass the chud award!"}
if comment.is_banned:

View File

@ -280,13 +280,13 @@ def comment(v):
with open(f"snappy_{SITE_NAME}.txt", "a", encoding="utf-8") as f:
f.write('\n{[para]}\n' + body)
if v.agendaposter and not v.marseyawarded and parent_post.id not in ADMIGGERS and parent_post.sub != 'chudtopia':
if v.agendaposter and not v.marseyawarded and parent_post.id not in ADMIGGERS and parent_post.sub != 'chudrama':
body = torture_ap(body, v.username)
body_html = sanitize(body, limit_pings=True)
if parent_post.id not in ADMIGGERS and '!slots' not in body.lower() and '!blackjack' not in body.lower() and '!wordle' not in body.lower() and AGENDAPOSTER_PHRASE not in body.lower() and parent_post.sub != 'chudtopia':
if parent_post.id not in ADMIGGERS and '!slots' not in body.lower() and '!blackjack' not in body.lower() and '!wordle' not in body.lower() and AGENDAPOSTER_PHRASE not in body.lower() and parent_post.sub != 'chudrama':
existing = g.db.query(Comment.id).filter(Comment.author_id == v.id,
Comment.deleted_utc == 0,
Comment.parent_comment_id == parent_comment_id,
@ -416,7 +416,7 @@ def comment(v):
n = Notification(comment_id=c_based.id, user_id=v.id)
g.db.add(n)
if v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in c.body.lower() and parent_post.sub != 'chudtopia':
if v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in c.body.lower() and parent_post.sub != 'chudrama':
c.is_banned = True
c.ban_reason = "AutoJanny"
@ -654,7 +654,7 @@ def edit_comment(cid, v):
elif v.bird and len(body) > 140:
return {"error":"You have to type less than 140 characters!"}, 403
if v.agendaposter and not v.marseyawarded and c.post.sub != 'chudtopia':
if v.agendaposter and not v.marseyawarded and c.post.sub != 'chudrama':
body = torture_ap(body, v.username)
for i in poll_regex.finditer(body):
@ -731,7 +731,7 @@ def edit_comment(cid, v):
notif = Notification(comment_id=c.id, user_id=CARP_ID)
g.db.add(notif)
if v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in c.body.lower() and c.post.sub != 'chudtopia':
if v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in c.body.lower() and c.post.sub != 'chudrama':
return {"error": f'You have to include "{AGENDAPOSTER_PHRASE}" in your comment!'}, 403

View File

@ -29,7 +29,7 @@ def front_all(v, sub=None, subdomain=None):
if sub:
sub = sub.strip().lower()
if sub == 'chudtopia' and not (v and v.truecoins >= 20000): abort(403)
if sub == 'chudrama' and not (v and v.truecoins >= 20000): abort(403)
sub = g.db.query(Sub).filter_by(name=sub).one_or_none()
if (request.path.startswith('/h/') or request.path.startswith('/s/')) and not sub: abort(404)

View File

@ -406,7 +406,7 @@ def edit_post(pid, v):
return {"error":"You have to type less than 140 characters!"}, 403
if title != p.title:
if v.id == p.author_id and v.agendaposter and not v.marseyawarded and p.sub != 'chudtopia':
if v.id == p.author_id and v.agendaposter and not v.marseyawarded and p.sub != 'chudrama':
title = torture_ap(title, v.username)
title_html = filter_emojis_only(title, edit=True)
@ -422,7 +422,7 @@ def edit_post(pid, v):
body = body.strip()
if body != p.body:
if v.id == p.author_id and v.agendaposter and not v.marseyawarded and p.sub != 'chudtopia':
if v.id == p.author_id and v.agendaposter and not v.marseyawarded and p.sub != 'chudrama':
body = torture_ap(body, v.username)
for i in poll_regex.finditer(body):
@ -461,7 +461,7 @@ def edit_post(pid, v):
p.body_html = body_html
if v.id == p.author_id and v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in f'{p.body}{p.title}'.lower() and p.sub != 'chudtopia':
if v.id == p.author_id and v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in f'{p.body}{p.title}'.lower() and p.sub != 'chudrama':
return {"error": f'You have to include "{AGENDAPOSTER_PHRASE}" in your post!'}, 403
@ -719,7 +719,7 @@ def submit_post(v, sub=None):
if v.is_suspended: return error("You can't perform this action while banned.")
if v.agendaposter and not v.marseyawarded and sub != 'chudtopia':
if v.agendaposter and not v.marseyawarded and sub != 'chudrama':
title = torture_ap(title, v.username)
title_html = filter_emojis_only(title, graceful=True)
@ -890,7 +890,7 @@ def submit_post(v, sub=None):
choices.append(i.group(1))
body = body.replace(i.group(0), "")
if v.agendaposter and not v.marseyawarded and sub != 'chudtopia':
if v.agendaposter and not v.marseyawarded and sub != 'chudrama':
body = torture_ap(body, v.username)
body += process_files()
@ -1014,7 +1014,7 @@ def submit_post(v, sub=None):
for x in notify_users:
add_notif(cid, x)
if v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in f'{post.body}{post.title}'.lower() and sub != 'chudtopia':
if v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in f'{post.body}{post.title}'.lower() and sub != 'chudrama':
post.is_banned = True
post.ban_reason = "AutoJanny"
@ -1078,7 +1078,7 @@ def submit_post(v, sub=None):
post.downvotes += 1
g.db.add(post)
if SITE == 'rdrama.net' and post.sub and post.sub not in ('dankchristianmemes','fatpeoplehate','braincels','truth','smuggies','chudtopia') and v.id != AEVANN_ID:
if SITE == 'rdrama.net' and post.sub and post.sub not in ('dankchristianmemes','fatpeoplehate','braincels','truth','smuggies','chudrama') and v.id != AEVANN_ID:
g.db.flush()
autovote = Vote(
user_id=AEVANN_ID,

View File

@ -90,7 +90,7 @@
{% if render_replies %}
{% if level<9 or request.path.startswith('/notifications') or request.headers.get("xhr") %}
<div id="replies-of-{{c.fullname}}">
{% for reply in replies if not reply.parent_submission or reply.post.sub != 'chudtopia' or (v and v.truecoins >= 20000) %}
{% for reply in replies if not reply.parent_submission or reply.post.sub != 'chudrama' or (v and v.truecoins >= 20000) %}
{{single_comment(reply, level=level+1)}}
{% endfor %}
</div>
@ -300,7 +300,7 @@
</style>
{% endif %}
<div id="comment-text-{{c.id}}" class="comment-text mb-0 {% if c.author.agendaposter and not (c.parent_submission and c.post.sub == 'chudtopia') %}agendaposter{% endif %}">
<div id="comment-text-{{c.id}}" class="comment-text mb-0 {% if c.author.agendaposter and not (c.parent_submission and c.post.sub == 'chudrama') %}agendaposter{% endif %}">
{{c.realbody(v) | safe}}
</div>
{% if c.parent_submission %}
@ -601,7 +601,7 @@
{% if render_replies %}
{% if level<9 or request.path.startswith('/notifications') or request.headers.get("xhr") %}
<div id="replies-of-{{c.fullname}}">
{% for reply in replies if not reply.parent_submission or reply.post.sub != 'chudtopia' or (v and v.truecoins >= 20000) %}
{% for reply in replies if not reply.parent_submission or reply.post.sub != 'chudrama' or (v and v.truecoins >= 20000) %}
{{single_comment(reply, level=level+1)}}
{% endfor %}
</div>
@ -785,7 +785,7 @@
{% endmacro %}
{% for comment in comments if not comment.parent_submission or comment.post.sub != 'chudtopia' or (v and v.truecoins >= 20000) %}
{% for comment in comments if not comment.parent_submission or comment.post.sub != 'chudrama' or (v and v.truecoins >= 20000) %}
{{single_comment(comment)}}

View File

@ -705,14 +705,14 @@
</div>
{% endif %}
{% if p.realurl(v) and not v_forbid_deleted %}
<h1 id="post-title" class="card-title post-title text-left mb-md-3 {% if p.author.agendaposter and p.sub != 'chudtopia' %}agendaposter{% endif %}"><a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}">
<h1 id="post-title" class="card-title post-title text-left mb-md-3 {% if p.author.agendaposter and p.sub != 'chudrama' %}agendaposter{% endif %}"><a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}">
{% if p.club %}<span class="patron font-weight-bolder mr-1" style="background-color:red; font-size:12px; line-height:2;">{{CC}}</span>{% endif %}
{% if p.category %}{{help.submission_category_tag(p.category.name, p.category.color_text, p.category.color_bg)}}{% endif %}
{% if p.flair %}<span class="patron font-weight-bolder mr-1" style="background-color:var(--primary); font-size:12px; line-height:2;">{{p.flair | safe}}</span>{% endif %}
{{p.realtitle(v) | safe}}
</a></h1>
{% else %}
<h1 id="post-title" class="card-title post-title text-left mb-md-3 {% if p.author.agendaposter and p.sub != 'chudtopia' %}agendaposter{% endif %}">
<h1 id="post-title" class="card-title post-title text-left mb-md-3 {% if p.author.agendaposter and p.sub != 'chudrama' %}agendaposter{% endif %}">
{% if p.club %}<span class="patron font-weight-bolder mr-1" style="background-color:red; font-size:12px; line-height:2;">{{CC}}</span>{% endif %}
{% if p.category %}{{help.submission_category_tag(p.category.name, p.category.color_text, p.category.color_bg)}}{% endif %}
{% if p.flair %}<span class="patron font-weight-bolder mr-1" style="background-color:var(--primary); font-size:12px; line-height:2;">{{p.flair | safe}}</span>{% endif %}
@ -748,7 +748,7 @@
{% endif %}
<div id="post-text" {% if p.author.agendaposter and p.sub != 'chudtopia' %}class="agendaposter"{% endif %}>
<div id="post-text" {% if p.author.agendaposter and p.sub != 'chudrama' %}class="agendaposter"{% endif %}>
{% if p.is_image %}
<div class="row no-gutters">
<div class="col">

View File

@ -58,7 +58,7 @@
</div>
</div>
{% for p in listing if p.sub != 'chudtopia' or (v and v.truecoins >= 20000) %}
{% for p in listing if p.sub != 'chudrama' or (v and v.truecoins >= 20000) %}
{% set ups=p.upvotes %}
{% set downs=p.downvotes %}
@ -231,7 +231,7 @@
</div>
<h5 class="card-title post-title text-left w-lg-95 mb-0 pb-0 pb-md-1">
<a id="{{p.id}}-title" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} href="{{p.permalink}}" class="{% if p.sub %}sub{% elif voted and v.id == AEVANN_ID %}visited{% endif %} stretched-link {% if p.author.agendaposter and p.sub != 'chudtopia' %}agendaposter{% endif %}">
<a id="{{p.id}}-title" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %} href="{{p.permalink}}" class="{% if p.sub %}sub{% elif voted and v.id == AEVANN_ID %}visited{% endif %} stretched-link {% if p.author.agendaposter and p.sub != 'chudrama' %}agendaposter{% endif %}">
{% if p.club %}<span class="patron font-weight-bolder mr-1" style="background-color:red; font-size:12px; line-height:2;">{{CC}}</span>{% endif %}
{% if p.category %}{{help.submission_category_tag(p.category.name, p.category.color_text, p.category.color_bg)}}{% endif %}
{% if p.flair %}<span class="patron font-weight-bolder mr-1" style="background-color:var(--primary); font-size:12px; line-height:2;">{{p.flair | safe}}</span>{% endif %}
@ -355,7 +355,7 @@
{% if (not p.club or v and (v.paid_dues or v.id == p.author_id)) and not v_forbid_deleted %}
{% if p.realbody(v, True) %}
<div class="d-none card rounded border {% if p.author.agendaposter and p.sub != 'chudtopia' %}agendaposter{% endif %} post-preview" id="post-text-{{p.id}}">
<div class="d-none card rounded border {% if p.author.agendaposter and p.sub != 'chudrama' %}agendaposter{% endif %} post-preview" id="post-text-{{p.id}}">
{{p.realbody(v, True) | safe}}
</div>
{% endif %}