master
Aevann1 2021-12-01 19:17:27 +02:00
parent 81b0b438cc
commit aee58baa90
4 changed files with 5 additions and 5 deletions

View File

@ -27,7 +27,7 @@ cardview = bool(int(environ.get("CARD_VIEW", 1)))
class User(Base):
__tablename__ = "users"
if "pcmemes.net" in site:
if site == "pcmemes.net":
quadrant = Column(String)
basedcount = Column(Integer, default=0)
pills = deferred(Column(String, default=""))

View File

@ -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 "rama" in request.host: pid = 6489
elif 'pcmemes.net' in request.host: pid = 2487
elif 'pcmemes.net' == request.host: pid = 2487
else: pid = 1
try: pid = int(pid)
@ -300,7 +300,7 @@ def api_comment(v):
g.db.add(c_option)
if 'pcmemes.net' in request.host and c.body.lower().startswith("based"):
if 'pcmemes.net' == request.host and c.body.lower().startswith("based"):
pill = re.match("based and (.{1,20}?)(-| )pilled", body, re.IGNORECASE)
if level == 1: basedguy = get_account(c.post.author_id)

View File

@ -388,7 +388,7 @@ def settings_profile_post(v):
updated = True
quadrant = request.values.get("quadrant")
if quadrant and 'pcmemes.net' in request.host.lower():
if quadrant and 'pcmemes.net' == request.host.lower():
v.quadrant = quadrant
v.customtitle = quadrant
if quadrant=="Centrist":

View File

@ -270,7 +270,7 @@ def leaderboard(v):
if 'pcmemes.net' in request.host:
if 'pcmemes.net' == 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, users7=users7, users9=users9)
return render_template("leaderboard.html", v=v, users1=users1, users2=users2, users3=users3, users4=users4, users5=users5, users7=users7, users9=users9)