diff --git a/files/routes/front.py b/files/routes/front.py index 4d872377c..8e74b0bb6 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -186,9 +186,11 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words=' if random.random() < 0.004: for post in posts: if post.author and post.author.shadowbanned: + rand = random.randint(5,20) + if post.score > rand: continue rand = random.randint(500,1400) vote = Vote(user_id=rand, - vote_type=random.choice([-1, 1]), + vote_type=random.choice([-1, 1, 1, 1, 1]), submission_id=post.id) g.db.add(vote) try: g.db.flush() diff --git a/files/routes/posts.py b/files/routes/posts.py index bdc088225..0539b2de8 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -166,9 +166,11 @@ def post_id(pid, anything=None, v=None): if random.random() < 0.02: for comment in comments: if comment.author and comment.author.shadowbanned: + rand = random.randint(5,20) + if comment.score > rand: continue rand = random.randint(500,1400) vote = CommentVote(user_id=rand, - vote_type=random.choice([-1, 1]), + vote_type=random.choice([-1, 1, 1, 1, 1]), comment_id=comment.id) g.db.add(vote) try: g.db.flush()