1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-17 17:08:39 +00:00

Replace auth.txt with SQLite auth database (#7279)

* Replace auth.txt with SQLite auth database
This commit is contained in:
Ben Deutsch 2018-08-05 13:13:38 +02:00 committed by Loïc Blot
parent 1836882495
commit 153fb211ac
19 changed files with 1153 additions and 82 deletions

View file

@ -32,6 +32,7 @@ struct GameParams;
class MapBlock;
class RemotePlayer;
class PlayerDatabase;
class AuthDatabase;
class PlayerSAO;
class ServerEnvironment;
class ActiveBlockModifier;
@ -366,6 +367,10 @@ public:
static bool migratePlayersDatabase(const GameParams &game_params,
const Settings &cmd_args);
AuthDatabase *getAuthDatabase() { return m_auth_database; }
static bool migrateAuthDatabase(const GameParams &game_params,
const Settings &cmd_args);
private:
/**
@ -375,6 +380,8 @@ private:
static PlayerDatabase *openPlayerDatabase(const std::string &name,
const std::string &savedir, const Settings &conf);
static AuthDatabase *openAuthDatabase(const std::string &name,
const std::string &savedir, const Settings &conf);
/*
Internal ActiveObject interface
-------------------------------------------
@ -467,6 +474,7 @@ private:
std::vector<RemotePlayer*> m_players;
PlayerDatabase *m_player_database = nullptr;
AuthDatabase *m_auth_database = nullptr;
// Particles
IntervalLimiter m_particle_management_interval;