diff options
author | Tim Angus <tim@ngus.net> | 2005-12-28 02:32:43 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2005-12-28 02:32:43 +0000 |
commit | 1dc7e94283f026b17c1e793cbf7542872812ffda (patch) | |
tree | 33de56bca208626f1e7c77853255afc2b8244279 /src/qcommon/common.c | |
parent | 4b614e63d7da358a8a30e61a89365add79ecde9c (diff) |
* Added master server to source, based on dpmaster
* Removed gametype, fraglimit and dmflags cvars
* Removed CD key authentication stuff
* Implemented a means to save and restore cmd context
* Bumped protocol version up to 69 (same as 68)
* Removed various references to punkbuster
* Maps on create server menu now sorted by name
* Fixed some warnings
Diffstat (limited to 'src/qcommon/common.c')
-rw-r--r-- | src/qcommon/common.c | 72 |
1 files changed, 1 insertions, 71 deletions
diff --git a/src/qcommon/common.c b/src/qcommon/common.c index 6ba479e3..231f4aa8 100644 --- a/src/qcommon/common.c +++ b/src/qcommon/common.c @@ -33,7 +33,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #endif int demo_protocols[] = -{ 66, 67, 68, 0 }; +{ 66, 67, 68, 69, 0 }; #define MAX_NUM_ARGVS 50 @@ -2229,76 +2229,6 @@ static void Com_Crash_f( void ) { * ( int * ) 0 = 0x12345678; } -// TTimo: centralizing the cl_cdkey stuff after I discovered a buffer overflow problem with the dedicated server version -// not sure it's necessary to have different defaults for regular and dedicated, but I don't want to risk it -// https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=470 -#ifndef DEDICATED -char cl_cdkey[34] = " "; -#else -char cl_cdkey[34] = "123456789"; -#endif - -/* -================= -Com_ReadCDKey -================= -*/ -qboolean CL_CDKeyValidate( const char *key, const char *checksum ); -void Com_ReadCDKey( const char *filename ) { - fileHandle_t f; - char buffer[33]; - char fbuffer[MAX_OSPATH]; - - sprintf(fbuffer, "%s/q3key", filename); - - FS_SV_FOpenFileRead( fbuffer, &f ); - if ( !f ) { - Q_strncpyz( cl_cdkey, " ", 17 ); - return; - } - - Com_Memset( buffer, 0, sizeof(buffer) ); - - FS_Read( buffer, 16, f ); - FS_FCloseFile( f ); - - if (CL_CDKeyValidate(buffer, NULL)) { - Q_strncpyz( cl_cdkey, buffer, 17 ); - } else { - Q_strncpyz( cl_cdkey, " ", 17 ); - } -} - -/* -================= -Com_AppendCDKey -================= -*/ -void Com_AppendCDKey( const char *filename ) { - fileHandle_t f; - char buffer[33]; - char fbuffer[MAX_OSPATH]; - - sprintf(fbuffer, "%s/q3key", filename); - - FS_SV_FOpenFileRead( fbuffer, &f ); - if (!f) { - Q_strncpyz( &cl_cdkey[16], " ", 17 ); - return; - } - - Com_Memset( buffer, 0, sizeof(buffer) ); - - FS_Read( buffer, 16, f ); - FS_FCloseFile( f ); - - if (CL_CDKeyValidate(buffer, NULL)) { - strcat( &cl_cdkey[16], buffer ); - } else { - Q_strncpyz( &cl_cdkey[16], " ", 17 ); - } -} - static void Com_DetectAltivec(void) { // Only detect if user hasn't forcibly disabled it. |