Remove special cases for unused awards.

Removes the following awards / fields on User:
 - flairlock
 - progressivestack
 - bird
 - longpost (pizzashill)
 - marseyawarded
 - rehab
 - deflector
 - mute
 - unmutable
 - eye (All-Seeing Eye)
 - alt (Alt-Seeing Eye)

Primarily motivated by starting to remove some un-Mottelike cruft
from core commenting/posting routes. Cleared out other inapplicable
awards while in the process.
This commit is contained in:
TLSM 2022-11-07 03:01:44 -05:00 committed by Ben Rog-Wilhelm
parent 9de6f20dea
commit 3f360bb457
18 changed files with 77 additions and 582 deletions

View file

@ -170,12 +170,6 @@ def api_comment(v):
body = request.values.get("body", "").strip()[:10000]
if parent_post.id not in ADMINISTRATORS:
if v.longpost and (len(body) < 280 or ' [](' in body or body.startswith('[](')):
return {"error":"You have to type more than 280 characters!"}, 403
elif v.bird and len(body) > 140:
return {"error":"You have to type less than 140 characters!"}, 403
if not body and not request.files.get('file'): return {"error":"You need to actually write something!"}, 400
if request.files.get("file") and request.headers.get("cf-ipcountry") != "T1":
@ -251,7 +245,7 @@ def api_comment(v):
is_bot = bool(request.headers.get("Authorization"))
if parent_post.id not in ADMINISTRATORS and not is_bot and not v.marseyawarded and len(body) > 10:
if parent_post.id not in ADMINISTRATORS and not is_bot and len(body) > 10:
now = int(time.time())
cutoff = now - 60 * 60 * 24
@ -324,9 +318,6 @@ def api_comment(v):
c.voted = 1
if v.marseyawarded and parent_post.id not in ADMINISTRATORS and marseyaward_body_regex.search(body_html):
return {"error":"You can only type marseys!"}, 403
g.db.commit()
if request.headers.get("Authorization"): return c.json
@ -405,11 +396,6 @@ def edit_comment(cid, v):
return {"error":"You have to actually type something!"}, 400
if body != c.body or request.files.get("file") and request.headers.get("cf-ipcountry") != "T1":
if v.longpost and (len(body) < 280 or ' [](' in body or body.startswith('[](')):
return {"error":"You have to type more than 280 characters!"}, 403
elif v.bird and len(body) > 140:
return {"error":"You have to type less than 140 characters!"}, 403
body_html = sanitize(body, edit=True)
# Spam Checking
@ -473,9 +459,6 @@ def edit_comment(cid, v):
if len(body_html) > 20000: abort(400)
if v.marseyawarded and marseyaward_body_regex.search(body_html):
return {"error":"You can only type marseys!"}, 403
c.body = body[:10000]
c.body_html = body_html