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
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue