From 7849c3bf85b8a4ac41161c4fc4a9c33c19c47879 Mon Sep 17 00:00:00 2001 From: Tim Angus Date: Sat, 22 Apr 2006 22:32:46 +0000 Subject: * tjw's server comms patch --- src/game/g_svcmds.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/game/g_svcmds.c') diff --git a/src/game/g_svcmds.c b/src/game/g_svcmds.c index ca093c8e..30caab0d 100644 --- a/src/game/g_svcmds.c +++ b/src/game/g_svcmds.c @@ -577,9 +577,20 @@ qboolean ConsoleCommand( void ) trap_SendServerCommand( -1, va( "print \"server: %s\n\"", ConcatArgs( 1 ) ) ); return qtrue; } + else if( !Q_stricmp( cmd, "chat" ) ) + { + trap_SendServerCommand( -1, va( "chat \"%s\" -1 0", ConcatArgs( 1 ) ) ); + G_Printf( "chat: %s\n", ConcatArgs( 1 ) ); + return qtrue; + } + else if( !Q_stricmp( cmd, "cp" ) ) + { + trap_SendServerCommand( -1, va( "cp \"%s\"", ConcatArgs( 1 ) ) ); + G_Printf( "cp: %s\n", ConcatArgs( 1 ) ); + return qtrue; + } - // everything else will also be printed as a say command - trap_SendServerCommand( -1, va( "print \"server: %s\n\"", ConcatArgs( 0 ) ) ); + G_Printf( "unknown command: %s\n", cmd ); return qtrue; } -- cgit