Merge pull request #105 from WiserTixx/id-from-auth

Send id from auth to game
This commit is contained in:
Lion
2024-08-17 20:34:19 +02:00
committed by GitHub
2 changed files with 12 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ bool Terminate = false;
bool LoginAuth = false;
std::string Username = "";
std::string UserRole = "";
int UserID = -1;
std::string UlStatus;
std::string MStatus;
bool ModLoaded;
@@ -180,6 +181,9 @@ void Parse(std::string Data, SOCKET CSocket) {
if (!UserRole.empty()) {
Auth["role"] = UserRole;
}
if (UserID != -1) {
Auth["id"] = UserID;
}
Data = "N" + Auth.dump();
} else {
Data = "N" + Login(Data.substr(Data.find(':') + 1));