1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Use JSON for favorites, move server list code to Lua (#10085)

Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
rubenwardy 2021-01-22 15:08:57 +00:00 committed by GitHub
parent 4fcd000e20
commit 67aa75d444
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 388 additions and 528 deletions

View file

@ -24,21 +24,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
typedef Json::Value ServerListSpec;
namespace ServerList
{
std::vector<ServerListSpec> getLocal();
std::vector<ServerListSpec> getOnline();
bool deleteEntry(const ServerListSpec &server);
bool insert(const ServerListSpec &server);
std::vector<ServerListSpec> deSerialize(const std::string &liststring);
const std::string serialize(const std::vector<ServerListSpec> &serverlist);
std::vector<ServerListSpec> deSerializeJson(const std::string &liststring);
const std::string serializeJson(const std::vector<ServerListSpec> &serverlist);
#if USE_CURL
enum AnnounceAction {AA_START, AA_UPDATE, AA_DELETE};
void sendAnnounce(AnnounceAction, u16 port,