mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-04-03 06:16:15 +00:00
add username to auth packet
This commit is contained in:
@@ -24,6 +24,7 @@ bool TCPTerminate = false;
|
||||
int DEFAULT_PORT = 4444;
|
||||
bool Terminate = false;
|
||||
bool LoginAuth = false;
|
||||
std::string Username = "";
|
||||
std::string UlStatus;
|
||||
std::string MStatus;
|
||||
bool ModLoaded;
|
||||
@@ -126,7 +127,7 @@ void Parse(std::string Data,SOCKET CSocket){
|
||||
break;
|
||||
case 'N':
|
||||
if (SubCode == 'c'){
|
||||
Data = "N{\"Auth\":"+std::to_string(LoginAuth)+"}";
|
||||
Data = "N{\"Auth\":"+std::to_string(LoginAuth)+",\"username\":\"" + Username + "\"}";
|
||||
}else{
|
||||
Data = "N" + Login(Data.substr(Data.find(':') + 1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user