diff options
author | tjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-09-11 16:41:55 +0000 |
---|---|---|
committer | tjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-09-11 16:41:55 +0000 |
commit | 55cb337dd8025f0a21c2b65c024bf33dd89f2071 (patch) | |
tree | 0ac9f2e0954c94cb211e4f49f33598658296333e /code/server | |
parent | b2f2a4ad4238415682e406dda5bedab1d3c84c79 (diff) | |
download | ioquake3-aero-55cb337dd8025f0a21c2b65c024bf33dd89f2071.tar.gz ioquake3-aero-55cb337dd8025f0a21c2b65c024bf33dd89f2071.zip |
* add cURL support for HTTP/FTP downloading (bug 2661)
git-svn-id: svn://svn.icculus.org/quake3/trunk@898 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/server')
-rw-r--r-- | code/server/sv_client.c | 9 | ||||
-rw-r--r-- | code/server/sv_init.c | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/code/server/sv_client.c b/code/server/sv_client.c index 2cb6c05..e9f1a2b 100644 --- a/code/server/sv_client.c +++ b/code/server/sv_client.c @@ -801,7 +801,9 @@ void SV_WriteDownloadToClient( client_t *cl , msg_t *msg ) } // We open the file here - if ( !sv_allowDownload->integer || idPack || unreferenced || + if ( !(sv_allowDownload->integer & DLF_ENABLE) || + (sv_allowDownload->integer & DLF_NO_UDP) || + idPack || unreferenced || ( cl->downloadSize = FS_SV_FOpenFileRead( cl->downloadName, &cl->download ) ) <= 0 ) { // cannot auto-download file if(unreferenced) @@ -818,7 +820,10 @@ void SV_WriteDownloadToClient( client_t *cl , msg_t *msg ) else { Com_sprintf(errorMessage, sizeof(errorMessage), "Cannot autodownload id pk3 file \"%s\"", cl->downloadName); } - } else if ( !sv_allowDownload->integer ) { + } + else if ( !(sv_allowDownload->integer & DLF_ENABLE) || + (sv_allowDownload->integer & DLF_NO_UDP) ) { + Com_Printf("clientDownload: %d : \"%s\" download disabled", cl - svs.clients, cl->downloadName); if (sv_pure->integer) { Com_sprintf(errorMessage, sizeof(errorMessage), "Could not download \"%s\" because autodownloading is disabled on the server.\n\n" diff --git a/code/server/sv_init.c b/code/server/sv_init.c index e9f257b..986575b 100644 --- a/code/server/sv_init.c +++ b/code/server/sv_init.c @@ -606,6 +606,7 @@ void SV_Init (void) { Cvar_Get ("nextmap", "", CVAR_TEMP ); sv_allowDownload = Cvar_Get ("sv_allowDownload", "0", CVAR_SERVERINFO); + Cvar_Get ("sv_dlURL", "", CVAR_SERVERINFO | CVAR_ARCHIVE); sv_master[0] = Cvar_Get ("sv_master1", MASTER_SERVER_NAME, 0 ); sv_master[1] = Cvar_Get ("sv_master2", "", CVAR_ARCHIVE ); sv_master[2] = Cvar_Get ("sv_master3", "", CVAR_ARCHIVE ); |