mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: common: xrcon: strip color codes before sending message to client
This commit is contained in:
committed by
Alibek Omarov
parent
6dabc6f2c5
commit
97b8ca6b38
@@ -487,6 +487,12 @@ void XRcon_Print( const char *msg )
|
||||
xrcon.print_flush_time = Platform_DoubleTime() + XRCON_FLUSH_INTERVAL;
|
||||
}
|
||||
}
|
||||
else if( msg[i] == '^' && i + 1 < len )
|
||||
{
|
||||
char color_code = msg[i + 1];
|
||||
if( color_code >= '0' && color_code <= '9' )
|
||||
i++; // skip color code, client does not supports them at the moment
|
||||
}
|
||||
else if( msg[i] >= ' ' || msg[i] == '\t' )
|
||||
{
|
||||
if( xrcon.print_pos < sizeof( xrcon.print_buffer ) - 1 )
|
||||
|
||||
Reference in New Issue
Block a user