mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
Fixed an error that I caused. Modified the rcon-command so you can write "rcon <password> cmd" without needing to set rcon_password every time.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2603 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
5978a4a12a
commit
bb7975a47a
2 changed files with 29 additions and 8 deletions
|
@ -858,13 +858,31 @@ CL_Rcon_f
|
|||
void CL_Rcon_f (void)
|
||||
{
|
||||
char message[1024];
|
||||
char password[1024];
|
||||
int i;
|
||||
netadr_t to;
|
||||
|
||||
if (!*rcon_password.string) //FIXME: this is strange...
|
||||
{
|
||||
Con_TPrintf (TLC_NORCONPASSWORD);
|
||||
return;
|
||||
//Con_TPrintf (TLC_NORCONPASSWORD);
|
||||
//return;
|
||||
if (Cmd_Argc() < 3)
|
||||
{
|
||||
Con_Printf("usage: rcon (password) <command>\n");
|
||||
return;
|
||||
}
|
||||
Q_strncpyz(password, Cmd_Argv(1), sizeof(password));
|
||||
i = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Cmd_Argc() < 2)
|
||||
{
|
||||
Con_Printf("usage: rcon (password) <command>\n");
|
||||
return;
|
||||
}
|
||||
Q_strncpyz(password, rcon_password.string, sizeof(password));
|
||||
i = 1;
|
||||
}
|
||||
|
||||
message[0] = 255;
|
||||
|
@ -873,15 +891,16 @@ void CL_Rcon_f (void)
|
|||
message[3] = 255;
|
||||
message[4] = 0;
|
||||
|
||||
strcat (message, "rcon ");
|
||||
Q_strncatz (message, "rcon ", sizeof(message));
|
||||
|
||||
strcat (message, rcon_password.string);
|
||||
strcat (message, " ");
|
||||
//Q_strncatz (message, rcon_password.string, sizeof(message));
|
||||
Q_strncatz (message, password, sizeof(message));
|
||||
Q_strncatz (message, " ", sizeof(message));
|
||||
|
||||
for (i=1 ; i<Cmd_Argc() ; i++)
|
||||
for ( ; i<Cmd_Argc() ; i++)
|
||||
{
|
||||
strcat (message, Cmd_Argv(i));
|
||||
strcat (message, " ");
|
||||
Q_strncatz (message, Cmd_Argv(i), sizeof(message));
|
||||
Q_strncatz (message, " ", sizeof(message));
|
||||
}
|
||||
|
||||
if (cls.state >= ca_connected)
|
||||
|
|
|
@ -117,6 +117,8 @@ cvar_t gl_reporttjunctions = SCVAR("gl_reporttjunctions","0");
|
|||
cvar_t gl_finish = SCVAR("gl_finish","0");
|
||||
cvar_t gl_dither = SCVAR("gl_dither", "1");
|
||||
cvar_t gl_maxdist = SCVAR("gl_maxdist", "8192");
|
||||
|
||||
extern cvar_t gl_contrast;
|
||||
extern cvar_t gl_mindist;
|
||||
|
||||
extern cvar_t gl_motionblur;
|
||||
|
|
Loading…
Reference in a new issue