Bugfixes after test with Skylar!

This commit is contained in:
Nathan Schneider
2021-12-21 18:12:59 -07:00
parent 956f9a2635
commit 9a2c72c6a1
13 changed files with 71 additions and 16 deletions

View File

@ -0,0 +1,20 @@
-- ===================================================================
-- Function: modpol.list_users(org)
-- Overwrites function at /users.lua
-- Params:
-- if nil, lists instance members; if an org name, lists its members
-- Output: a table with names of players currently in the game
modpol.list_users = function(org)
local users = {}
if (org == nil) then -- no specified org; all players
for _,player in ipairs(minetest.get_connected_players()) do
local name = player:get_player_name()
table.insert(users,name)
end
else -- if an org is specified
if (modpol.orgs[org] ~= nil) then -- org exists
users = modpol.orgs[org]["members"]
end
end
return users
end