mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 17:15:21 +02:00
Show supported backends in --help output (#16441)
This commit is contained in:
@@ -1828,6 +1828,21 @@ void ServerEnvironment::processActiveObjectRemove(ServerActiveObject *obj)
|
||||
m_script->removeObjectReference(obj);
|
||||
}
|
||||
|
||||
std::vector<std::string> ServerEnvironment::getPlayerDatabaseBackends()
|
||||
{
|
||||
std::vector<std::string> ret;
|
||||
ret.emplace_back("sqlite3");
|
||||
ret.emplace_back("dummy");
|
||||
#if USE_POSTGRESQL
|
||||
ret.emplace_back("postgresql");
|
||||
#endif
|
||||
#if USE_LEVELDB
|
||||
ret.emplace_back("leveldb");
|
||||
#endif
|
||||
ret.emplace_back("files");
|
||||
return ret;
|
||||
}
|
||||
|
||||
PlayerDatabase *ServerEnvironment::openPlayerDatabase(const std::string &name,
|
||||
const std::string &savedir, const Settings &conf)
|
||||
{
|
||||
@@ -1944,6 +1959,21 @@ bool ServerEnvironment::migratePlayersDatabase(const GameParams &game_params,
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<std::string> ServerEnvironment::getAuthDatabaseBackends()
|
||||
{
|
||||
std::vector<std::string> ret;
|
||||
ret.emplace_back("sqlite3");
|
||||
ret.emplace_back("dummy");
|
||||
#if USE_POSTGRESQL
|
||||
ret.emplace_back("postgresql");
|
||||
#endif
|
||||
ret.emplace_back("files");
|
||||
#if USE_LEVELDB
|
||||
ret.emplace_back("leveldb");
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
AuthDatabase *ServerEnvironment::openAuthDatabase(
|
||||
const std::string &name, const std::string &savedir, const Settings &conf)
|
||||
{
|
||||
|
Reference in New Issue
Block a user