]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/client.cpp
Fix typo in lua_api.txt
[dragonfireclient.git] / src / client.cpp
index 063dc4158ca2f415c476e4e954a7b82884c5be5b..5e8f20620f5b9b66000b552ff8541db0afdc3c45 100644 (file)
@@ -20,7 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "client.h"
 #include <iostream>
 #include "clientserver.h"
-#include "jmutexautolock.h"
+#include "jthread/jmutexautolock.h"
 #include "main.h"
 #include <sstream>
 #include "filesys.h"
@@ -48,6 +48,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "util/serialize.h"
 #include "config.h"
 #include "util/directiontables.h"
+#include "version.h"
 
 #if USE_CURL
 #include <curl/curl.h>
@@ -245,6 +246,7 @@ void * MediaFetchThread::Thread()
                std::ostringstream stream;
                curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_write_data);
                curl_easy_setopt(curl, CURLOPT_WRITEDATA, &stream);
+               curl_easy_setopt(curl, CURLOPT_USERAGENT, (std::string("Minetest ")+minetest_version_hash).c_str());
                res = curl_easy_perform(curl);
                if (res == CURLE_OK) {
                        std::string data = stream.str();