diff --git a/files/routes/admin.py b/files/routes/admin.py index 4618b51d1..e00539d9f 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -382,16 +382,6 @@ def monthly(v): send_repeatable_notification(u.id, f"@{v.username} has given you {procoins} Marseybux for the month of {month}! You can use them to buy awards in the [shop](/shop).") else: print(u.username) - if request.host == 'pcmemes.net': - u = g.db.query(User).filter_by(id=KIPPY_ID).one() - u.procoins += 50000 - g.db.add(u) - - if request.host == 'rdrama.net': - u = g.db.query(User).filter_by(id=A_ID).one() - u.procoins += 25000 - g.db.add(u) - ma = ModAction( kind="monthly", user_id=v.id diff --git a/files/routes/awards.py b/files/routes/awards.py index 449f850ee..7e18745eb 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -597,8 +597,6 @@ def award_comment(cid, v): @app.get("/admin/awards") @admin_level_required(2) def admin_userawards_get(v): - if request.host == 'pcmemes.net' and v.admin_level < 3: abort(403) - if v.admin_level != 3: return render_template("admin/awards.html", awards=list(AWARDS3.values()), v=v) @@ -608,8 +606,6 @@ def admin_userawards_get(v): @limiter.limit("1/second;30/minute;200/hour;1000/day") @admin_level_required(2) def admin_userawards_post(v): - if request.host == 'pcmemes.net' and v.admin_level < 3: abort(403) - try: u = request.values.get("username").strip() except: abort(404) diff --git a/files/routes/comments.py b/files/routes/comments.py index 1f7936634..4ccccc235 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -82,7 +82,6 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None): if not pid: if comment.parent_submission: pid = comment.parent_submission - elif request.host == 'pcmemes.net': pid = 2487 else: pid = 1 try: pid = int(pid) @@ -420,39 +419,6 @@ def api_comment(v): g.db.add(c_choice) - if request.host == 'pcmemes.net' and c.body.lower().startswith("based"): - pill = based_regex.match(body) - - if level == 1: basedguy = get_account(parent_post.author_id) - else: basedguy = get_account(c.parent_comment.author_id) - basedguy.basedcount += 1 - if pill: - if basedguy.pills: basedguy.pills += f", {pill.group(1)}" - else: basedguy.pills += f"{pill.group(1)}" - g.db.add(basedguy) - - body2 = f"@{basedguy.username}'s Based Count has increased by 1. Their Based Count is now {basedguy.basedcount}." - if basedguy.pills: body2 += f"\n\nPills: {basedguy.pills}" - - body_based_html = sanitize(body2) - - c_based = Comment(author_id=BASEDBOT_ID, - parent_submission=parent_submission, - distinguish_level=6, - parent_comment_id=c.id, - level=level+1, - is_bot=True, - body_html=body_based_html, - top_comment_id=c.top_comment_id, - ghost=parent_post.ghost - ) - - g.db.add(c_based) - g.db.flush() - - n = Notification(comment_id=c_based.id, user_id=v.id) - g.db.add(n) - if parent_post.id not in ADMIGGERS: if v.agendaposter and not v.marseyawarded and AGENDAPOSTER_PHRASE not in c.body.lower(): diff --git a/files/routes/front.py b/files/routes/front.py index 175f81c1c..2c572d691 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -344,8 +344,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false" if not (v and v.shadowbanned): posts = posts.join(User, User.id == Submission.author_id).filter(User.shadowbanned == None) - if request.host == 'rdrama.net': num = 5 - else: num = 1 + num = 1 if sort == "hot": ti = int(time.time()) + 3600 diff --git a/files/routes/subs.py b/files/routes/subs.py index c90a90d68..d2e2e00b6 100644 --- a/files/routes/subs.py +++ b/files/routes/subs.py @@ -223,12 +223,10 @@ def remove_mod(v, sub): @app.get("/create_sub") @is_not_permabanned def create_sub(v): - if request.host == 'rdrama.net': cost = 0 - else: - num = v.subs_created + 1 - for a in v.alts: - num += a.subs_created - cost = num * 100 + num = v.subs_created + 1 + for a in v.alts: + num += a.subs_created + cost = num * 100 return render_template("sub/create_sub.html", v=v, cost=cost) @@ -240,12 +238,10 @@ def create_sub2(v): if not name: abort(400) name = name.strip().lower() - if request.host == 'rdrama.net': cost = 0 - else: - num = v.subs_created + 1 - for a in v.alts: - num += a.subs_created - cost = num * 100 + num = v.subs_created + 1 + for a in v.alts: + num += a.subs_created + cost = num * 100 if not valid_sub_regex.fullmatch(name): return render_template("sub/create_sub.html", v=v, cost=cost, error="Sub name not allowed."), 400 diff --git a/files/routes/users.py b/files/routes/users.py index 694bb2bd1..a698025b8 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -478,13 +478,8 @@ def leaderboard(v): sq = g.db.query(User.id, func.rank().over(order_by=User.received_award_count.desc()).label("rank")).subquery() pos5 = g.db.query(sq.c.id, sq.c.rank).filter(sq.c.id == v.id).limit(1).one()[1] - if request.host == 'pcmemes.net': - users6 = users.order_by(User.basedcount.desc()).limit(25).all() - sq = g.db.query(User.id, func.rank().over(order_by=User.basedcount.desc()).label("rank")).subquery() - pos6 = g.db.query(sq.c.id, sq.c.rank).filter(sq.c.id == v.id).limit(1).one()[1] - else: - users6 = None - pos6 = None + users6 = None + pos6 = None users7 = users.order_by(User.coins_spent.desc()).limit(25).all() sq = g.db.query(User.id, func.rank().over(order_by=User.coins_spent.desc()).label("rank")).subquery() diff --git a/files/templates/comments.html b/files/templates/comments.html index 07b89c913..d1d1304f9 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -431,7 +431,7 @@ Context - + {% if v %} @@ -635,7 +635,7 @@ Context - Copy link + Copy link {% if v %} Report diff --git a/files/templates/post_actions.html b/files/templates/post_actions.html index 806a6ec2d..0ea6577c4 100644 --- a/files/templates/post_actions.html +++ b/files/templates/post_actions.html @@ -12,7 +12,7 @@ Give Award {% endif %} -Copy link +Copy link {% if v %} Subscribe diff --git a/files/templates/post_actions_mobile.html b/files/templates/post_actions_mobile.html index 782a591b6..f948eb0c4 100644 --- a/files/templates/post_actions_mobile.html +++ b/files/templates/post_actions_mobile.html @@ -8,7 +8,7 @@ {% if not p.ghost or v.id == AEVANN_ID %}{% endif %} - + diff --git a/files/templates/submission.html b/files/templates/submission.html index 2fc863a00..f4e6ebe1c 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -410,11 +410,7 @@ {% block content %} -{% if request.host == 'pcmemes.net' %} - {% set cc='SPLASH MOUNTAIN' %} -{% else %} - {% set cc='COUNTRY CLUB' %} -{% endif %} +{% set cc='COUNTRY CLUB' %}
diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 6c6accad7..3534a1c94 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -2,11 +2,7 @@ {% include "award_modal.html" %} {% endif %} -{% if request.host == 'pcmemes.net' %} - {% set cc='SPLASH MOUNTAIN' %} -{% else %} - {% set cc='COUNTRY CLUB' %} -{% endif %} +{% set cc='COUNTRY CLUB' %} {% if not v or v.highlightcomments %} diff --git a/files/templates/submit.html b/files/templates/submit.html index 3fe7330f2..600c17335 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -12,11 +12,7 @@ - {% if request.host == 'pcmemes.net' %} - {% set cc='Splash Mountain' %} - {% else %} - {% set cc='Country Club' %} - {% endif %} + {% set cc='Country Club' %} {% block title %} Create a post - {{SITE_NAME}}