mirror of
https://github.com/mt-mods/playerfactions.git
synced 2024-11-22 07:13:50 +01:00
Show list members only if the members are less than 50 in the /factions info command
This commit is contained in:
parent
7d77eb3a41
commit
0b799f3c5f
4
init.lua
4
init.lua
@ -240,6 +240,9 @@ local function handle_command(name, param)
|
||||
minetest.chat_send_player(name, S("This faction is not registered"))
|
||||
else
|
||||
local fmembers = ""
|
||||
if table.getn(facts[faction_name].members) > 50 then
|
||||
fmembers = "The faction has more than 50 members, the members list can't be shown"
|
||||
elseif
|
||||
for play,_ in pairs(facts[faction_name].members) do
|
||||
if fmembers == "" then
|
||||
fmembers = play
|
||||
@ -247,6 +250,7 @@ local function handle_command(name, param)
|
||||
fmembers = fmembers..", "..play
|
||||
end
|
||||
end
|
||||
end
|
||||
minetest.chat_send_player(name, S("Name: @1\nOwner: @2\nMembers: @3", faction_name, factions.get_owner(faction_name), fmembers))
|
||||
if factions.get_owner(faction_name) == name or minetest.get_player_privs(name).playerfactions_admin then
|
||||
minetest.chat_send_player(name, S("Password: @1", factions.get_password(faction_name)))
|
||||
|
Loading…
Reference in New Issue
Block a user