From 1fbe5d1755cc24c763f69f1a2bc7a24ffef54508 Mon Sep 17 00:00:00 2001 From: TimeServ Date: Wed, 22 Aug 2007 16:52:13 +0000 Subject: [PATCH] fixed up rcon a bit more, fixed merge build git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2606 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_main.c | 17 +++++++---------- engine/client/renderer.c | 2 -- engine/common/translate.c | 2 +- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index e02801808..7dee09164 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -858,31 +858,30 @@ CL_Rcon_f void CL_Rcon_f (void) { char message[1024]; - char password[1024]; + char *password; int i; netadr_t to; - if (!*rcon_password.string) //FIXME: this is strange... + i = 1; + password = rcon_password.string; + if (!*password) //FIXME: this is strange... { - //Con_TPrintf (TLC_NORCONPASSWORD); - //return; if (Cmd_Argc() < 3) { + Con_TPrintf (TLC_NORCONPASSWORD); Con_Printf("usage: rcon (password) \n"); return; } - Q_strncpyz(password, Cmd_Argv(1), sizeof(password)); + password = Cmd_Argv(1); i = 2; } else { if (Cmd_Argc() < 2) { - Con_Printf("usage: rcon (password) \n"); + Con_Printf("usage: rcon \n"); return; } - Q_strncpyz(password, rcon_password.string, sizeof(password)); - i = 1; } message[0] = 255; @@ -892,8 +891,6 @@ void CL_Rcon_f (void) message[4] = 0; Q_strncatz (message, "rcon ", sizeof(message)); - - //Q_strncatz (message, rcon_password.string, sizeof(message)); Q_strncatz (message, password, sizeof(message)); Q_strncatz (message, " ", sizeof(message)); diff --git a/engine/client/renderer.c b/engine/client/renderer.c index b1e5893d4..70cec952a 100644 --- a/engine/client/renderer.c +++ b/engine/client/renderer.c @@ -320,7 +320,6 @@ cvar_t gl_specular = SCVAR ("gl_specular", "0"); #endif // The callbacks are not in D3D yet -#ifndef D3DQUAKE cvar_t gl_texture_anisotropic_filtering = SCVARFC("gl_texture_anisotropic_filtering", "0", CVAR_ARCHIVE | CVAR_RENDERERCALLBACK, GL_Texture_Anisotropic_Filtering_Callback); @@ -330,7 +329,6 @@ cvar_t gl_texturemode = SCVARFC("gl_texturemode", "GL_LINEAR_MIPMAP_NEAREST cvar_t gl_texturemode2d = SCVARFC("gl_texturemode2d", "GL_LINEAR", CVAR_ARCHIVE | CVAR_RENDERERCALLBACK, GL_Texturemode2d_Callback); -#endif cvar_t gl_triplebuffer = SCVARF ("gl_triplebuffer", "1", CVAR_ARCHIVE); diff --git a/engine/common/translate.c b/engine/common/translate.c index b30018b9d..f547659be 100644 --- a/engine/common/translate.c +++ b/engine/common/translate.c @@ -189,7 +189,7 @@ static char *defaultlanguagetext = "TLC_ILLEGALSERVERADDRESS \"Illegal server address\\n\"\n" "TLC_CONNECTINGTO \"Connecting to %s...\\n\"\n" "TLC_SYNTAX_CONNECT \"usage: connect \\n\"\n" -"TLC_NORCONPASSWORD \"You must set 'rcon_password' before\\nissuing an rcon command.\\n\"\n" +"TLC_NORCONPASSWORD \"'rcon_password' is not set.\"\n" "TLC_NORCONDEST \"You must either be connected,\\nor set the 'rcon_address' cvar\\nto issue rcon commands\\n\"\n" "TLC_SYNTAX_USER \"Usage: user \\n\"\n" "TLC_USER_NOUSER \"User not in server.\\n\"\n"