diff options
Diffstat (limited to 'abrechenbarkeit.lua')
-rwxr-xr-x | abrechenbarkeit.lua | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/abrechenbarkeit.lua b/abrechenbarkeit.lua index 29de0ef..4a01e7b 100755 --- a/abrechenbarkeit.lua +++ b/abrechenbarkeit.lua @@ -433,14 +433,17 @@ local function r_transaction_post() local time = os.time() -- check if new balance would be less than ;min - local bal = balances()[user_dst] - if amount < 0 and (( bal + amount ) <= (tonumber(config.balance_min) or -99999)) then - return format([[ - <div class="notif error"><p>{+user.form.transaction.funds}</p></div> - ]], { - balance = format_amount(bal, "span", ""), - threshold = format_amount(tonumber(config.balance_min), "span", ""), - }) + local is_special = user_dst:sub(1, 1) == "@" + if not is_special then + local bal = balances()[user_dst] + if amount < 0 and (( bal + amount ) <= (tonumber(config.balance_min) or -99999)) then + return format([[ + <div class="notif error"><p>{+user.form.transaction.funds}</p></div> + ]], { + balance = format_amount(bal, "span", ""), + threshold = format_amount(tonumber(config.balance_min), "span", ""), + }) + end end -- add transaction |