From 58c8e2e0377eddcae7f44d30b78578fbedf0eaa7 Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Wed, 15 Oct 2008 18:07:06 +0000 Subject: Added `sv_mvd_allow_stufftext' and `sv_mvd_password' cvars. MVD admins now can execute arbitrary commands on behaf of the dummy MVD observer on game server side via `fwd' command, if allowed. MVD channel is now listed in the menu when it is not suspended, not just when there are active players. Made `mvdconnect' command accept --user and --pass options. When masking off high-bit characters before displaying them on system console or writing into logfile, ignore any control characters. Updated documentation. --- source/sys_unix.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'source/sys_unix.c') diff --git a/source/sys_unix.c b/source/sys_unix.c index 316cee0..2128b56 100644 --- a/source/sys_unix.c +++ b/source/sys_unix.c @@ -177,7 +177,7 @@ Sys_ConsoleOutput void Sys_ConsoleOutput( const char *string ) { char buffer[MAXPRINTMSG*2]; char *m, *p; - int color = 0; + int c, color = 0; p = buffer; m = buffer + sizeof( buffer ); @@ -191,7 +191,14 @@ void Sys_ConsoleOutput( const char *string ) { if( p + 1 > m ) { break; } - *p++ = *string++ & 127; + c = *string++; + if( c & 128 ) { + c &= 127; + if( c < 32 ) { + continue; + } + } + *p++ = c; } Sys_ConsoleWrite( buffer, p - buffer ); @@ -229,7 +236,14 @@ void Sys_ConsoleOutput( const char *string ) { if( p + 1 > m ) { break; } - *p++ = *string++ & 127; + c = *string++; + if( c & 128 ) { + c &= 127; + if( c < 32 ) { + continue; + } + } + *p++ = c; } if( color ) { -- cgit v1.2.3