]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
Rename a few of the fake loss and fake latency cvars
[xonotic/darkplaces.git] / host_cmd.c
index a944a23074ef5b66e4da06d5180115563aa16ac8..9f50578adfc2b48cb6c0e81e7b265b08c0f665d6 100644 (file)
@@ -151,7 +151,7 @@ static void Host_Status_f(cmd_state_t *cmd)
                if(sv_status_privacy.integer && cmd->source != src_command)
                        strlcpy(ip, client->netconnection ? "hidden" : "botclient", 48);
                else
-                       strlcpy(ip, (client->netconnection && client->netconnection->address) ? client->netconnection->address : "botclient", 48);
+                       strlcpy(ip, (client->netconnection && *client->netconnection->address) ? client->netconnection->address : "botclient", 48);
 
                frags = client->frags;
 
@@ -2502,13 +2502,13 @@ static void Host_SendCvar_f(cmd_state_t *cmd)
        cvarname = Cmd_Argv(cmd, 1);
        if (cls.state == ca_connected)
        {
-               c = Cvar_FindVar(&cvars_all, cvarname, CVAR_CLIENT | CVAR_SERVER);
+               c = Cvar_FindVar(&cvars_all, cvarname, CVAR_CLIENT | CVAR_SERVER, false);
                // LadyHavoc: if there is no such cvar or if it is private, send a
                // reply indicating that it has no value
                if(!c || (c->flags & CVAR_PRIVATE))
                        Cmd_ForwardStringToServer(va(vabuf, sizeof(vabuf), "sentcvar %s", cvarname));
                else
-                       Cmd_ForwardStringToServer(va(vabuf, sizeof(vabuf), "sentcvar %s \"%s\"", c->name, c->string));
+                       Cmd_ForwardStringToServer(va(vabuf, sizeof(vabuf), "sentcvar %s \"%s\"", cvarname, c->string));
                return;
        }
        if(!sv.active)// || !PRVM_serverfunction(SV_ParseClientCommand))