Send id from auth to game

This commit is contained in:
Tixx
2024-08-11 11:39:14 +02:00
parent b034072027
commit e505874af9
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));