summaryrefslogtreecommitdiff
path: root/source/sys_unix.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2008-10-15 18:07:06 +0000
committerAndrey Nazarov <skuller@skuller.net>2008-10-15 18:07:06 +0000
commit58c8e2e0377eddcae7f44d30b78578fbedf0eaa7 (patch)
tree3643ef5da6e9e397cf4c27ff93b4722843b5c83c /source/sys_unix.c
parent2ff447b2019b5696375fbc09d87416345418cd9a (diff)
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.
Diffstat (limited to 'source/sys_unix.c')
-rw-r--r--source/sys_unix.c20
1 files changed, 17 insertions, 3 deletions
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 ) {