remotes/1693045480750635534/spooky-22
Aevann1 2021-11-19 02:03:35 +02:00
parent e90d3fa9b1
commit bcfaad7c72
2 changed files with 35 additions and 30 deletions

View File

@ -205,7 +205,8 @@ def transfer_coins(v, username):
if not v.patron and not receiver.patron:
tax = math.ceil(amount*0.03)
tax_receiver = g.db.query(User).filter_by(id=TAX_RECEIVER_ID).first()
tax_receiver.coins += tax/3
if request.host == 'rdrama.net': tax_receiver.coins += tax/3
else: tax_receiver.coins += tax
log_message = f"[@{v.username}]({v.url}) has transferred {amount} {app.config['COINS_NAME']} to [@{receiver.username}]({receiver.url})"
send_notification(TAX_RECEIVER_ID, log_message)
g.db.add(tax_receiver)

View File

@ -41,8 +41,9 @@
{% block desktopUserBanner %}
<script>
const TRANSFER_TAX = 0.01;
{% if v %}
<script>
const TRANSFER_TAX = {% if v.patron or u.patron %}0{% else %}0.03{% endif %};
function updateTax(mobile=false) {
let suf = mobile ? "-mobile" : "";
@ -73,8 +74,11 @@
setTimeout(_ => t.disabled = false, 2000);
}
</script>
{% endif %}
{% if u.song %}
{% if u.song %}
<script>
var audio = new Audio('/songs/{{u.id}}');
audio.loop=true;
@ -103,8 +107,8 @@
}, {once : true});
});
{% endif %}
</script>
</script>
{% endif %}
<div class="row d-none d-md-block">
<div class="col px-0">