diff --git a/files/routes/admin.py b/files/routes/admin.py index 114e16816..7f4d1f305 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -23,7 +23,6 @@ from files.helpers.discord import add_role @app.get("/admin/shadowbanned") @auth_required def shadowbanned(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") if not (v and v.admin_level == 6): abort(404) users = [x for x in g.db.query(User).filter_by(shadowbanned = True).all()] return render_template("banned.html", v=v, users=users) @@ -32,7 +31,6 @@ def shadowbanned(v): @app.get("/admin/agendaposters") @auth_required def agendaposters(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") if not (v and v.admin_level == 6): abort(404) users = [x for x in g.db.query(User).filter_by(agendaposter = True).all()] return render_template("banned.html", v=v, users=users) diff --git a/files/routes/comments.py b/files/routes/comments.py index f5b2aca40..36b353501 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -28,7 +28,7 @@ beams_client = PushNotifications( @auth_desired def post_pid_comment_cid(cid, pid=None, anything=None, v=None): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + if not v and "logged_out" not in request.path: return redirect(f"/logged_out/comment/{cid}") diff --git a/files/routes/front.py b/files/routes/front.py index 6bc1ba549..01c2c019d 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -14,7 +14,7 @@ def slash_post(): @auth_required def notifications(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + page = int(request.args.get('page', 1)) all_ = request.args.get('all', False) @@ -190,7 +190,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words=' @auth_desired def front_all(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + if not v and request.path == "/": return redirect("/logged_out") @@ -300,7 +300,7 @@ def changeloglist(v=None, sort="new", page=1 ,t="all", **kwargs): @app.get("/changelog") @auth_desired def changelog(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + page = int(request.args.get("page") or 1) page = max(page, 1) @@ -330,7 +330,7 @@ def changelog(v): @app.get("/random") @auth_desired def random_post(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + x = g.db.query(Submission).filter(Submission.deleted_utc == 0, Submission.is_banned == False) @@ -404,7 +404,7 @@ def comment_idlist(page=1, v=None, nsfw=False, sort="new", t="all", **kwargs): @app.get("/comments") @auth_desired def all_comments(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + page = int(request.args.get("page", 1)) diff --git a/files/routes/posts.py b/files/routes/posts.py index c03c64053..4b337d408 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -39,7 +39,7 @@ def publish(pid, v): @app.get("/submit") @auth_required def submit_get(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + return render_template("submit.html", v=v) @@ -51,7 +51,7 @@ def submit_get(v): @auth_desired def post_id(pid, anything=None, v=None): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + if not v and "logged_out" not in request.path: return redirect(f"/logged_out/post/{pid}") diff --git a/files/routes/search.py b/files/routes/search.py index 9e05b9efd..ab3b89fa0 100644 --- a/files/routes/search.py +++ b/files/routes/search.py @@ -196,7 +196,7 @@ def searchcommentlisting(criteria, v=None, page=1, t="None", sort="top"): @app.get("/search/posts") @auth_desired def searchposts(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + query = request.args.get("q", '').strip() @@ -237,7 +237,7 @@ def searchposts(v): @app.get("/search/comments") @auth_desired def searchcomments(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + query = request.args.get("q", '').strip() @@ -262,7 +262,7 @@ def searchcomments(v): @app.get("/search/users") @auth_desired def searchusers(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + query = request.args.get("q", '').strip() diff --git a/files/routes/settings.py b/files/routes/settings.py index 08d334d10..79a916d71 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -479,7 +479,7 @@ def update_announcement(v): @app.get("/settings/blocks") @auth_required def settings_blockedpage(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + #users=[x.target for x in v.blocked] @@ -489,7 +489,7 @@ def settings_blockedpage(v): @app.get("/settings/css") @auth_required def settings_css_get(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + return render_template("settings_css.html", v=v) @@ -508,7 +508,7 @@ def settings_css(v): @app.get("/settings/profilecss") @auth_required def settings_profilecss_get(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + if v.coins < 1000 and not v.patron: return f"You must have +1000 {COINS_NAME} or be a patron to set profile css." return render_template("settings_profilecss.html", v=v) @@ -585,7 +585,7 @@ def settings_unblock_user(v): @app.get("/settings/apps") @auth_required def settings_apps(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + return render_template("settings_apps.html", v=v) @@ -608,7 +608,7 @@ def settings_remove_discord(v): @app.get("/settings/content") @auth_required def settings_content_get(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + return render_template("settings_filters.html", v=v) diff --git a/files/routes/static.py b/files/routes/static.py index 330987430..f0c734d80 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -43,7 +43,7 @@ def participation_stats(v): @app.get("/paypigs") @auth_desired def patrons(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + users = g.db.query(User).options(lazyload('*')).filter(User.patron > 0).order_by(User.patron.desc()).all() return render_template("patrons.html", v=v, users=users) @@ -108,7 +108,7 @@ def api(v): @app.get("/contact") @auth_desired def contact(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + return render_template("contact.html", v=v) @app.post("/contact") @@ -151,7 +151,7 @@ def robots_txt(): @app.get("/settings") @auth_required def settings(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + return redirect("/settings/profile") @@ -159,7 +159,7 @@ def settings(v): @app.get("/settings/profile") @auth_required def settings_profile(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + return render_template("settings_profile.html", v=v) @@ -168,7 +168,7 @@ def settings_profile(v): @app.get("/titles") @auth_desired def titles(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + titles = [x for x in g.db.query(Title).order_by(text("id asc")).all()] return render_template("/titles.html", @@ -178,7 +178,7 @@ def titles(v): @app.get("/badges") @auth_desired def badges(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + badges = g.db.query(BadgeDef).all() return render_template("badges.html", v=v, badges=badges) @@ -186,7 +186,7 @@ def badges(v): @app.get("/blocks") @auth_desired def blocks(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + blocks=g.db.query(UserBlock).all() users = [] @@ -200,7 +200,7 @@ def blocks(v): @app.get("/banned") @auth_desired def banned(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + users = [x for x in g.db.query(User).filter(User.is_banned > 0, User.unban_utc == 0).all()] return render_template("banned.html", v=v, users=users) @@ -208,7 +208,7 @@ def banned(v): @app.get("/formatting") @auth_desired def formatting(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + return render_template("formatting.html", v=v) @@ -228,7 +228,7 @@ def serviceworker(): @app.get("/settings/security") @auth_required def settings_security(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + return render_template("settings_security.html", v=v, diff --git a/files/routes/users.py b/files/routes/users.py index d70b9baef..7e529c7d0 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -250,7 +250,7 @@ def redditor_moment_redirect(username): # @app.get("/rentoids") # @auth_desired # def rentoids(v): -# if v and v.is_banned and not v.unban_utc: return render_template("seized.html") +# # users = g.db.query(User).filter(User.rent_utc > 0).all() # return render_template("rentoids.html", v=v, users=users) @@ -258,7 +258,7 @@ def redditor_moment_redirect(username): @app.get("/@/followers") @auth_required def followers(username, v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + u = get_user(username, v=v) users = [x.user for x in u.followers] @@ -276,7 +276,7 @@ def visitors(v): @app.get("/logged_out/@") @auth_desired def u_username(username, v=None): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + if not v and "logged_out" not in request.path: return redirect(f"/logged_out/@{username}") @@ -397,7 +397,7 @@ def u_username(username, v=None): @app.get("/logged_out/@/comments") @auth_desired def u_username_comments(username, v=None): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + if not v and "logged_out" not in request.path: return redirect(f"/logged_out/@{username}/comments") diff --git a/files/routes/votes.py b/files/routes/votes.py index 5b8518c1e..43cc2d930 100644 --- a/files/routes/votes.py +++ b/files/routes/votes.py @@ -8,7 +8,7 @@ from files.__main__ import app @app.get("/votes") @auth_desired def admin_vote_info_get(v): - if v and v.is_banned and not v.unban_utc: return render_template("seized.html") + link = request.args.get("link") if not link: return render_template("votes.html", v=v) diff --git a/files/templates/comments.html b/files/templates/comments.html index f99cc64a2..e0aeb4e58 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -148,7 +148,7 @@

 				
 			
diff --git a/files/templates/default.html b/files/templates/default.html
index 0922520b7..e01d1a8ec 100644
--- a/files/templates/default.html
+++ b/files/templates/default.html
@@ -1034,7 +1034,7 @@
 
  
 
-
+
 
 {% include "header.html" %}
 
diff --git a/files/templates/seized.html b/files/templates/seized.html
deleted file mode 100644
index 05ed37dbf..000000000
--- a/files/templates/seized.html
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/files/templates/submission.html b/files/templates/submission.html
index a4d38e45d..99bcd403e 100644
--- a/files/templates/submission.html
+++ b/files/templates/submission.html
@@ -241,7 +241,7 @@
 						

 						
 					
diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html
index 2875c737b..e090851c2 100644
--- a/files/templates/submission_listing.html
+++ b/files/templates/submission_listing.html
@@ -382,7 +382,7 @@
 		

 		
 	
diff --git a/snappy.txt b/snappy.txt
index ad90fea19..ae23c9b16 100644
--- a/snappy.txt
+++ b/snappy.txt
@@ -680,9 +680,7 @@ Now, if I did end up in prison somehow, my philosophy would still hold true. Go
 Son, you have to believe in your own skill set and understand it will take you far. I’ve spent years honing my Nazi punching skills and I’m unstoppable.
 
 I hope you’ve learned a little something today.
-{[para]}
-fuck off, carp
-{[para]}
+s{[para]}
 FUCK OFF AND KYS PATHETIC FAGGOT, YOUR WORTHLESS BOT WAS THE FIRST THING I HAD TO BLOCK ON THIS SITE AND NOW YOU'RE THE SECOND MOTHER RAPING PIECE OF TRASH AND WASTE OF OXYGEN FUCKING DIE DIE DIE PIECE OF SHIT RETARD THAT I NOW ALSO HAVE TO BLOCK.
 
 YOU DON'T DESERVE LIFE.