diff --git a/engine/common/sys_con.c b/engine/common/sys_con.c index 0f30ef9f..1f29cb83 100644 --- a/engine/common/sys_con.c +++ b/engine/common/sys_con.c @@ -22,10 +22,10 @@ GNU General Public License for more details. #define XASH_COLORIZE_CONSOLE // use with caution, running engine in Qt Creator may cause a freeze in read() call // I was never encountered this bug anywhere else, so still enable by default -// #define XASH_USE_SELECT +// #define XASH_USE_SELECT 1 #endif -#ifdef XASH_USE_SELECT +#if XASH_USE_SELECT // non-blocking console input #include #endif @@ -42,7 +42,7 @@ static LogData s_ld; char *Sys_Input( void ) { -#ifdef XASH_USE_SELECT +#if XASH_USE_SELECT { fd_set rfds; static char line[1024]; diff --git a/engine/server/sv_client.c b/engine/server/sv_client.c index 0f0b6a00..ab8264b2 100644 --- a/engine/server/sv_client.c +++ b/engine/server/sv_client.c @@ -376,17 +376,6 @@ void SV_ConnectClient( netadr_t from ) // build a new connection // accept the new client - if( Q_strncpy( newcl->useragent, Cmd_Argv( 6 ), MAX_INFO_STRING ) ) - { - const char *id = Info_ValueForKey( newcl->useragent, "i" ); - - if( *id ) - { - //sscanf( id, "%llx", &newcl->WonID ); - } - - // Q_strncpy( cl->auth_id, id, sizeof( cl->auth_id ) ); - } sv.current_client = newcl; newcl->edict = EDICT_NUM( (newcl - svs.clients) + 1 ); @@ -396,6 +385,7 @@ void SV_ConnectClient( netadr_t from ) newcl->userid = g_userid++; // create unique userid newcl->state = cs_connected; newcl->extensions = extensions & (NET_EXT_SPLITSIZE); + Q_strncpy( newcl->useragent, protinfo, MAX_INFO_STRING ); // reset viewentities (from previous level) memset( newcl->viewentity, 0, sizeof( newcl->viewentity )); @@ -411,7 +401,7 @@ void SV_ConnectClient( netadr_t from ) // build protinfo answer protinfo[0] = '\0'; - Info_SetValueForKey( protinfo, "ext", va( "%d",newcl->extensions ), sizeof( protinfo ) ); + Info_SetValueForKey( protinfo, "ext", va( "%d", newcl->extensions ), sizeof( protinfo ) ); // send the connect packet to the client Netchan_OutOfBandPrint( NS_SERVER, from, "client_connect %s", protinfo ); diff --git a/engine/server/sv_filter.c b/engine/server/sv_filter.c index b2b5355c..22edf085 100644 --- a/engine/server/sv_filter.c +++ b/engine/server/sv_filter.c @@ -184,7 +184,7 @@ static void SV_BanID_f( void ) for( i = 0, cl1 = svs.clients; i < sv_maxclients->value; i++, cl1++ ) { - if( !Q_strncmp( id, Info_ValueForKey( cl1->useragent, "i" ), len ) ) + if( !Q_strncmp( id, Info_ValueForKey( cl1->useragent, "uuid" ), len ) ) { cl = cl1; break; @@ -197,7 +197,7 @@ static void SV_BanID_f( void ) Con_DPrintf( S_WARN "banid: no such player\n" ); } else - id = Info_ValueForKey( cl->useragent, "i" ); + id = Info_ValueForKey( cl->useragent, "uuid" ); if( !id[0] ) { @@ -254,7 +254,7 @@ static void SV_RemoveID_f( void ) if( num >= sv_maxclients->value || num < 0 ) return; - id = Info_ValueForKey( svs.clients[num].useragent, "i" ); + id = Info_ValueForKey( svs.clients[num].useragent, "uuid" ); } if( !id[0] ) diff --git a/engine/server/sv_main.c b/engine/server/sv_main.c index 16b12cfa..7641591f 100644 --- a/engine/server/sv_main.c +++ b/engine/server/sv_main.c @@ -782,7 +782,7 @@ send error message and return false on wrong input devices qboolean SV_ProcessUserAgent( netadr_t from, const char *useragent ) { const char *input_devices_str = Info_ValueForKey( useragent, "d" ); - const char *id = Info_ValueForKey( useragent, "i" ); + const char *id = Info_ValueForKey( useragent, "uuid" ); if( !sv_allow_noinputdevices->value && ( !input_devices_str || !input_devices_str[0] ) ) { @@ -871,7 +871,6 @@ void SV_Init( void ) Cvar_RegisterVariable( &sv_fps ); Cvar_RegisterVariable( &showtriggers ); Cvar_RegisterVariable( &sv_aim ); - Cvar_RegisterVariable( &motdfile ); Cvar_RegisterVariable( &deathmatch ); Cvar_RegisterVariable( &coop ); Cvar_RegisterVariable( &teamplay );