From 2dd3a66cb95e23d2f26181c25f746a0a3a101010 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 18 Oct 2021 22:39:15 +0200 Subject: [PATCH 1/5] sneed --- fd | 7 ------- push.sh | 12 +++++------- 2 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 fd diff --git a/fd b/fd deleted file mode 100644 index d50c5ca33..000000000 --- a/fd +++ /dev/null @@ -1,7 +0,0 @@ -git pull -git add . -git commit -m "sneed" -git push - -cd /media/a/Files/1 -git pull diff --git a/push.sh b/push.sh index 6c2909f89..64da5305b 100755 --- a/push.sh +++ b/push.sh @@ -1,7 +1,5 @@ -git pull -git add . -git commit -m "sneed" -git push - -cd D:\1 -git pull \ No newline at end of file +git pull +git add . +git commit -m "sneed" +git push +. /media/a/Files/1 From c4a4a21326dcdea0a1a9ee5ea0a5cd0680f796e7 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 18 Oct 2021 22:43:34 +0200 Subject: [PATCH 2/5] fd --- files/routes/awards.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/files/routes/awards.py b/files/routes/awards.py index 54d2536b8..7ba92c097 100755 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -317,22 +317,22 @@ def award_comment(cid, v): send_notification(NOTIFICATIONS_ACCOUNT, c.author, msg) if kind == "ban": - author = comment.author - link = f"[this comment]({comment.permalink})" + author = c.author + link = f"[this comment]({c.permalink})" if not author.is_suspended: - author.ban(reason=f"one-day ban award used by @{v.username} on /comment/{comment.id}", days=1) + author.ban(reason=f"one-day ban award used by @{v.username} on /comment/{c.id}", days=1) send_notification(NOTIFICATIONS_ACCOUNT, author, f"Your account has been suspended for a day for {link}. It sucked and you should feel bad.") elif author.unban_utc > 0: author.unban_utc += 24*60*60 g.db.add(author) send_notification(NOTIFICATIONS_ACCOUNT, author, f"Your account has been suspended for yet another day for {link}. Seriously man?") elif kind == "grass": - author = comment.author + author = c.author author.is_banned = AUTOJANNY_ACCOUNT - author.ban_reason = f"grass award used by @{v.username} on /comment/{comment.id}" + author.ban_reason = f"grass award used by @{v.username} on /comment/{c.id}" g.db.add(author) - link = f"[this comment]({comment.permalink})" + link = f"[this comment]({c.permalink})" send_notification(NOTIFICATIONS_ACCOUNT, author, f"Your account has been suspended permanently for {link}. You must [provide the admins](/contact) a timestamped picture of you touching grass to get unbanned!") c.author.received_award_count += 1 From bb1ecb5b6a0ae6045675a05710db6f615175c6a9 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 19 Oct 2021 17:42:58 +0200 Subject: [PATCH 3/5] fsd --- files/routes/static.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/files/routes/static.py b/files/routes/static.py index 1ff5517c8..84531a3c6 100755 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -160,6 +160,7 @@ def patrons(v): return render_template("patrons.html", v=v, result=result) @app.get("/admins") +@app.get("/badmins") @auth_desired def admins(v): admins = g.db.query(User).options(lazyload('*')).filter_by(admin_level=6).order_by(User.coins.desc()).all() @@ -167,6 +168,7 @@ def admins(v): @app.get("/log") +@app.get("/modlog") @auth_desired def log(v): @@ -215,6 +217,8 @@ def api(v): return render_template("api.html", v=v) @app.get("/contact") +@app.get("/press") +@app.get("/media") @auth_required def contact(v): From 4c6443a9da5e767eb576396375dd400395b05276 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 19 Oct 2021 18:16:34 +0200 Subject: [PATCH 4/5] f --- files/routes/settings.py | 10 ++++------ files/templates/header.html | 2 +- files/templates/submission.html | 2 +- files/templates/submission_listing.html | 8 ++++---- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/files/routes/settings.py b/files/routes/settings.py index e1574923f..0ad19ceb2 100755 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -853,16 +853,14 @@ def settings_title_change(v): new_name=request.values.get("title").strip()[:100].replace("𒐪","") - if new_name==v.customtitle: - return render_template("settings_profile.html", - v=v, - error="You didn't change anything") + if new_name==v.customtitle: return render_template("settings_profile.html", v=v, error="You didn't change anything") v.customtitleplain = new_name v.customtitle = filter_title(new_name) - g.db.add(v) - g.db.commit() + if len(v.customtitle) < 1000: + g.db.add(v) + g.db.commit() return redirect("/settings/profile") \ No newline at end of file diff --git a/files/templates/header.html b/files/templates/header.html index 5539f38e7..b74a08d50 100755 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -48,7 +48,7 @@ {% else %} {% endif %} -