awards: remove grass
This commit is contained in:
parent
377d51c2f8
commit
65fada8155
4 changed files with 1 additions and 51 deletions
|
@ -149,7 +149,7 @@ AWARDS = {
|
|||
"grass": {
|
||||
"kind": "grass",
|
||||
"title": "Grass",
|
||||
"description": "Ban the recipient for 30 days (if they provide a timestamped picture of them touching grass/snow/sand/ass to the admins, they will get unbanned immediately)",
|
||||
"description": "Doesn't do anything",
|
||||
"icon": "fas fa-seedling",
|
||||
"color": "text-success",
|
||||
"price": 10000
|
||||
|
|
|
@ -182,12 +182,6 @@ def award_post(pid, v):
|
|||
author.is_banned = 0
|
||||
author.ban_evade = 0
|
||||
send_repeatable_notification(author.id, "You have been unbanned!")
|
||||
elif kind == "grass":
|
||||
author.is_banned = AUTOJANNY_ID
|
||||
author.ban_reason = f"grass award used by @{v.username} on /post/{post.id}"
|
||||
author.unban_utc = int(time.time()) + 30 * 86400
|
||||
link = f"[this post]({post.shortlink})"
|
||||
send_repeatable_notification(author.id, f"Your account has been banned permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass/snow/sand/ass to get unbanned!")
|
||||
elif kind == "pin":
|
||||
if post.stickied and post.stickied_utc:
|
||||
post.stickied_utc += 3600
|
||||
|
@ -291,12 +285,6 @@ def award_comment(cid, v):
|
|||
author.is_banned = 0
|
||||
author.ban_evade = 0
|
||||
send_repeatable_notification(author.id, "You have been unbanned!")
|
||||
elif kind == "grass":
|
||||
author.is_banned = AUTOJANNY_ID
|
||||
author.ban_reason = f"grass award used by @{v.username} on /comment/{c.id}"
|
||||
author.unban_utc = int(time.time()) + 30 * 86400
|
||||
link = f"[this comment]({c.shortlink})"
|
||||
send_repeatable_notification(author.id, f"Your account has been banned permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass/snow/sand/ass to get unbanned!")
|
||||
elif kind == "pin":
|
||||
if c.is_pinned and c.is_pinned_utc: c.is_pinned_utc += 3600
|
||||
else:
|
||||
|
|
|
@ -156,10 +156,6 @@ def downvoters_comments(v, username, uid):
|
|||
|
||||
return render_template("voted_comments.html", next_exists=next_exists, listing=listing, page=page, v=v, standalone=True)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@app.get("/@<username>/upvoting/<uid>/posts")
|
||||
@admin_level_required(3)
|
||||
def upvoting_posts(v, username, uid):
|
||||
|
@ -243,18 +239,6 @@ def downvoting_comments(v, username, uid):
|
|||
|
||||
return render_template("voted_comments.html", next_exists=next_exists, listing=listing, page=page, v=v, standalone=True)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@app.get("/grassed")
|
||||
@auth_required
|
||||
def grassed(v):
|
||||
users = g.db.query(User).filter(User.ban_reason.like('grass award used by @%')).all()
|
||||
|
||||
return render_template("grassed.html", v=v, users=users)
|
||||
|
||||
|
||||
@app.get("/@<username>/upvoters")
|
||||
@admin_level_required(3)
|
||||
def upvoters(v, username):
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
{% extends "settings2.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="overflow-x-auto">
|
||||
<table class="table table-striped mb-5">
|
||||
<thead class="bg-primary text-white">
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Name</th>
|
||||
<th>Grasser</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td>{{loop.index}}</td>
|
||||
<td><a style="color:#{{user.namecolor}}" href="/@{{user.username}}"><img loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}}"{% endif %}>{{user.username}}</span></a></td>
|
||||
<td>{{user.ban_reason.split('by ')[1]}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue