Skip to content

Commit

Permalink
Log server announce on updates and deletes too (#10177)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Schwend committed Sep 26, 2020
1 parent 9eb4516 commit 917e357
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/serverlist.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 917e357

Please sign in to comment.