From 3a4d998f6c21b9d93690c71ec424b37957149141 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 24 Sep 2005 11:42:38 +0000 Subject: [PATCH] Don't let them use rcon if we didn't set a password. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1358 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- fteqtv/qw.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fteqtv/qw.c b/fteqtv/qw.c index 6601cc316..7ee12907f 100644 --- a/fteqtv/qw.c +++ b/fteqtv/qw.c @@ -425,6 +425,12 @@ void QTV_Rcon(sv_t *qtv, char *message, netadr_t *from) char *command; int passlen; + if (!*qtv->password) + { + Netchan_OutOfBandPrint(qtv->qwdsocket, *from, "n" "Rcon is disabled. Set a password.\n"); + return; + } + while(*message > '\0' && *message <= ' ') message++;