fdfd
parent
9134efb3e6
commit
c6f997f374
|
@ -399,6 +399,19 @@ def u_username_comments(username, v=None):
|
||||||
}
|
}
|
||||||
|
|
||||||
if u.is_private and (not v or (v.id != u.id and v.admin_level < 3)):
|
if u.is_private and (not v or (v.id != u.id and v.admin_level < 3)):
|
||||||
|
paidrent = False
|
||||||
|
if v and u.id == 253:
|
||||||
|
if int(time.time()) - v.rent_utc < 600: paidrent = True
|
||||||
|
elif request.args.get("rent") == "true" and v.dramacoins > 500:
|
||||||
|
v.dramacoins -= 500
|
||||||
|
v.rent_utc = int(time.time())
|
||||||
|
g.db.add(v)
|
||||||
|
u.dramacoins += 500
|
||||||
|
g.db.add(u)
|
||||||
|
send_notification(1046, u, f"@{v.username} has paid rent!")
|
||||||
|
paidrent = True
|
||||||
|
|
||||||
|
if not paidrent:
|
||||||
return {'html': lambda: render_template("userpage_private.html",
|
return {'html': lambda: render_template("userpage_private.html",
|
||||||
u=u,
|
u=u,
|
||||||
v=v),
|
v=v),
|
||||||
|
|
Loading…
Reference in New Issue