hggh
This commit is contained in:
parent
b2c09f68de
commit
cc8eb50908
3 changed files with 5 additions and 2 deletions
|
@ -147,7 +147,7 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, filter_words='
|
|||
secondrange = firstrange+200
|
||||
posts = posts[firstrange:secondrange]
|
||||
|
||||
if v and v.hidevotedon: posts = [x for x in posts if not (hasattr(x, 'voted') and x.voted != 0)]
|
||||
if v and v.hidevotedon: posts = [x for x in posts if not hasattr(x, 'voted') or x.voted == 0]
|
||||
|
||||
words = ['captainmeta4', ' cm4 ', 'dissident001', 'ladine']
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ beams_client = PushNotifications(
|
|||
@app.post("/pay_rent")
|
||||
@auth_required
|
||||
def pay_rent(v):
|
||||
if v.coins < 500: return "You must have more than 500 coins."
|
||||
v.coins -= 500
|
||||
v.rent_utc = int(time.time())
|
||||
g.db.add(v)
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
<h2 class="h5">This account is private</h2>
|
||||
<p class="text-muted">This user has enabled private mode to cloak their posting history.</p>
|
||||
{% if u.id == 253 and 'rdrama' in request.host %}
|
||||
<a class="btn btn-primary" href="javascript:void(0)", onclick="post('/pay_rent', callback=function(){window.location.reload(true)})">Pay rent to view profile (500 coins)</a>
|
||||
{% if v and v.coins > 500 and not v.is_suspended %}
|
||||
<a class="btn btn-primary" href="javascript:void(0)", onclick="post('/pay_rent', callback=function(){window.location.reload(true)})">Pay rent to view profile (500 coins)</a>
|
||||
{% endif %}
|
||||
<pre></pre>
|
||||
{% if v and v.coins > 5000 and time - v.created_utc > 604800 and not v.is_suspended %}
|
||||
<a class="btn btn-primary" href="javascript:void(0)", onclick="post('/steal', callback=function(){window.location.reload(true)})">Attempt to steal coins</a>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue