gffg
This commit is contained in:
parent
e35cbd9147
commit
b2342e4512
2 changed files with 10 additions and 7 deletions
|
@ -329,10 +329,11 @@ class Comment(Base):
|
||||||
url_noquery = url.split('?')[0]
|
url_noquery = url.split('?')[0]
|
||||||
body = body.replace(url, f"{url_noquery}?{urlencode(p, True)}")
|
body = body.replace(url, f"{url_noquery}?{urlencode(p, True)}")
|
||||||
|
|
||||||
if v and v.shadowbanned and v.id == self.author_id and 86400 > time.time() - self.created_utc > 600:
|
if v and v.shadowbanned and v.id == self.author_id and 86400 > time.time() - self.created_utc > 60:
|
||||||
rand = randint(1,16)
|
ti = int(time.time() - self.created_utc)/10
|
||||||
if self.upvotes < rand:
|
maxupvotes = min(ti, 31)
|
||||||
self.upvotes = rand
|
if self.upvotes < maxupvotes:
|
||||||
|
self.upvotes += randint(0, 5)
|
||||||
g.db.add(self)
|
g.db.add(self)
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
|
|
|
@ -331,10 +331,12 @@ class Submission(Base):
|
||||||
|
|
||||||
if v.nitter: body = body.replace("www.twitter.com", "nitter.net").replace("twitter.com", "nitter.net")
|
if v.nitter: body = body.replace("www.twitter.com", "nitter.net").replace("twitter.com", "nitter.net")
|
||||||
|
|
||||||
if v and v.shadowbanned and v.id == self.author_id and 86400 > time.time() - self.created_utc > 600:
|
if v and v.shadowbanned and v.id == self.author_id and 86400 > time.time() - self.created_utc > 20:
|
||||||
rand = random.randint(1,16)
|
ti = int(time.time() - self.created_utc)/10
|
||||||
|
maxupvotes = min(ti, 27)
|
||||||
|
rand = random.randint(1, maxupvotes)
|
||||||
if self.upvotes < rand:
|
if self.upvotes < rand:
|
||||||
self.upvotes = rand
|
self.upvotes += random.randint(0,5)
|
||||||
g.db.add(self)
|
g.db.add(self)
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue