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/files/classes/comment.py b/files/classes/comment.py
index 6a7c962f8..025aaa652 100644
--- a/files/classes/comment.py
+++ b/files/classes/comment.py
@@ -300,7 +300,9 @@ class Comment(Base):
if not body: return ""
+ t = time.time()
body = censor_slurs(body, v)
+ print(time.time() - t)
if v and not v.oldreddit: body = body.replace("old.reddit.com", "reddit.com")
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
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/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):
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 %}
-