mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
CSM: add requested CSM_RF_READ_PLAYERINFO (#8007)
* CSM: add requested CSM_RF_READ_PLAYERINFO This new CSM limit permit to limit PLAYERINFO read from server. It affects get_player_names call
This commit is contained in:
parent
9080d7c990
commit
a5197eaebc
7 changed files with 20 additions and 6 deletions
|
@ -40,8 +40,13 @@ end)
|
|||
core.register_chatcommand("list_players", {
|
||||
description = core.gettext("List online players"),
|
||||
func = function(param)
|
||||
local players = table.concat(core.get_player_names(), ", ")
|
||||
core.display_chat_message(core.gettext("Online players: ") .. players)
|
||||
local player_names = core.get_player_names()
|
||||
if not player_names then
|
||||
return false, core.gettext("This command is disabled by server.")
|
||||
end
|
||||
|
||||
local players = table.concat(player_names, ", ")
|
||||
return true, core.gettext("Online players: ") .. players
|
||||
end
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue