MCPcopy Create free account
hub / github.com/ddnet/ddnet / ConModAlert

Method ConModAlert

src/game/server/gamecontext.cpp:3369–3385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3367}
3368
3369void CGameContext::ConModAlert(IConsole::IResult *pResult, void *pUserData)
3370{
3371 CGameContext *pSelf = (CGameContext *)pUserData;
3372
3373 const int Victim = pResult->GetVictim();
3374 if(!CheckClientId(Victim) || !pSelf->m_apPlayers[Victim])
3375 {
3376 log_info("moderator_alert", "Client ID not found: %d", Victim);
3377 return;
3378 }
3379
3380 char aBuf[1024];
3381 str_copy(aBuf, pResult->GetString(1), sizeof(aBuf));
3382 UnescapeNewlines(aBuf);
3383
3384 pSelf->SendModeratorAlert(aBuf, Victim);
3385}
3386
3387void CGameContext::ConBroadcast(IConsole::IResult *pResult, void *pUserData)
3388{

Callers

nothing calls this directly

Calls 6

CheckClientIdFunction · 0.85
UnescapeNewlinesFunction · 0.85
GetVictimMethod · 0.80
SendModeratorAlertMethod · 0.80
str_copyFunction · 0.50
GetStringMethod · 0.45

Tested by

no test coverage detected