return;
}
// clear the rcon password, to prevent vulnerability by stuffcmd-ing a connect command
- if(!rcon_secure.integer)
+ if(rcon_secure.integer <= 0)
Cvar_SetQuick(&rcon_password, "");
CL_EstablishConnection(Cmd_Argv(1));
}
// link it into the bsp tree
if (!ent->priv.server->free)
- SV_LinkEdict (ent, false);
+ SV_LinkEdict(ent);
}
end = t;
lhnetsocket_t *mysocket;
char peer_address[64];
- if (!rcon_password.string || !rcon_password.string[0] || rcon_secure.integer)
+ if (!rcon_password.string || !rcon_password.string[0] || rcon_secure.integer > 0)
{
Con_Printf ("You must set rcon_password before issuing an pqrcon command, and rcon_secure must be 0.\n");
return;
NetConn_WriteString(mysocket, "\377\377\377\377getchallenge", &to); // otherwise we'll request the challenge later
strlcpy(cls.rcon_commands[cls.rcon_ringpos], Cmd_Args(), sizeof(cls.rcon_commands[cls.rcon_ringpos]));
cls.rcon_addresses[cls.rcon_ringpos] = to;
- cls.rcon_ringpos = (cls.rcon_ringpos) % 64;
- cls.rcon_timeout[i] = realtime + rcon_secure_challengetimeout.value;
+ cls.rcon_timeout[cls.rcon_ringpos] = realtime + rcon_secure_challengetimeout.value;
+ cls.rcon_ringpos = (cls.rcon_ringpos + 1) % MAX_RCONS;
}
- else if(rcon_secure.integer)
+ else if(rcon_secure.integer > 0)
{
char buf[1500];
char argbuf[1500];