const char *tempin = in;
COM_ParseTokenConsole( &tempin );
- if ((cvar = Cvar_FindVar(&com_token[0]))) {
+ // don't expand rcon_password or similar cvars (CVAR_PRIVATE flag)
+ if ((cvar = Cvar_FindVar(&com_token[0])) && !(cvar->flags & CVAR_PRIVATE)) {
const char *cvarcontent = cvar->string;
while( *cvarcontent && outlen < maxoutlen ) {
outtext[outlen++] = *cvarcontent++;
#define CVAR_READONLY 4
#define CVAR_SERVERINFO 8
#define CVAR_USERINFO 16
+// CVAR_PRIVATE means do not $ expand or sendcvar this cvar under any circumstances (rcon_password uses this)
+#define CVAR_PRIVATE 32
// used to determine if flags is valid
-#define CVAR_MAXFLAGSVAL 31
+#define CVAR_MAXFLAGSVAL 63
// for internal use only!
#define CVAR_DEFAULTSET (1<<30)
#define CVAR_ALLOCATED (1<<31)
int current_skill;
cvar_t sv_cheats = {0, "sv_cheats", "0", "enables cheat commands in any game, and cheat impulses in dpmod"};
-cvar_t rcon_password = {0, "rcon_password", "", "password to authenticate rcon commands"};
+cvar_t rcon_password = {CVAR_PRIVATE, "rcon_password", "", "password to authenticate rcon commands"};
cvar_t rcon_address = {0, "rcon_address", "", "server address to send rcon commands to (when not connected to a server)"};
cvar_t team = {CVAR_USERINFO | CVAR_SAVE, "team", "none", "QW team (4 character limit, example: blue)"};
cvar_t skin = {CVAR_USERINFO | CVAR_SAVE, "skin", "", "QW player skin name (example: base)"};
if(Cmd_Argc() != 2)
return;
- if(!(c = Cvar_FindVar(Cmd_Argv(1))))
+ if(!(c = Cvar_FindVar(Cmd_Argv(1))) || (c->flags & CVAR_PRIVATE))
return;
if (cls.state != ca_dedicated)
Cmd_ForwardStringToServer(va("sentcvar %s %s\n", c->name, c->string));