aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
authoricculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-06-02 19:41:09 +0000
committericculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-06-02 19:41:09 +0000
commit54a42296270247b1b1bfb1f576fe67106eb86d03 (patch)
treeb8373dd1bcee31434861a8af57ac31680893cabe /code
parenta90dba676cce5373a4526a7fe352a8c720d63fe0 (diff)
downloadioquake3-aero-54a42296270247b1b1bfb1f576fe67106eb86d03.tar.gz
ioquake3-aero-54a42296270247b1b1bfb1f576fe67106eb86d03.zip
Treat sv_voip cvar as a version number (0 == off, 1 == version 1 protocol).
Don't publish it to server's info string if set to zero. git-svn-id: svn://svn.icculus.org/quake3/trunk@1357 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r--code/server/sv_init.c4
-rw-r--r--code/server/sv_main.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/code/server/sv_init.c b/code/server/sv_init.c
index 28b3a1d..97154f0 100644
--- a/code/server/sv_init.c
+++ b/code/server/sv_init.c
@@ -656,6 +656,10 @@ void SV_Init (void) {
sv_pure = Cvar_Get ("sv_pure", "1", CVAR_SYSTEMINFO );
#if USE_VOIP
sv_voip = Cvar_Get ("sv_voip", "1", CVAR_SYSTEMINFO | CVAR_LATCH);
+ if ( (sv_voip->integer < 0) || (sv_voip->integer > 1) ) {
+ Com_Printf("WARNING: sv_voip must be 0 or 1. Setting to 1.");
+ Cvar_Set ("sv_voip", "1");
+ }
#endif
Cvar_Get ("sv_paks", "", CVAR_SYSTEMINFO | CVAR_ROM );
Cvar_Get ("sv_pakNames", "", CVAR_SYSTEMINFO | CVAR_ROM );
diff --git a/code/server/sv_main.c b/code/server/sv_main.c
index a12da03..667db41 100644
--- a/code/server/sv_main.c
+++ b/code/server/sv_main.c
@@ -412,7 +412,9 @@ void SVC_Info( netadr_t from ) {
Info_SetValueForKey( infostring, "pure", va("%i", sv_pure->integer ) );
#if USE_VOIP
- Info_SetValueForKey( infostring, "voip", va("%i", sv_voip->integer ) );
+ if (sv_voip->integer) {
+ Info_SetValueForKey( infostring, "voip", va("%i", sv_voip->integer ) );
+ }
#endif
if( sv_minPing->integer ) {