| 321 | //=========================================================================== |
| 322 | |
| 323 | static void ShoveChatStr (const char *str, uint8_t who) |
| 324 | { |
| 325 | // Don't send empty messages |
| 326 | if (str == NULL || str[0] == '\0') |
| 327 | return; |
| 328 | |
| 329 | if (*str == '#') |
| 330 | { |
| 331 | PlaybackCheat(str + 1); |
| 332 | } |
| 333 | else |
| 334 | { |
| 335 | if (PlaybackCheat(str)) return; |
| 336 | #if 0 |
| 337 | FString substBuff; |
| 338 | |
| 339 | if (str[0] == '/' && |
| 340 | (str[1] == 'm' || str[1] == 'M') && |
| 341 | (str[2] == 'e' || str[2] == 'E')) |
| 342 | { // This is a /me message |
| 343 | str += 3; |
| 344 | who |= 2; |
| 345 | } |
| 346 | |
| 347 | Net_WriteByte(DEM_SAY); |
| 348 | Net_WriteByte(who); |
| 349 | |
| 350 | if (!chat_substitution || !DoSubstitution(substBuff, str)) |
| 351 | { |
| 352 | Net_WriteString(MakeUTF8(str)); |
| 353 | } |
| 354 | else |
| 355 | { |
| 356 | Net_WriteString(MakeUTF8(substBuff)); |
| 357 | } |
| 358 | #else |
| 359 | Printf("%s %s\n", GStrings.GetString("TXT_SAY"), str); |
| 360 | #endif |
| 361 | } |
| 362 | } |
| 363 | |
| 364 | //=========================================================================== |
| 365 | // |
no test coverage detected