mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Only check token field if the server is hidden
This commit is contained in:
parent
d46061a55a
commit
145bc3797f
@ -155,17 +155,21 @@ bool CPylon::PostServerHost(string& outMessage, string& outToken,
|
||||
return false;
|
||||
}
|
||||
|
||||
nlohmann::json& tokenJson = responseJson["token"];
|
||||
|
||||
if (!tokenJson.is_string())
|
||||
if (netGameServer.m_bHidden)
|
||||
{
|
||||
outMessage = Format("Invalid response with status: %d", int(status));
|
||||
outToken.clear();
|
||||
nlohmann::json& tokenJson = responseJson["token"];
|
||||
|
||||
return false;
|
||||
if (!tokenJson.is_string())
|
||||
{
|
||||
outMessage = Format("Invalid response with status: %d", int(status));
|
||||
outToken.clear();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
outToken = tokenJson.get<string>();
|
||||
}
|
||||
|
||||
outToken = tokenJson.get<string>();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user