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