| 331 | } |
| 332 | |
| 333 | void MSG_WriteString( msg_t *sb, const char *s ) { |
| 334 | if ( !s ) { |
| 335 | MSG_WriteData (sb, "", 1); |
| 336 | } else { |
| 337 | int l; |
| 338 | char string[MAX_STRING_CHARS]; |
| 339 | |
| 340 | l = strlen( s ); |
| 341 | if ( l >= MAX_STRING_CHARS ) { |
| 342 | Com_Printf( "MSG_WriteString: MAX_STRING_CHARS" ); |
| 343 | MSG_WriteData (sb, "", 1); |
| 344 | return; |
| 345 | } |
| 346 | Q_strncpyz( string, s, sizeof( string ) ); |
| 347 | |
| 348 | // eurofix: eliminating this means you can chat in european languages. WTF are "old clients" anyway? -ste |
| 349 | // |
| 350 | // // get rid of 0xff chars, because old clients don't like them |
| 351 | // for ( int i = 0 ; i < l ; i++ ) { |
| 352 | // if ( ((byte *)string)[i] > 127 ) { |
| 353 | // string[i] = '.'; |
| 354 | // } |
| 355 | // } |
| 356 | |
| 357 | MSG_WriteData (sb, string, l+1); |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | void MSG_WriteBigString( msg_t *sb, const char *s ) { |
| 362 | if ( !s ) { |
no test coverage detected