diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-02-23 19:05:20 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-02-23 19:05:20 +0100 |
commit | 4a47546eeab6243cf96bd1e803a52c005861b167 (patch) | |
tree | 3fd23f1195b9d1156d20e1a77aeeb7fbd236a3a3 | |
parent | 88b9c6caf9e8593bb6eb82a4b7a0bcba57952488 (diff) |
Revert "tell funny version information in status responses (and configstrings)"
This reverts commit 236c5db600ca7710cd63505e1c4fd758686294d4.
-rw-r--r-- | src/server/sv_init.c | 33 | ||||
-rw-r--r-- | src/server/sv_main.c | 2 |
2 files changed, 13 insertions, 22 deletions
diff --git a/src/server/sv_init.c b/src/server/sv_init.c index 316c71a1..a917f0a2 100644 --- a/src/server/sv_init.c +++ b/src/server/sv_init.c @@ -134,21 +134,16 @@ void SV_SetConfigstring (int index, const char *val) { } if ( index <= CS_SYSTEMINFO ) { - for ( i = 0; i < 3; ++i ) { + for ( i = 1; i < 3; ++i ) { char info[BIG_INFO_STRING]; if ( index == CS_SERVERINFO ) { Q_strncpyz( info, val, MAX_INFO_STRING ); - if ( i != 0 ) { - Info_SetValueForKey( info, "protocol", ( i == 1 ? "70" : "69" ) ); - } - Info_SetValueForKey( info, "version", "zittrig gentoo 2038-01-19T03:14:09Z" ); + Info_SetValueForKey( info, "protocol", ( i == 1 ? "70" : "69" ) ); } else { Q_strncpyz( info, val, BIG_INFO_STRING ); - if ( i != 0 ) { - Info_SetValueForKey_Big( info, "sv_voipProtocol", NULL ); - Info_SetValueForKey_Big( info, "voip", va("%i", sv_voip->integer) ); - } + Info_SetValueForKey_Big( info, "sv_voipProtocol", NULL ); + Info_SetValueForKey_Big( info, "voip", va("%i", sv_voip->integer) ); if ( i == 2 ) { Info_SetValueForKey_Big( info, "sv_paks", Cvar_VariableString( "sv_alternatePaks" ) ); Info_SetValueForKey_Big( info, "sv_pakNames", Cvar_VariableString( "sv_alternatePakNames" ) ); @@ -162,20 +157,18 @@ void SV_SetConfigstring (int index, const char *val) { } } - if ( i == 0 ) { - if ( strcmp( info, sv.configstrings[index].s ) ) { - modified[0] = qtrue; - Z_Free( sv.configstrings[index].s ); - sv.configstrings[index].s = CopyString( info ); - } - } else { - if ( strcmp( info, alternateInfos[index][i - 1] ) ) { - modified[i] = qtrue; - strcpy( alternateInfos[index][i - 1], info ); - } + if ( strcmp( info, alternateInfos[index][i - 1] ) ) { + modified[i] = qtrue; + strcpy( alternateInfos[index][i - 1], info ); } } + if ( strcmp( val, sv.configstrings[index].s ) ) { + modified[0] = qtrue; + Z_Free( sv.configstrings[index].s ); + sv.configstrings[index].s = CopyString( val ); + } + if ( !modified[0] && !modified[1] && !modified[2] ) { return; } diff --git a/src/server/sv_main.c b/src/server/sv_main.c index 7b3d8d46..bdc85184 100644 --- a/src/server/sv_main.c +++ b/src/server/sv_main.c @@ -570,8 +570,6 @@ static void SVC_Status( netadr_t from ) { if ( from.alternateProtocol != 0 ) Info_SetValueForKey( infostring, "protocol", from.alternateProtocol == 2 ? "69" : "70" ); - Info_SetValueForKey( infostring, "version", "zittrig gentoo 2038-01-19T03:14:09Z" ); - status[0] = 0; statusLength = 0; |