diff --git a/files/classes/user.py b/files/classes/user.py index cb9e054bd0..14931dc77c 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -32,7 +32,7 @@ class User(Base, Stndrd, Age_times): customtitle = Column(String) customtitleplain = Column(String) - if "pcmemes.net" in site: + if "pcmemes.ga" in site: quadrant = Column(String) basedcount = Column(Integer, default=0) pills = Column(String, default="") diff --git a/files/helpers/const.py b/files/helpers/const.py index 32231b63dc..d06467262c 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -97,7 +97,7 @@ BASED_MSG = "@{username}'s Based Count has increased by 1. Their Based Count is BASEDBOT_ACCOUNT = 800 NOTIFICATIONS_ACCOUNT = 1046 -if site == "pcmemes.net": AUTOJANNY_ACCOUNT = 1050 +if site == "pcmemes.ga": AUTOJANNY_ACCOUNT = 1050 else: AUTOJANNY_ACCOUNT = 2360 LONGPOSTBOT_ACCOUNT = 1832 diff --git a/files/helpers/discord.py b/files/helpers/discord.py index cd65ae77ee..9e0b737a67 100644 --- a/files/helpers/discord.py +++ b/files/helpers/discord.py @@ -11,7 +11,7 @@ AUTH = environ.get("DISCORD_AUTH",'').strip() ROLES={ "linked": "849621030926286920", "shrigma": "864612849199480914", - "admin": "879459632656048180" if environ.get("DOMAIN") == "pcmemes.net" else "846509661288267776", + "admin": "879459632656048180" if environ.get("DOMAIN") == "pcmemes.ga" else "846509661288267776", "feedback": "850716291714383883", "newuser": "854783259229421589", "norep": "850971811918512208", diff --git a/files/routes/comments.py b/files/routes/comments.py index 52d0ac47d3..69b67a733b 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -52,7 +52,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None): if not pid: if comment.parent_submission: pid = comment.parent_submission elif "rdrama" in request.host: pid = 6489 - elif 'pcmemes.net' in request.host: pid = 382 + elif 'pcmemes.ga' in request.host: pid = 382 else: pid = 1 try: pid = int(pid) @@ -288,7 +288,7 @@ def api_comment(v): g.db.rollback() abort(413) - if 'pcmemes.net' in request.host: url = upload_ibb(file=file) + if 'pcmemes.ga' in request.host: url = upload_ibb(file=file) else: url = upload_imgur(file=file) body = request.form.get("body") + f"\n![]({url})" @@ -306,7 +306,7 @@ def api_comment(v): g.db.add(c_aux) g.db.flush() - if 'pcmemes.net' in request.host and c_aux.body.lower().startswith("based"): + if 'pcmemes.ga' in request.host and c_aux.body.lower().startswith("based"): pill = re.match("based and (.{1,20}?)(-| )pilled", body, re.IGNORECASE) c_based = Comment(author_id=BASEDBOT_ACCOUNT, @@ -702,7 +702,7 @@ def edit_comment(cid, v): g.db.rollback() abort(413) - if 'pcmemes.net' in request.host: url = upload_ibb(file=file) + if 'pcmemes.ga' in request.host: url = upload_ibb(file=file) else: url = upload_imgur(file=file) body += f"\n![]({url})" diff --git a/files/routes/posts.py b/files/routes/posts.py index b83ed6b874..95c6533556 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -527,7 +527,7 @@ def thumbs(new_post): for chunk in image_req.iter_content(1024): file.write(chunk) - if 'pcmemes.net' in request.host: post.thumburl = upload_ibb(filepath="image.webp", resize=True) + if 'pcmemes.ga' in request.host: post.thumburl = upload_ibb(filepath="image.webp", resize=True) else: post.thumburl = upload_imgur(filepath="image.webp", resize=True) g.db.add(post) @@ -914,7 +914,7 @@ def submit_post(v): ), 403 if file.content_type.startswith('image/'): - if 'pcmemes.net' in request.host: new_post.url = upload_ibb(file=file) + if 'pcmemes.ga' in request.host: new_post.url = upload_ibb(file=file) else: new_post.url = upload_imgur(file=file) else: try: diff --git a/files/routes/settings.py b/files/routes/settings.py index 08d262cf41..320ef25015 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -117,7 +117,7 @@ def settings_profile_post(v): if request.headers.get("Authorization"): return {"error": f"Image files only"}, 400 else: return render_template("settings_profile.html", v=v, error=f"Image files only."), 400 - if 'pcmemes.net' in request.host: url = upload_ibb(file=file) + if 'pcmemes.ga' in request.host: url = upload_ibb(file=file) else: url = upload_imgur(file=file) bio += f"\n\n![]({url})" @@ -208,7 +208,7 @@ def settings_profile_post(v): return {"message": "Theme changed!"} quadrant = request.values.get("quadrant") - if quadrant and 'pcmemes.net' in request.host.lower(): + if quadrant and 'pcmemes.ga' in request.host.lower(): v.quadrant = quadrant v.customtitle = quadrant if quadrant=="Centrist": @@ -505,11 +505,11 @@ def settings_images_profile(v): filepath = f"image.{format}" file.save(filepath) - if 'pcmemes.net' in request.host: highres = upload_ibb(filepath=filepath) + if 'pcmemes.ga' in request.host: highres = upload_ibb(filepath=filepath) else: highres = upload_imgur(filepath=filepath) if not highres: abort(400) - if 'pcmemes.net' in request.host: imageurl = upload_ibb(filepath=filepath, resize=True) + if 'pcmemes.ga' in request.host: imageurl = upload_ibb(filepath=filepath, resize=True) else: imageurl = upload_imgur(filepath=filepath, resize=True) if not imageurl: abort(400) @@ -531,7 +531,7 @@ def settings_images_banner(v): if request.headers.get("cf-ipcountry") == "T1": return "Image uploads are not allowed through TOR.", 403 file = request.files["banner"] - if 'pcmemes.net' in request.host: imageurl = upload_ibb(file=file) + if 'pcmemes.ga' in request.host: imageurl = upload_ibb(file=file) else: imageurl = upload_imgur(file=file) if imageurl: diff --git a/files/routes/users.py b/files/routes/users.py index 6a8f888257..ab8b8cffad 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -144,7 +144,7 @@ def leaderboard(v): users3 = users.order_by(User.post_count.desc()).limit(10).all() users4 = users.order_by(User.comment_count.desc()).limit(10).all() users5 = users.order_by(User.received_award_count.desc()).limit(10).all() - if 'pcmemes.net' in request.host: + if 'pcmemes.ga' in request.host: users6 = users.order_by(User.basedcount.desc()).limit(10).all() return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4, users5=users5, users6=users6) return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4, users5=users5)