mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-30 19:22:14 +00:00
Show supported backends in --help output (#16441)
This commit is contained in:
parent
04d9bd518f
commit
3f0f7f4285
7 changed files with 113 additions and 17 deletions
|
@ -4289,15 +4289,28 @@ ModStorageDatabase *Server::openModStorageDatabase(const std::string &world_path
|
|||
|
||||
std::string backend = world_mt.exists("mod_storage_backend") ?
|
||||
world_mt.get("mod_storage_backend") : "files";
|
||||
if (backend == "files")
|
||||
if (backend == "files") {
|
||||
warningstream << "/!\\ You are using the old mod storage files backend. "
|
||||
<< "This backend is deprecated and may be removed in a future release /!\\"
|
||||
<< std::endl << "Switching to SQLite3 is advised, "
|
||||
<< "please read https://docs.luanti.org/for-server-hosts/database-backends." << std::endl;
|
||||
"This backend is deprecated and may be removed in a future release /!\\"
|
||||
"\nSwitching to SQLite3 is advised, "
|
||||
"please read https://docs.luanti.org/for-server-hosts/database-backends." << std::endl;
|
||||
}
|
||||
|
||||
return openModStorageDatabase(backend, world_path, world_mt);
|
||||
}
|
||||
|
||||
std::vector<std::string> Server::getModStorageDatabaseBackends()
|
||||
{
|
||||
std::vector<std::string> ret;
|
||||
ret.emplace_back("sqlite3");
|
||||
#if USE_POSTGRESQL
|
||||
ret.emplace_back("postgresql");
|
||||
#endif
|
||||
ret.emplace_back("files");
|
||||
ret.emplace_back("dummy");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ModStorageDatabase *Server::openModStorageDatabase(const std::string &backend,
|
||||
const std::string &world_path, const Settings &world_mt)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue