[Download] Change json
This commit is contained in:
parent
3f9f58d5f6
commit
70a60517ee
@ -475,13 +475,9 @@ namespace Components
|
||||
// Build server list
|
||||
for (auto& node : Node::GetNodes())
|
||||
{
|
||||
std::map<std::string, json11::Json> serverInfo;
|
||||
serverInfo["address"] = "127.0.0.1:28960";
|
||||
|
||||
if (node.isValid())
|
||||
{
|
||||
serverInfo["address"] = node.address.getCString();
|
||||
servers.push_back(serverInfo);
|
||||
servers.push_back(json11::Json{ node });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,6 +50,11 @@ namespace Components
|
||||
this->lastRequest.reset();
|
||||
}
|
||||
|
||||
json11::Json Node::Entry::to_json() const
|
||||
{
|
||||
return this->address.getString();
|
||||
}
|
||||
|
||||
void Node::LoadNodeRemotePreset()
|
||||
{
|
||||
std::string nodes = Utils::Cache::GetFile("/iw4/nodes.txt");
|
||||
|
@ -35,6 +35,7 @@ namespace Components
|
||||
void sendRequest();
|
||||
|
||||
void reset();
|
||||
json11::Json to_json() const;
|
||||
};
|
||||
|
||||
Node();
|
||||
|
Loading…
Reference in New Issue
Block a user