1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-06 02:05:30 +01:00

Rework user limit and checks around join process

This commit is contained in:
sfan5
2025-05-27 12:52:59 +02:00
parent b580c66b61
commit 79e0d834fd
5 changed files with 67 additions and 84 deletions

View File

@@ -445,7 +445,7 @@ public:
/* mark blocks as not sent on all active clients */
void markBlocksNotSent(const std::vector<v3s16> &positions, bool low_priority = false);
/* verify is server user limit was reached */
/* verify if server user limit was reached */
bool isUserLimitReached();
/* get list of client player names */
@@ -475,16 +475,9 @@ public:
/* get state of client by id*/
ClientState getClientState(session_t peer_id);
/* set client playername */
void setPlayerName(session_t peer_id, const std::string &name);
/* get protocol version of client */
u16 getProtocolVersion(session_t peer_id);
/* set client version */
void setClientVersion(session_t peer_id, u8 major, u8 minor, u8 patch,
const std::string &full);
/* event to update client state */
void event(session_t peer_id, ClientStateEvent event);
@@ -515,9 +508,9 @@ private:
// Connection
std::shared_ptr<con::IConnection> m_con;
std::recursive_mutex m_clients_mutex;
// Connected clients (behind the con mutex)
// Connected clients (behind the mutex)
RemoteClientMap m_clients;
std::vector<std::string> m_clients_names; //for announcing masterserver
std::vector<std::string> m_clients_names; // for announcing to server list
// Environment
ServerEnvironment *m_env;