+static qboolean Curl_SendRequirement(const char *filename, qboolean foundone, char *sendbuffer, size_t sendbuffer_len)
+{
+ const char *p;
+ const char *thispack = FS_WhichPack(filename);
+ const char *packurl;
+
+ if(!thispack || !*thispack)
+ return false;
+
+ p = strrchr(thispack, '/');
+ if(p)
+ thispack = p + 1;
+
+ packurl = Curl_FindPackURL(thispack);
+
+ if(packurl && *packurl && strcmp(packurl, "-"))
+ {
+ if(!foundone)
+ strlcat(sendbuffer, "curl --clear_autodownload\n", sendbuffer_len);
+
+ strlcat(sendbuffer, "curl --pak --forthismap --as ", sendbuffer_len);
+ strlcat(sendbuffer, thispack, sendbuffer_len);
+ if(sv_curl_maxspeed.value > 0)
+ dpsnprintf(sendbuffer + strlen(sendbuffer), sendbuffer_len - strlen(sendbuffer), " --maxspeed=%.1f", sv_curl_maxspeed.value);
+ strlcat(sendbuffer, " --for ", sendbuffer_len);
+ strlcat(sendbuffer, filename, sendbuffer_len);
+ strlcat(sendbuffer, " ", sendbuffer_len);
+ strlcat(sendbuffer, packurl, sendbuffer_len);
+ strlcat(sendbuffer, thispack, sendbuffer_len);
+ strlcat(sendbuffer, "\n", sendbuffer_len);
+
+ return true;
+ }
+
+ return false;
+}