From 7be11931578d799451a0e83a93c05a8c9a598bd0 Mon Sep 17 00:00:00 2001 From: "Riley L." Date: Tue, 29 Jul 2025 23:46:16 +0200 Subject: remove error for SPUs --- abrechenbarkeit.lua | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'abrechenbarkeit.lua') 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([[ -

{+user.form.transaction.funds}

- ]], { - 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([[ +

{+user.form.transaction.funds}

+ ]], { + balance = format_amount(bal, "span", ""), + threshold = format_amount(tonumber(config.balance_min), "span", ""), + }) + end end -- add transaction -- cgit v1.2.3-70-g09d2