-- Crear el comando para invocar la entidad
minetest.register_chatcommand("total_users", {
    description = "Tells how many users haver registered.",
    privs = {server = true},  -- El comando solo será accesible para usuarios con el privilegio interactuar
    
    func = function(name)


	local auth_handler = minetest.get_auth_handler()
	local count = 0
	for playername in auth_handler.iterate() do
		count = count + 1
	end
  
        core.chat_send_player(name, "Total registered users: " .. count)

    end,
})