1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 00:25:19 +02:00

Add LevelDB auth database. (#9476)

* Add leveldb auth database.
This commit is contained in:
luk3yx
2020-04-23 23:07:19 +12:00
committed by GitHub
parent ce5b0932f8
commit 914dbeaa0b
3 changed files with 122 additions and 1 deletions

View File

@@ -44,6 +44,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#if USE_POSTGRESQL
#include "database/database-postgresql.h"
#endif
#if USE_LEVELDB
#include "database/database-leveldb.h"
#endif
#include "server/luaentity_sao.h"
#include "server/player_sao.h"
@@ -2187,6 +2190,11 @@ AuthDatabase *ServerEnvironment::openAuthDatabase(
if (name == "files")
return new AuthDatabaseFiles(savedir);
#if USE_LEVELDB
if (name == "leveldb")
return new AuthDatabaseLevelDB(savedir);
#endif
throw BaseException(std::string("Database backend ") + name + " not supported.");
}