merged changes, using standardized lazy table length function instead of for loop in interactions module

This commit is contained in:
Luke Miller
2022-08-16 11:12:07 -04:00
6 changed files with 22 additions and 51 deletions

View File

@ -223,20 +223,17 @@ function modpol.interactions.org_dashboard(user, org_string)
print("Error: Module not found.")
modpol.interactions.org_dashboard(user, org.id)
end
elseif sel == 'p' or sel == 'P' then
local processes = {}
elseif sel == 'p' or sel == 'P' then -- Pending processes
print("All processes: (* indicates pending)")
for i,v in ipairs(org.processes) do
if v ~= "deleted" then
local active = ''
if org.pending[user] then
if org.pending[user][v.id] then
active = '*'
end
for i,v in ipairs(processes) do
local active = ''
if org.pending[user] then
if org.pending[user][v.id] then
active = '*'
end
print("["..v.id.."] "..v.slug..active)
end
print("["..v.id.."] "..v.slug..active)
end
print()
print("Interact with which one (use [id] number)?")