MCPcopy Create free account
hub / github.com/ZDoom/Raze / ShoveChatStr

Function ShoveChatStr

source/core/ct_chat.cpp:323–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321//===========================================================================
322
323static 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//

Callers 2

CT_ResponderFunction · 0.85
CCMDFunction · 0.85

Calls 7

PlaybackCheatFunction · 0.85
Net_WriteByteFunction · 0.85
DoSubstitutionFunction · 0.85
Net_WriteStringFunction · 0.85
MakeUTF8Function · 0.85
PrintfFunction · 0.85
GetStringMethod · 0.45

Tested by

no test coverage detected