From 80cf5a6ccd6a800bcf9294ec2f8a90aadf800f4e Mon Sep 17 00:00:00 2001 From: "Riley L." Date: Wed, 20 Nov 2024 21:59:27 +0100 Subject: add maximum url parameter; document special list in readme --- abrechenbarkeit.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'abrechenbarkeit.lua') diff --git a/abrechenbarkeit.lua b/abrechenbarkeit.lua index b7636a1..b7ec392 100755 --- a/abrechenbarkeit.lua +++ b/abrechenbarkeit.lua @@ -584,7 +584,7 @@ local function r_users(show_special, filter_negative) local is_spu = user.name:sub(1, 1) == "@" local filter_out = query.prefix ~= nil and user.name:sub(1, 1):lower() ~= query.prefix if (filter_negative ~= nil and user.balance < filter_negative) - or (filter_negative == nil and is_spu == show_special and not filter_out) then + or (filter_negative == nil and is_spu == show_special and (not filter_out)) then print(format([[
  • {!username} @@ -599,9 +599,10 @@ local function r_users(show_special, filter_negative) end local inactive_cutoff = os.time() - (tonumber(config.inactive_cutoff) or (30 * 24 * 60 * 60)) for _, user in ipairs(get_active_users()) do - if user.time > inactive_cutoff then show_user(user) end + if filter_negative or user.time > inactive_cutoff then show_user(user) end end print("") + if filter_negative ~= nil then return end print(format([[
    {+users.inactive_list}
      ]])) for _, user in ipairs(users) do if user.time <= inactive_cutoff then show_user(user) end @@ -802,8 +803,7 @@ if path == "/" then elseif query.users and query.export then return r_export_balances() else - return r_users(false, query.negative) - -- tonumber(query.negative or 0) or nil) + return r_users(false, query.negative and (query.maximum or 0)) end else local username = extract_username() -- cgit v1.2.3-70-g09d2