diff options
author | proller <proller@github.com> | 2013-07-27 17:44:59 +0400 |
---|---|---|
committer | proller <proller@github.com> | 2013-07-27 17:51:34 +0400 |
commit | e65d8ad6553d7ae0acf63b43e9818059088a00b6 (patch) | |
tree | 35b8cc38023a12f744f583fbcf5e313e67eec5b9 /src | |
parent | 215e37aac3c0efb1a5b4a59bcd20a18632c59051 (diff) | |
download | minetest-e65d8ad6553d7ae0acf63b43e9818059088a00b6.tar.gz minetest-e65d8ad6553d7ae0acf63b43e9818059088a00b6.tar.bz2 minetest-e65d8ad6553d7ae0acf63b43e9818059088a00b6.zip |
Dont announce server in singleplayer
Diffstat (limited to 'src')
-rw-r--r-- | src/convert_json.cpp | 3 | ||||
-rw-r--r-- | src/server.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/convert_json.cpp b/src/convert_json.cpp index 58eefd901..61db67fd5 100644 --- a/src/convert_json.cpp +++ b/src/convert_json.cpp @@ -55,10 +55,11 @@ Json::Value fetchJsonValue(const std::string url, curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &liststring); curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, g_settings->getS32("curl_timeout")); + curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, g_settings->getS32("curl_timeout")); + if (chunk != 0) curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); - res = curl_easy_perform(curl); if (res != CURLE_OK) errorstream<<"Jsonreader: "<< url <<" not found (" << curl_easy_strerror(res) << ")" <<std::endl; diff --git a/src/server.cpp b/src/server.cpp index c5146658d..6e31d288c 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1242,7 +1242,7 @@ void Server::AsyncRunStep() // send masterserver announce { float &counter = m_masterserver_timer; - if((!counter || counter >= 300.0) && g_settings->getBool("server_announce") == true) + if(!isSingleplayer() && (!counter || counter >= 300.0) && g_settings->getBool("server_announce") == true) { ServerList::sendAnnounce(!counter ? "start" : "update", m_clients_number, m_uptime.get(), m_gamespec.id, m_mods); counter = 0.01; |