remotes/1693045480750635534/spooky-22
Aevann1 2021-11-22 16:32:39 +02:00
parent a84cb6f20a
commit d2e33671c3
2 changed files with 3 additions and 2 deletions

View File

@ -332,7 +332,8 @@ class Comment(Base):
if v and v.shadowbanned and v.id == self.author_id and 86400 > time.time() - self.created_utc > 60:
ti = int(time.time() - self.created_utc)/10
maxupvotes = min(ti, 31)
if self.upvotes < maxupvotes:
rand = random.randint(1, maxupvotes)
if self.upvotes < rand:
self.upvotes += randint(0, 5)
g.db.add(self)
g.db.commit()

View File

@ -336,7 +336,7 @@ class Submission(Base):
maxupvotes = min(ti, 27)
rand = random.randint(1, maxupvotes)
if self.upvotes < rand:
self.upvotes += random.randint(0,5)
self.upvotes += random.randint(0, 5)
g.db.add(self)
g.db.commit()