mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Replace auth.txt with SQLite auth database (#7279)
* Replace auth.txt with SQLite auth database
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user