1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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.");
}