aboutsummaryrefslogtreecommitdiff
path: root/doc/protocol.txt
diff options
context:
space:
mode:
authorLejo <Lejo_1@web.de>2020-07-30 00:16:21 +0300
committerGitHub <noreply@github.com>2020-07-29 23:16:21 +0200
commit715a123a33db7b0f191259ba68cbc9c565d0d4e8 (patch)
tree5925cc93ad339477d58dcea42bcf79b62e2ded5d /doc/protocol.txt
parentf34abaedd2b9277c1862cd9b82ca3338747f104e (diff)
Add PUT and DELETE request + specific method value to HTTP API (#9909)
Diffstat (limited to 'doc/protocol.txt')
0 files changed, 0 insertions, 0 deletions
103 104 105 106 107 108 109
/*
Minetest
Copyright (C) 2018 nerzhul, Loic Blot <loic.blot@unix-experience.fr>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "mods.h"
#include "filesys.h"
#include "log.h"
#include "scripting_server.h"
#include "content/subgames.h"
#include "porting.h"
#include "util/metricsbackend.h"

/**
 * Manage server mods
 *
 * All new calls to this class must be tested in test_servermodmanager.cpp
 */

/**
 * Creates a ServerModManager which targets worldpath
 * @param worldpath
 */
ServerModManager::ServerModManager(const std::string &worldpath) :
		ModConfiguration(worldpath)
{
	SubgameSpec gamespec = findWorldSubgame(worldpath);

	// Add all game mods and all world mods
	addModsInPath(gamespec.gamemods_path);
	addModsInPath(worldpath + DIR_DELIM + "worldmods");

	// Load normal mods
	std::string worldmt = worldpath + DIR_DELIM + "world.mt";
	addModsFromConfig(worldmt, gamespec.addon_mods_paths);
}

// clang-format off
// This function cannot be currenctly easily tested but it should be ASAP
void ServerModManager::loadMods(ServerScripting *script)