From c3dc9b0b8a059aa1da6cbfa1105c4de4bf6fde95 Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 27 Oct 2006 10:57:06 +0000 Subject: [PATCH] Don't print anything about empty commands. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2428 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- fteqtv/rcon.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fteqtv/rcon.c b/fteqtv/rcon.c index 15a0866c5..a3bb9f696 100644 --- a/fteqtv/rcon.c +++ b/fteqtv/rcon.c @@ -464,8 +464,11 @@ char *Cmd_Exec(cluster_t *cluster, sv_t *qtv, char *arg[MAX_ARGS], char *buffer, { while(fgets(line, sizeof(line)-1, f)) { - res = Rcon_Command(cluster, qtv, line, buffer, sizeofbuffer, localcommand); - Sys_Printf(cluster, "%s", res); //this is perhaps wrong. + if (*line) + { + res = Rcon_Command(cluster, qtv, line, buffer, sizeofbuffer, localcommand); + Sys_Printf(cluster, "%s", res); //this is perhaps wrong. + } } fclose(f); return "Execed\n"; @@ -610,7 +613,7 @@ char *Cmd_AllowNQ(cluster_t *cluster, sv_t *qtv, char *arg[MAX_ARGS], char *buff snprintf(buffer, sizeofbuffer, "allownq is currently %i\n", cluster->allownqclients); return buffer; } - cluster->allownqclients = atoi(arg[1]); + cluster->allownqclients = !!atoi(arg[1]); return "allownq set\n"; } char *Cmd_MaxProxies(cluster_t *cluster, sv_t *qtv, char *arg[MAX_ARGS], char *buffer, int sizeofbuffer, qboolean localcommand) @@ -761,7 +764,7 @@ char *Cmd_MVDPort(cluster_t *cluster, sv_t *qtv, char *arg[MAX_ARGS], char *buff char *Cmd_Commands(cluster_t *cluster, sv_t *qtv, char *arg[MAX_ARGS], char *buffer, int sizeofbuffer, qboolean localcommand) { - return "fixme"; + return "fixme\n"; } typedef struct rconcommands_s {