]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - Docs/mapdownload.txt
convert the txt files explicitly to DOS format, and make them "binary" in .gitattributes
[xonotic/xonotic.git] / Docs / mapdownload.txt
index d7692000ee90fce5f86bed668a15a427be7fe2a5..66386b0fe6a756940884ab4122e72c4408cf7afd 100644 (file)
@@ -1,98 +1,98 @@
-map download:
-______________
-
-
-CLIENT SIDE:
-
-Should already work without configuration. You can however use the following
-cvars for further tuning:
-
-   cl_curl_enabled              download support enabled (master switch, default: 1)
-   cl_curl_maxdownloads         maximum number of downloads at once (default: 1)
-   cl_curl_maxspeed             maximum total speed in KiB/s (default: 100)
-
-Downloaded packages end up in |Nexuiz/data/dlcache/| or
-|~/.nexuiz/data/dlcache/| and are only used till you exit Nexuiz.
- If you want to play them localy or use them to setup a server of your
-own you can "accept" the packages by moving it one level up - right
-next to your config.cfg.
-
-You should regularily clean up your cache to save space and make the maps
-you really want available from the menu.
-
-
-SERVER SIDE:
-
-First of all, you need a HTTP or FTP server to host your PK3s. You can either
-use some web space provider, or set up your own. For this, use any FTP or HTTP
-server software you want (HTTP: lighttpd, Apache, thttpd; FTP: Filezilla,
-vsftpd). HTTP is to be preferred because it works better for firewalled
-players.
-
-On the server, you need to set up where to download the PK3s of the maps you
-are running. You can either use the cvar
-
-   sv_curl_defaulturl           default download URL
-
-to set it to some site, or put a file named "curl_urls.txt" in the data
-directory of the following format:
-
-   pattern        url
-   pattern        url
-   pattern        url
-   ...
-
-where always the first wildcard pattern match is taken.
-
-   data*          -
-   strale*        http://stralemaps.invalid/
-   *              http://all.the.other.stuff.invalid/id/here.php?pak=
-   foo*           http://wont.get.here.invalid/
-
-The pk3 name will be appended to the URL by DarkPlaces. Note that you NEED to
-append a trailing slash if you refer to a directory. If you specify a "-" as
-URL, the package will not be offered for download.
-
-
-INFORMATION FOR MIRROR/MAP SERVER ADMINS:
-
-The Referer is always set to dp://serverhost:serverport/, the User-Agent
-always starts with "Nexuiz". Look at this sample log line:
-
-141.2.16.3 - - [06/Jun/2006:19:43:14 +0000] "GET /~polzer/temp/nexmaps.php?filename=o-fun.pk3 HTTP/1.1" 302 - "dp://141.2.16.3:26000/" "Nexuiz Linux 21:26:17 Jun  6 2006"
-
-
-If you want to set up a redirection service, here is a sample PHP code for you
-to start from:
-
-<?
-
-function findmap($filename)
-{
-    # insert your database query or whatever you want here
-    if($filename == "foo.pk3")
-        return "http://barserver.invalid/foo.pk3";
-    return FALSE;
-}
-
-function bailout($code, $title, $message)
-{
-    header("HTTP/1.1 $code $title");
-    echo "<html><title>$title</title><h1>$title</h1>$message</html>";
-    exit(0);
-}   
-
-$filename = $_GET['filename'];
-
-$useragent = getenv("HTTP_USER_AGENT");
-if(strpos($useragent, "Nexuiz ") !== 0)
-    bailout(403, "Forbidden", "You're not a Nexuiz client.");
-    
-$url = findmap($filename);
-if(!$url)
-    bailout(404, "Not Found", "Well... try another file name?");
-    
-header("HTTP/1.1 302 Moved Temporarily");
-header("Location: $url");
-
-?>
+map download:\r
+______________\r
+\r
+\r
+CLIENT SIDE:\r
+\r
+Should already work without configuration. You can however use the following\r
+cvars for further tuning:\r
+\r
+   cl_curl_enabled              download support enabled (master switch, default: 1)\r
+   cl_curl_maxdownloads         maximum number of downloads at once (default: 1)\r
+   cl_curl_maxspeed             maximum total speed in KiB/s (default: 100)\r
+\r
+Downloaded packages end up in |Nexuiz/data/dlcache/| or\r
+|~/.nexuiz/data/dlcache/| and are only used till you exit Nexuiz.\r
+ If you want to play them localy or use them to setup a server of your\r
+own you can "accept" the packages by moving it one level up - right\r
+next to your config.cfg.\r
+\r
+You should regularily clean up your cache to save space and make the maps\r
+you really want available from the menu.\r
+\r
+\r
+SERVER SIDE:\r
+\r
+First of all, you need a HTTP or FTP server to host your PK3s. You can either\r
+use some web space provider, or set up your own. For this, use any FTP or HTTP\r
+server software you want (HTTP: lighttpd, Apache, thttpd; FTP: Filezilla,\r
+vsftpd). HTTP is to be preferred because it works better for firewalled\r
+players.\r
+\r
+On the server, you need to set up where to download the PK3s of the maps you\r
+are running. You can either use the cvar\r
+\r
+   sv_curl_defaulturl           default download URL\r
+\r
+to set it to some site, or put a file named "curl_urls.txt" in the data\r
+directory of the following format:\r
+\r
+   pattern        url\r
+   pattern        url\r
+   pattern        url\r
+   ...\r
+\r
+where always the first wildcard pattern match is taken.\r
+\r
+   data*          -\r
+   strale*        http://stralemaps.invalid/\r
+   *              http://all.the.other.stuff.invalid/id/here.php?pak=\r
+   foo*           http://wont.get.here.invalid/\r
+\r
+The pk3 name will be appended to the URL by DarkPlaces. Note that you NEED to\r
+append a trailing slash if you refer to a directory. If you specify a "-" as\r
+URL, the package will not be offered for download.\r
+\r
+\r
+INFORMATION FOR MIRROR/MAP SERVER ADMINS:\r
+\r
+The Referer is always set to dp://serverhost:serverport/, the User-Agent\r
+always starts with "Nexuiz". Look at this sample log line:\r
+\r
+141.2.16.3 - - [06/Jun/2006:19:43:14 +0000] "GET /~polzer/temp/nexmaps.php?filename=o-fun.pk3 HTTP/1.1" 302 - "dp://141.2.16.3:26000/" "Nexuiz Linux 21:26:17 Jun  6 2006"\r
+\r
+\r
+If you want to set up a redirection service, here is a sample PHP code for you\r
+to start from:\r
+\r
+<?\r
+\r
+function findmap($filename)\r
+{\r
+    # insert your database query or whatever you want here\r
+    if($filename == "foo.pk3")\r
+        return "http://barserver.invalid/foo.pk3";\r
+    return FALSE;\r
+}\r
+\r
+function bailout($code, $title, $message)\r
+{\r
+    header("HTTP/1.1 $code $title");\r
+    echo "<html><title>$title</title><h1>$title</h1>$message</html>";\r
+    exit(0);\r
+}   \r
+\r
+$filename = $_GET['filename'];\r
+\r
+$useragent = getenv("HTTP_USER_AGENT");\r
+if(strpos($useragent, "Nexuiz ") !== 0)\r
+    bailout(403, "Forbidden", "You're not a Nexuiz client.");\r
+    \r
+$url = findmap($filename);\r
+if(!$url)\r
+    bailout(404, "Not Found", "Well... try another file name?");\r
+    \r
+header("HTTP/1.1 302 Moved Temporarily");\r
+header("Location: $url");\r
+\r
+?>\r