diff --git a/files/classes/comment.py b/files/classes/comment.py index 101e74331..a4e08eb47 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -36,6 +36,7 @@ class Comment(Base): over_18 = Column(Boolean, default=False) is_bot = Column(Boolean, default=False) is_pinned = Column(String) + is_pinned_utc = Column(Integer) sentto=Column(Integer, ForeignKey("users.id")) app_id = Column(Integer, ForeignKey("oauth_apps.id")) oauth_app = relationship("OauthApp", viewonly=True) diff --git a/files/classes/submission.py b/files/classes/submission.py index d40ed1146..2adda2416 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -32,6 +32,7 @@ class Submission(Base): deleted_utc = Column(Integer, default=0) distinguish_level = Column(Integer, default=0) stickied = Column(String) + stickied_utc = Column(Integer) is_pinned = Column(Boolean, default=False) private = Column(Boolean, default=False) club = Column(Boolean, default=False) diff --git a/files/helpers/const.py b/files/helpers/const.py index c35c78de2..22b541845 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -88,7 +88,7 @@ SLURS = { " elon ": " rocket daddy ", } -LONGPOST_REPLIES = ['Wow, you must be a JP fan.', 'This is one of the worst posts I have EVER seen. Delete it.', "No, don't reply like this, please do another wall of unhinged rant please.", '# 😴😴😴', "Ma'am we've been over this before. You need to stop.", "I've known more coherent downies.", "Your pulitzer's in the mail", "That's great and all, but I asked for my burger without cheese.", 'That degree finally paying off', "That's nice sweaty. Why don't you have a seat in the time out corner with Pizzashill until you calm down, then you can have your Capri Sun.", "All them words won't bring your pa back.", "You had a chance to not be completely worthless, but it looks like you threw it away. At least you're consistent.", 'Some people are able to display their intelligence by going on at length on a subject and never actually saying anything. This ability is most common in trades such as politics, public relations, and law. You have impressed me by being able to best them all, while still coming off as an absolute idiot.', "You can type 10,000 characters and you decided that these were the one's that you wanted.", 'Have you owned the libs yet?', "I don't know what you said, because I've seen another human naked.", 'Impressive. Normally people with such severe developmental disabilities struggle to write much more than a sentence or two. He really has exceded our expectations for the writing portion. Sadly the coherency of his writing, along with his abilities in the social skills and reading portions, are far behind his peers with similar disabilities.', "This is a really long way of saying you don't fuck.", "Sorry ma'am, looks like his delusions have gotten worse. We'll have to admit him,", ':#marseywoah:', 'If only you could put that energy into your relationships', 'Posts like this is why I do Heroine.', 'still unemployed then?', 'K', 'look im gunna have 2 ask u 2 keep ur giant dumps in the toilet not in my replys 😷😷😷', "Mommy is soooo proud of you, sweaty. Let's put this sperg out up on the fridge with all your other failures.", "Good job bobby, here's a star", "That was a mistake. You're about to find out the hard way why.", 'You sat down and wrote all this shit. You could have done so many other things with your life. What happened to your life that made you decide writing novels of bullshit on rdrama.net was the best option?', "I don't have enough spoons to read this shit", "All those words won't bring daddy back.", 'OUT!'] +LONGPOST_REPLIES = ['Wow, you must be a JP fan.', 'This is one of the worst posts I have EVER seen. Delete it.', "No, don't reply like this, please do another wall of unhinged rant please.", '# 😴😴😴', "Ma'am we've been over this before. You need to stop.", "I've known more coherent downies.", "Your pulitzer's in the mail", "That's great and all, but I asked for my burger without cheese.", 'That degree finally paying off', "That's nice sweaty. Why don't you have a seat in the time out corner with Pizzashill until you calm down, then you can have your Capri Sun.", "All them words won't bring your pa back.", "You had a chance to not be completely worthless, but it looks like you threw it away. At least you're consistent.", 'Some people are able to display their intelligence by going on at length on a subject and never actually saying anything. This ability is most common in trades such as politics, public relations, and law. You have impressed me by being able to best them all, while still coming off as an absolute idiot.', "You can type 10,000 characters and you decided that these were the one's that you wanted.", 'Have you owned the libs yet?', "I don't know what you said, because I've seen another human naked.", 'Impressive. Normally people with such severe developmental disabilities struggle to write much more than a sentence or two. He really has exceded our expectations for the writing portion. Sadly the coherency of his writing, along with his abilities in the social skills and reading portions, are far behind his peers with similar disabilities.', "This is a really long way of saying you don't fuck.", "Sorry ma'am, looks like his delusions have gotten worse. We'll have to admit him.", ':#marseywoah:', 'If only you could put that energy into your relationships', 'Posts like this is why I do Heroine.', 'still unemployed then?', 'K', 'look im gunna have 2 ask u 2 keep ur giant dumps in the toilet not in my replys 😷😷😷', "Mommy is soooo proud of you, sweaty. Let's put this sperg out up on the fridge with all your other failures.", "Good job bobby, here's a star", "That was a mistake. You're about to find out the hard way why.", 'You sat down and wrote all this shit. You could have done so many other things with your life. What happened to your life that made you decide writing novels of bullshit on rdrama.net was the best option?', "I don't have enough spoons to read this shit", "All those words won't bring daddy back.", 'OUT!'] AGENDAPOSTER_MSG = """Hi @{username},\n\nYour comment has been automatically removed because you forgot to include `trans lives matter`.\n\nDon't worry, we're here to help! We diff --git a/files/helpers/get.py b/files/helpers/get.py index 451b53448..aa58453a1 100644 --- a/files/helpers/get.py +++ b/files/helpers/get.py @@ -187,7 +187,7 @@ def get_comment(i, v=None, graceful=False): if v: - comment=g.db.query(Comment).filter(Comment.id == i).first() + comment=g.db.query(Comment).filter(Comment.id == i).one_or_none() if not comment and not graceful: abort(404) diff --git a/files/routes/admin.py b/files/routes/admin.py index 3e5d6bf67..b281dcb8c 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -214,17 +214,31 @@ def monthly(v): if 'pcm' in request.host or (SITE_NAME == 'Drama' and v.admin_level > 2) or ('rama' not in request.host and 'pcm' not in request.host): thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).first().id + data = {'access_token': GUMROAD_TOKEN} + + response = [x['email'] for x in requests.get('https://api.gumroad.com/v2/products/tfcvri/subscribers', data=data, timeout=5).json()["subscribers"]] + emails = [] + + for email in response: + if email.endswith("@gmail.com"): + email=email.split('@')[0] + email=email.split('+')[0] + email=email.replace('.','').replace('_','') + email=f"{email}@gmail.com" + emails.append(email.lower()) + for u in g.db.query(User).filter(User.patron > 0).all(): - if u.patron == 1: procoins = 2500 - elif u.patron == 2: procoins = 5000 - elif u.patron == 3: procoins = 10000 - elif u.patron == 4: procoins = 25000 - elif u.patron == 5: procoins = 50000 - u.procoins += procoins - g.db.add(u) - - cid = notif_comment(f"You were given {procoins} Marseybux for the month of {month}! You can use them to buy awards in the [shop](/shop).") - add_notif(cid, u.id) + if u.patron == 5 or u.email and u.email.lower() in emails or u.id == 1379: + if u.patron == 1: procoins = 2500 + elif u.patron == 2: procoins = 5000 + elif u.patron == 3: procoins = 10000 + elif u.patron == 4: procoins = 25000 + elif u.patron == 5: procoins = 50000 + u.procoins += procoins + g.db.add(u) + + cid = notif_comment(f"You were given {procoins} Marseybux for the month of {month}! You can use them to buy awards in the [shop](/shop).") + add_notif(cid, u.id) g.db.commit() return {"message": "Monthly coins granted"} @@ -1024,44 +1038,95 @@ def api_distinguish_post(post_id, v): @app.post("/sticky/") @admin_level_required(2) @validate_formkey -def api_sticky_post(post_id, v): +def sticky_post(post_id, v): - post = g.db.query(Submission).filter_by(id=post_id).first() - if post: - if post.stickied: - if post.stickied.startswith("t:"): return {"error": "Can't unpin award pins!"}, 403 - else: post.stickied = None - else: - pins = g.db.query(Submission.id).filter(Submission.stickied != None, Submission.is_banned == False).count() - if pins > 2: - if v.admin_level > 2: - t = int(time.time()) + 3600 - post.stickied = f"j:{t}" - else: return {"error": "Can't exceed 3 pinned posts limit!"}, 403 - else: post.stickied = v.username + post = g.db.query(Submission).filter_by(id=post_id).one_or_none() + if post and not post.stickied: + pins = g.db.query(Submission.id).filter(Submission.stickied != None, Submission.is_banned == False).count() + if pins > 2: + if v.admin_level > 2: + post.stickied = v.username + post.stickied_utc = int(time.time()) + 3600 + else: return {"error": "Can't exceed 3 pinned posts limit!"}, 403 + else: post.stickied = v.username + g.db.add(post) + + if v.id != post.author_id: + send_repeatable_notification(post.author_id, f"@{v.username} has pinned your [post](/post/{post_id})!") + + cache.delete_memoized(frontlist) + g.db.commit() + return {"message": "Post pinned!"} + +@app.post("/unsticky/") +@admin_level_required(2) +@validate_formkey +def unsticky_post(post_id, v): + + post = g.db.query(Submission).filter_by(id=post_id).one_or_none() + if post and post.stickied: + if post.stickied.endswith('(pin award)'): return {"error": "Can't unpin award pins!"}, 403 + + post.stickied = None + post.stickied_utc = None g.db.add(post) ma=ModAction( - kind="pin_post" if post.stickied else "unpin_post", + kind="unpin_post", user_id=v.id, target_submission_id=post.id ) g.db.add(ma) - cache.delete_memoized(frontlist) + if v.id != post.author_id: + send_repeatable_notification(post.author_id, f"@{v.username} has unpinned your [post](/post/{post_id})!") + + cache.delete_memoized(frontlist) + g.db.commit() + return {"message": "Post unpinned!"} + +@app.post("/sticky_comment/") +@admin_level_required(2) +@validate_formkey +def sticky_comment(cid, v): + + comment = get_comment(cid, v=v) + comment.is_pinned = v.username + g.db.add(comment) + + if v.id != comment.author_id: + message = f"@{v.username} has pinned your [comment]({comment.permalink})!" + send_repeatable_notification(comment.author_id, message) + + g.db.commit() + return {"message": "Comment pinned!"} + + +@app.post("/unsticky_comment/") +@admin_level_required(2) +@validate_formkey +def unsticky_comment(cid, v): + + comment = get_comment(cid, v=v) + + if comment.is_pinned.endswith("(pin award)"): return {"error": "Can't unpin award pins!"}, 403 + + g.db.add(comment) + + ma=ModAction( + kind="unpin_comment", + user_id=v.id, + target_comment_id=comment.id + ) + g.db.add(ma) + + if v.id != comment.author_id: + message = f"@{v.username} has unpinned your [comment]({comment.permalink})!" + send_repeatable_notification(comment.author_id, message) + + g.db.commit() + return {"message": "Comment unpinned!"} - if post.stickied: - if v.id != post.author_id: - message = f"@{v.username} has pinned your [post](/post/{post_id})!" - send_repeatable_notification(post.author_id, message) - g.db.commit() - return {"message": "Post pinned!"} - else: - if v.id != post.author_id: - message = f"@{v.username} has unpinned your [post](/post/{post_id})!" - send_repeatable_notification(post.author_id, message) - g.db.commit() - return {"message": "Post unpinned!"} @app.post("/ban_comment/") @limiter.limit("1/second") diff --git a/files/routes/awards.py b/files/routes/awards.py index 24dee9cdd..382184620 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -18,14 +18,6 @@ discounts = { } AWARDS3 = { - "ban": { - "kind": "ban", - "title": "1-Day Ban", - "description": "Bans the recipient for a day.", - "icon": "fas fa-gavel", - "color": "text-danger", - "price": 3000 - }, "fireflies": { "kind": "fireflies", "title": "Fireflies", @@ -243,18 +235,21 @@ def award_post(pid, v): send_repeatable_notification(CARP_ID, f"@{v.username} used {kind} award on [{post.shortlink}]({post.shortlink})") send_repeatable_notification(DAD_ID, f"@{v.username} used {kind} award on [{post.shortlink}]({post.shortlink})") elif kind == "pin": - if post.stickied and post.stickied.startswith("t:"): t = int(post.stickied[2:]) + 3600 - else: t = int(time.time()) + 3600 - post.stickied = f"t:{t}" + if post.stickied and post.stickied_utc: + post.stickied_utc += 3600 + else: + post.stickied = f'{v.username} (pin award)' + post.stickied_utc = int(time.time()) + 3600 g.db.add(post) cache.delete_memoized(frontlist) elif kind == "unpin": - if not (post.stickied and post.stickied.startswith("t:")): abort(403) - t = int(post.stickied[2:]) - 3600 + if not post.stickied_utc: abort(403) + t = post.stickied_utc - 3600 if time.time() > t: post.stickied = None + post.stickied_utc = None cache.delete_memoized(frontlist) - else: post.stickied = f"t:{t}" + else: post.stickied_utc = t g.db.add(post) elif kind == "agendaposter" and not (author.agendaposter and author.agendaposter_expires_utc == 0): if author.agendaposter_expires_utc and time.time() < author.agendaposter_expires_utc: author.agendaposter_expires_utc += 86400 @@ -416,15 +411,18 @@ def award_comment(cid, v): send_repeatable_notification(CARP_ID, f"@{v.username} used {kind} award on [{c.shortlink}]({c.shortlink})") send_repeatable_notification(DAD_ID, f"@{v.username} used {kind} award on [{c.shortlink}]({c.shortlink})") elif kind == "pin": - if c.is_pinned and c.is_pinned.startswith("t:"): t = int(c.is_pinned[2:]) + 3600 - else: t = int(time.time()) + 3600 - c.is_pinned = f"t:{t}" + if c.is_pinned and c.is_pinned_utc: c.is_pinned_utc += 3600 + else: + c.is_pinned = f'{v.username} (pin award)' + c.is_pinned_utc = int(time.time()) + 3600 g.db.add(c) elif kind == "unpin": - if not (c.is_pinned and c.is_pinned.startswith("t:")): abort(403) - t = int(c.is_pinned[2:]) - 3600 - if time.time() > t: c.is_pinned = None - else: c.is_pinned = f"t:{t}" + if not c.is_pinned_utc: abort(403) + t = c.is_pinned_utc - 3600 + if time.time() > t: + c.is_pinned = None + c.is_pinned_utc = None + else: c.is_pinned_utc = t g.db.add(c) elif kind == "agendaposter" and not (author.agendaposter and author.agendaposter_expires_utc == 0): if author.agendaposter_expires_utc and time.time() < author.agendaposter_expires_utc: author.agendaposter_expires_utc += 86400 diff --git a/files/routes/comments.py b/files/routes/comments.py index f173a2dd3..e9285b67e 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -899,48 +899,45 @@ def undelete_comment(cid, v): @app.post("/pin_comment/") @auth_required @validate_formkey -def toggle_pin_comment(cid, v): +def pin_comment(cid, v): comment = get_comment(cid, v=v) - if v.admin_level < 1 and v.id != comment.post.author_id: abort(403) - - if comment.is_pinned: - if comment.is_pinned.startswith("t:"): abort(403) - else: - if v.admin_level > 1 or comment.is_pinned.endswith(" (OP)"): comment.is_pinned = None - else: abort(403) - else: - if v.admin_level > 1: comment.is_pinned = v.username - else: comment.is_pinned = v.username + " (OP)" + if v.id != comment.post.author_id: abort(403) + + comment.is_pinned = v.username + " (OP)" g.db.add(comment) - g.db.flush() - if v.admin_level > 1: - ma=ModAction( - kind="pin_comment" if comment.is_pinned else "unpin_comment", - user_id=v.id, - target_comment_id=comment.id - ) - g.db.add(ma) + if v.id != comment.author_id: + message = f"@{v.username} (OP) has pinned your [comment]({comment.permalink})!" + send_repeatable_notification(comment.author_id, message) g.db.commit() + return {"message": "Comment pinned!"} + - if comment.is_pinned: - if v.id != comment.author_id: - message = f"@{v.username} has pinned your [comment]({comment.permalink})!" - send_repeatable_notification(comment.author_id, message) - g.db.commit() - return {"message": "Comment pinned!"} - else: - if v.id != comment.author_id: - message = f"@{v.username} has unpinned your [comment]({comment.permalink})!" - send_repeatable_notification(comment.author_id, message) - g.db.commit() - return {"message": "Comment unpinned!"} +@app.post("/unpin_comment/") +@auth_required +@validate_formkey +def unpin_comment(cid, v): + comment = get_comment(cid, v=v) + if v.id != comment.post.author_id: abort(403) + + if not comment.is_pinned.endswith(" (OP)"): + return {"error": "You can only unpin comments you have pinned!"} + + comment.is_pinned = None + g.db.add(comment) + + if v.id != comment.author_id: + message = f"@{v.username} (OP) has unpinned your [comment]({comment.permalink})!" + send_repeatable_notification(comment.author_id, message) + g.db.commit() + return {"message": "Comment unpinned!"} + @app.post("/save_comment/") @limiter.limit("1/second") @auth_required diff --git a/files/routes/front.py b/files/routes/front.py index 54757a244..b8192b058 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -279,8 +279,9 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words=' pins = pins.all() for pin in pins: - if (pin.stickied.startswith("t:") or pin.stickied.startswith("j:")) and int(time.time()) > int(pin.stickied[2:]): + if pin.stickied_utc and int(time.time()) > pin.stickied_utc: pin.stickied = None + pin.stickied_utc = None g.db.add(pin) pins.remove(pin) diff --git a/files/routes/posts.py b/files/routes/posts.py index a7077a9c8..36576d6dd 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -218,8 +218,9 @@ def post_id(pid, anything=None, v=None): comments = comments2 for pin in pinned: - if pin.is_pinned.startswith("t:") and int(time.time()) > int(pin.is_pinned[2:]): + if pin.is_pinned_utc and int(time.time()) > pin.is_pinned_utc: pin.is_pinned = None + pin.is_pinned_utc = None g.db.add(pin) pinned.remove(pin) diff --git a/files/routes/settings.py b/files/routes/settings.py index a96f80974..66e81a9c2 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -32,32 +32,6 @@ tiers={ "(Rich Bich)": 5, } - - -@app.get("/sex") -@admin_level_required(3) -def sex(v): - data = {'access_token': GUMROAD_TOKEN} - - response = [x['email'] for x in requests.get('https://api.gumroad.com/v2/products/tfcvri/subscribers', data=data, timeout=5).json()["subscribers"]] - emails = [] - - for email in response: - if email.endswith("@gmail.com"): - email=email.split('@')[0] - email=email.split('+')[0] - email=email.replace('.','').replace('_','') - email=f"{email}@gmail.com" - emails.append(email.lower()) - - users = g.db.query(User).filter(User.patron > 0, User.patron < 5).all() - for u in users: - if not u.email or u.email.lower() not in emails: print(f'{u.username} - {u.email}') - - return "sex" - - - @app.post("/settings/removebackground") @limiter.limit("1/second") @auth_required diff --git a/files/routes/static.py b/files/routes/static.py index 0b8cb8a22..51b8357ab 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -169,7 +169,10 @@ def patrons(v): @app.get("/badmins") @auth_desired def admins(v): - admins = g.db.query(User).filter(User.admin_level>0).order_by(User.truecoins.desc()).all() + if v and v.admin_level > 2: + admins = g.db.query(User).filter(User.admin_level>1).order_by(User.truecoins.desc()).all() + admins += g.db.query(User).filter(User.admin_level==1).order_by(User.truecoins.desc()).all() + else: admins = g.db.query(User).filter(User.admin_level>0).order_by(User.truecoins.desc()).all() if not v or v.oldsite: template = '' else: template = 'CHRISTMAS/' return render_template(f"{template}admins.html", v=v, admins=admins) diff --git a/files/routes/votes.py b/files/routes/votes.py index 52680c90b..adab15691 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -118,7 +118,7 @@ def api_vote_post(post_id, new, v): g.db.flush() post.upvotes = g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=1).count() post.downvotes = g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=-1).count() - post.realupvotes = g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=1, real=True).count() - g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=1, real=False).count() - g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=-1, real=True).count() + g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=-1, real=False).count() + post.realupvotes = g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=1, real=True).count() - g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=1, real=False).count() + g.db.query(Vote.id).filter_by(submission_id=post.id, vote_type=-1).count() g.db.add(post) g.db.commit() except: g.db.rollback() @@ -185,7 +185,7 @@ def api_vote_comment(comment_id, new, v): g.db.flush() comment.upvotes = g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=1).count() comment.downvotes = g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=-1).count() - comment.realupvotes = g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=1, real=True).count() - g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=1, real=False).count() - g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=-1, real=True).count() + g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=-1, real=False).count() + comment.realupvotes = g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=1, real=True).count() - g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=1, real=False).count() + g.db.query(CommentVote.id).filter_by(comment_id=comment.id, vote_type=-1).count() g.db.add(comment) g.db.commit() except: g.db.rollback() diff --git a/files/templates/changelog.html b/files/templates/changelog.html index 3a7ee258c..234c9f768 100644 --- a/files/templates/changelog.html +++ b/files/templates/changelog.html @@ -104,6 +104,6 @@ {% endif %} - + {% endblock %} \ No newline at end of file diff --git a/files/templates/comments.html b/files/templates/comments.html index 8b3721c32..f1b8eeb73 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -191,10 +191,8 @@ {% if c.active_flags %}{{c.active_flags}} Reports{% endif %} {% if c.over_18 %}+18{% endif %} {% if v and v.admin_level > 1 and c.author.shadowbanned %}{% endif %} - {% if c.is_pinned and c.is_pinned.startswith('t:') %} - - {% elif c.is_pinned %} - + {% if c.is_pinned %} + {% endif %} {% if c.distinguish_level %}{% endif %} {% if c.is_op %}{% endif %} @@ -303,43 +301,76 @@ {% endif %}
-
    - {% if v and v.admin_level > 1 %} - - {% endif %} - -
  • - {% if v %} - - {% endif %} - + +
    +
    +
      +
    • + {% if v and v.admin_level > 1 %} + + + + {% endif %} +
    • + + {% if v %} + + {% endif %} - {% if v and request.path.startswith('/@') and v.admin_level == 0 %} - {% if voted==1 %} - +
    • + + + +
    • + + {% if v and request.path.startswith('/@') and not v.admin_level %} +
    • + {% if voted==1 %} + + {% endif %} + + {{score}} + + {% if voted==-1 %} + + {% endif %} +
    • + {% elif v %} +
    • + + + + + {{score}} + + + + +
    • + {% else %} +
    • + + + + + {{score}} + + + + +
    • {% endif %} - {% elif v %} - - {% else %} - - {% endif %} +
    +
    +
    + + + + + + - {{score}} - - {% if v and request.path.startswith('/@') and v.admin_level == 0 %} - {% if voted==-1 %} - - {% endif %} - {% elif v %} - - {% else %} - - {% endif %} -
  • -
@@ -419,10 +450,16 @@ {% endif %} - {% if v and c.post and (v.admin_level > 1 or v.id == c.post.author_id) %} - - - + {% if v and c.post %} + {% if v.admin_level > 1 %} + + + + {% elif v.id == c.post.author_id and v.admin_level %} + + + + {% endif %} {% endif %} @@ -566,9 +603,9 @@ {% endif %} - {% if c.post and v.id == c.post.author_id %} + {% if c.post and v.id == c.post.author_id and not v.admin_level %} Pin - Unpin + Unpin {% endif %} {% endif %} @@ -595,8 +632,8 @@
- + - + \ No newline at end of file