]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cvar.c
Fixed a invalid use of the sizeof() operator. Thanks to OpenBSD's custom GCC for...
[xonotic/darkplaces.git] / cvar.c
diff --git a/cvar.c b/cvar.c
index 47a5735ddeb16477d6bcd2dd8992feb42de12ce8..75ff70f44ad1242b7d2b630190d79b756d49605e 100644 (file)
--- a/cvar.c
+++ b/cvar.c
@@ -294,6 +294,16 @@ void Cvar_SetQuick_Internal (cvar_t *var, const char *value)
                        CL_SetInfo("playermodel", var->string, true, false, false, false);
                else if (!strcmp(var->name, "_cl_name"))
                        CL_SetInfo("name", var->string, true, false, false, false);
+               else if (!strcmp(var->name, "rcon_secure"))
+               {
+                       // whenever rcon_secure is changed to 0, clear rcon_password for
+                       // security reasons (prevents a send-rcon-password-as-plaintext
+                       // attack based on NQ protocol session takeover and svc_stufftext)
+                       if(!var->integer)
+                               Cvar_Set("rcon_password", "");
+               }
+               else if (!strcmp(var->name, "net_slist_favorites"))
+                       NetConn_UpdateFavorites();
        }
 }