remove pizza autovote

remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-11-09 23:27:12 +02:00
parent 4f0f4412c0
commit c066227d2b
3 changed files with 0 additions and 22 deletions

View File

@ -444,22 +444,3 @@ def execute_lawlz_actions(v:User, p:Submission):
g.db.add(ma_1)
g.db.add(ma_2)
g.db.add(ma_3)
def execute_pizza_autovote(v:User, target:Union[Submission, Comment]):
if v.id != PIZZASHILL_ID: return
if SITE_NAME != 'rDrama': return
votes = len(PIZZA_VOTERS)
for uid in PIZZA_VOTERS:
if isinstance(target, Submission):
autovote = Vote(user_id=uid, submission_id=target.id, vote_type=1)
elif isinstance(target, Comment):
autovote = CommentVote(user_id=uid, comment_id=target.id, vote_type=1)
else:
raise TypeError("Expected Submission or Comment")
autovote.created_utc += 1
g.db.add(autovote)
v.coins += votes
v.truescore += votes
g.db.add(v)
target.upvotes += votes
g.db.add(target)

View File

@ -339,8 +339,6 @@ def comment(v):
c.voted = 1
execute_pizza_autovote(v, c)
if v.marseyawarded and parent_post.id not in ADMIGGER_THREADS and marseyaward_body_regex.search(body_html):
abort(403, "You can only type marseys!")

View File

@ -910,7 +910,6 @@ def submit_post(v, sub=None):
v.post_count = g.db.query(Submission).filter_by(author_id=v.id, deleted_utc=0).count()
g.db.add(v)
execute_pizza_autovote(v, post)
execute_lawlz_actions(v, post)
cache.delete_memoized(frontlist)