diff options
author | Tyler Schwend <tyler.schwend@intersection.com> | 2020-09-26 12:41:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-26 18:41:16 +0200 |
commit | 917e357bcaf5b7ebb77afe16b8c8fbe53b827e79 (patch) | |
tree | b4224fa9e0001c2060203d196711a177b7a6e872 /src | |
parent | 9eb4516cbc6a5a790dcb77178e1f1408ec0b06d0 (diff) | |
download | minetest-917e357bcaf5b7ebb77afe16b8c8fbe53b827e79.tar.gz minetest-917e357bcaf5b7ebb77afe16b8c8fbe53b827e79.tar.bz2 minetest-917e357bcaf5b7ebb77afe16b8c8fbe53b827e79.zip |
Log server announce on updates and deletes too (#10177)
Diffstat (limited to 'src')
-rw-r--r-- | src/serverlist.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/serverlist.cpp b/src/serverlist.cpp index c7fe2d888..80a8c2f1a 100644 --- a/src/serverlist.cpp +++ b/src/serverlist.cpp @@ -245,12 +245,19 @@ void sendAnnounce(AnnounceAction action, for (const ModSpec &mod : mods) { server["mods"].append(mod.name); } - actionstream << "Announcing to " << g_settings->get("serverlist_url") << std::endl; } else if (action == AA_UPDATE) { if (lag) server["lag"] = lag; } + if (action == AA_START) { + actionstream << "Announcing " << aa_names[action] << " to " << + g_settings->get("serverlist_url") << std::endl; + } else { + infostream << "Announcing " << aa_names[action] << " to " << + g_settings->get("serverlist_url") << std::endl; + } + HTTPFetchRequest fetch_request; fetch_request.url = g_settings->get("serverlist_url") + std::string("/announce"); fetch_request.method = HTTP_POST; |