diff --git a/files/classes/mod_logs.py b/files/classes/mod_logs.py index a9e1d9db9..715d9becf 100644 --- a/files/classes/mod_logs.py +++ b/files/classes/mod_logs.py @@ -189,11 +189,6 @@ ACTIONTYPES = { "icon": 'fa-robot', "color": 'bg-danger' }, - 'disabled_Fart_mode': { - "str": 'disabled fart mode', - "icon": 'fa-gas-pump-slash', - "color": 'bg-danger' - }, 'disabled_FilterNewPosts': { "str": 'disabled filter new posts', "icon": 'fa-filter', @@ -239,11 +234,6 @@ ACTIONTYPES = { "icon": 'fa-robot', "color": 'bg-success' }, - 'enabled_Fart_mode': { - "str": 'enabled fart mode', - "icon": 'fa-gas-pump', - "color": 'bg-success' - }, 'enabled_FilterNewPosts': { "str": 'enabled filter new posts', "icon": 'fa-filter', @@ -284,11 +274,6 @@ ACTIONTYPES = { "icon": 'fa-user-crown', "color": 'bg-success' }, - 'make_meme_admin': { - "str": 'made {self.target_link} meme admin', - "icon": 'fa-user-crown', - "color": 'bg-success' - }, 'monthly': { "str": 'distributed monthly marseybux', "icon": 'fa-sack-dollar', @@ -329,11 +314,6 @@ ACTIONTYPES = { "icon": 'fa-user-crown', "color": 'bg-danger' }, - 'remove_meme_admin': { - "str": 'removed {self.target_link} as meme admin', - "icon": 'fa-user-crown', - "color": 'bg-danger' - }, 'revert': { "str": 'reverted {self.target_link} mod actions', "icon": 'fa-history', @@ -424,7 +404,6 @@ ACTIONTYPES = { "icon": 'fa-eye', "color": 'bg-success' }, - 'fallback': { "str": 'unfamiliar action type, please report', "icon": 'fa-robot', diff --git a/files/helpers/const.py b/files/helpers/const.py index 0ca13e88a..642e3b9e5 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -105,14 +105,6 @@ AWARDS = { "icon": "fas fa-user-secret", "color": "text-green", "price": 300 - }, - "beano": { - "kind": "beano", - "title": "Beano", - "description": "Stops you from embarrassing yourself with your flatulence", - "icon": "fas fa-gas-pump-slash", - "color": "text-green", - "price": 1000 }, "pin": { "kind": "pin", diff --git a/files/routes/admin.py b/files/routes/admin.py index e15f204b5..3bea2e27c 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -326,47 +326,6 @@ def club_ban(v, username): g.db.commit() return {"message": f"@{username} has been kicked from the {CC_TITLE}. Deserved."} - -@app.post("/@/make_meme_admin") -@limiter.exempt -@admin_level_required(3) -def make_meme_admin(v, username): - user = get_user(username) - if not user: abort(404) - user.admin_level = 1 - g.db.add(user) - - ma = ModAction( - kind="make_meme_admin", - user_id=v.id, - target_user_id=user.id - ) - g.db.add(ma) - - g.db.commit() - return {"message": "User has been made meme admin!"} - - -@app.post("/@/remove_meme_admin") -@limiter.limit("1/second;30/minute;200/hour;1000/day") -@admin_level_required(3) -def remove_meme_admin(v, username): - user = get_user(username) - if not user: abort(404) - user.admin_level = 0 - g.db.add(user) - - ma = ModAction( - kind="remove_meme_admin", - user_id=v.id, - target_user_id=user.id - ) - g.db.add(ma) - - g.db.commit() - return {"message": "Meme admin removed!"} - - @app.get("/admin/shadowbanned") @limiter.exempt @auth_required diff --git a/files/routes/awards.py b/files/routes/awards.py index cf93b5f0c..feaaa510c 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -216,12 +216,6 @@ def award_post(pid, v): g.db.add(badge) g.db.flush() send_notification(v.id, f"@AutoJanny has given you the following profile badge:\n\n![]({badge.path})\n\n{badge.name}") - elif kind == "beano": - if not author.has_badge(128): - badge = Badge(user_id=author.id, badge_id=128) - g.db.add(badge) - g.db.flush() - send_notification(author.id, f"@AutoJanny has given you the following profile badge:\n\n![]({badge.path})\n\n{badge.name}") if author.received_award_count: author.received_award_count += 1 else: author.received_award_count = 1 @@ -328,12 +322,6 @@ def award_comment(cid, v): g.db.add(badge) g.db.flush() send_notification(v.id, f"@AutoJanny has given you the following profile badge:\n\n![]({badge.path})\n\n{badge.name}") - elif kind == "beano": - if not author.has_badge(128): - badge = Badge(user_id=author.id, badge_id=128) - g.db.add(badge) - g.db.flush() - send_notification(author.id, f"@AutoJanny has given you the following profile badge:\n\n![]({badge.path})\n\n{badge.name}") if author.received_award_count: author.received_award_count += 1 else: author.received_award_count = 1 diff --git a/files/routes/posts.py b/files/routes/posts.py index 01087472b..464345d0a 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -262,7 +262,7 @@ def post_id(pid, anything=None, v=None, sub=None): else: if post.is_banned and not (v and (v.admin_level > 1 or post.author_id == v.id)): template = "submission_banned.html" else: template = "submission.html" - return render_template(template, v=v, p=post, ids=list(ids), sort=sort, render_replies=True, offset=offset, sub=post.subr, fart=app.config['SETTINGS']['Fart mode']) + return render_template(template, v=v, p=post, ids=list(ids), sort=sort, render_replies=True, offset=offset, sub=post.subr) @app.get("/viewmore///") @limiter.limit("1/second;30/minute;200/hour;1000/day") diff --git a/files/routes/static.py b/files/routes/static.py index 97d5db11c..213745ca3 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -29,12 +29,6 @@ def logged_out(old = ""): return redirect(redirect_url) -@app.get("/marseys") -@auth_required -def marseys(v): - marseys = g.db.query(Marsey).order_by(Marsey.count.desc()) - return render_template("marseys.html", v=v, marseys=marseys) - @app.get("/marsey_list") @cache.memoize(timeout=600, make_name=make_name) def marsey_list(): @@ -198,7 +192,6 @@ def cached_chart(kind, site): @app.get("/patrons") -@app.get("/paypigs") @admin_level_required(3) def patrons(v): users = g.db.query(User).filter(User.patron > 0).order_by(User.patron.desc(), User.id).all() @@ -206,7 +199,6 @@ def patrons(v): return render_template("patrons.html", v=v, users=users) @app.get("/admins") -@app.get("/badmins") @auth_desired def admins(v): if v and v.admin_level > 2: diff --git a/files/templates/admin/admin_home.html b/files/templates/admin/admin_home.html index 22c71a730..a44eebe7b 100644 --- a/files/templates/admin/admin_home.html +++ b/files/templates/admin/admin_home.html @@ -73,11 +73,6 @@ -
- - -
-
diff --git a/files/templates/admins.html b/files/templates/admins.html index f5eeed5d6..56b7d12b7 100644 --- a/files/templates/admins.html +++ b/files/templates/admins.html @@ -19,7 +19,7 @@ {% for user in admins %} {{loop.index}} - {{user.username}}{% if user.admin_level == 1 and v and v.admin_level > 1 %}{% endif %} + {{user.username}} {{user.modaction_num}} {% endfor %} diff --git a/files/templates/userpage.html b/files/templates/userpage.html index cfa141628..6159b3943 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -67,10 +67,6 @@ - {% elif u.admin_level == 1 and v and v.admin_level > 1 %} - - - {% endif %} {% if v and v.has_follower(u) %} Follows you @@ -167,12 +163,7 @@ {% if v and v.admin_level > 2 %} Make admin - Remove admin - - Make meme admin - Remove meme admin - {% if u.admin_level > 1 %} Revert admin actions {% endif %} @@ -350,10 +341,6 @@ - {% elif u.admin_level == 1 and v and v.admin_level > 1 %} - - - {% endif %} {% if v and v.has_follower(u) and not v.is_nofollow %} Follows you @@ -441,12 +428,7 @@ {% if v and v.admin_level > 2 %} Make admin - Remove admin - - Make meme admin - Remove meme admin - {% if u.admin_level > 1 %} Revert admin actions {% endif %} diff --git a/site_settings.json b/site_settings.json index db794acad..d0b75d448 100644 --- a/site_settings.json +++ b/site_settings.json @@ -1 +1 @@ -{"Bots": true, "Fart mode": false, "Read-only mode": false, "Signups": true, "FilterNewPosts": false, "FilterCommentsMinComments": 0, "FilterCommentsMinKarma": 0, "FilterCommentsMinAgeDays": 0} +{"Bots": true, "Read-only mode": false, "Signups": true, "FilterNewPosts": false, "FilterCommentsMinComments": 0, "FilterCommentsMinKarma": 0, "FilterCommentsMinAgeDays": 0}