summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorM. Kristall <mkpdev@gmail.com>2009-12-29 17:40:26 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:17:25 +0000
commita7389070c1c77ed83d8f3c850267e2bc8b398209 (patch)
tree8950304dde04d8c41703649860436392c100d82b /src
parentc80dd4291732ab9da54371f2a4b848d4353f99f0 (diff)
* Remove unnecessary security code introduced from ioq3 merge
Diffstat (limited to 'src')
-rw-r--r--src/game/g_cmds.c2
-rw-r--r--src/qcommon/cmd.c16
-rw-r--r--src/qcommon/qcommon.h1
-rw-r--r--src/server/sv_client.c1
4 files changed, 1 insertions, 19 deletions
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index d2bf150e..6ee9bf7b 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -696,7 +696,7 @@ static qboolean G_SayTo( gentity_t *ent, gentity_t *other, saymode_t mode, const
return qfalse;
}
- trap_SendServerCommand( other-g_entities, va( "chat %d %d\"%s\"",
+ trap_SendServerCommand( other-g_entities, va( "chat %d %d \"%s\"",
ent ? ent-g_entities : -1,
mode,
message ) );
diff --git a/src/qcommon/cmd.c b/src/qcommon/cmd.c
index 80e991cd..7ce50ccc 100644
--- a/src/qcommon/cmd.c
+++ b/src/qcommon/cmd.c
@@ -470,22 +470,6 @@ char *Cmd_Cmd(void)
}
/*
- Replace command separators with space to prevent interpretation
- This is a hack to protect buggy qvms
- https://bugzilla.icculus.org/show_bug.cgi?id=3593
-*/
-void Cmd_Args_Sanitize( void ) {
- int i;
- for ( i = 1 ; i < cmd.argc ; i++ ) {
- char* c = cmd.argv[i];
- while ((c = strpbrk(c, "\n\r;"))) {
- *c = ' ';
- ++c;
- }
- }
-}
-
-/*
============
Cmd_TokenizeString
diff --git a/src/qcommon/qcommon.h b/src/qcommon/qcommon.h
index d7184d80..18f4c5e5 100644
--- a/src/qcommon/qcommon.h
+++ b/src/qcommon/qcommon.h
@@ -431,7 +431,6 @@ char *Cmd_ArgsFrom( int arg );
void Cmd_ArgsBuffer( char *buffer, int bufferLength );
void Cmd_LiteralArgsBuffer( char *buffer, int bufferLength );
char *Cmd_Cmd (void);
-void Cmd_Args_Sanitize( void );
// The functions that execute commands get their parameters with these
// functions. Cmd_Argv () will return an empty string, not a NULL
// if arg > argc, so string operations are allways safe.
diff --git a/src/server/sv_client.c b/src/server/sv_client.c
index 9410f162..1448822c 100644
--- a/src/server/sv_client.c
+++ b/src/server/sv_client.c
@@ -1273,7 +1273,6 @@ void SV_ExecuteClientCommand( client_t *cl, const char *s, qboolean clientOK ) {
if (clientOK) {
// pass unknown strings to the game
if (!u->name && sv.state == SS_GAME) {
- Cmd_Args_Sanitize();
VM_Call( gvm, GAME_CLIENT_COMMAND, cl - svs.clients );
}
}