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

Method RecordConsoleCommand

src/game/server/teehistorian.cpp:607–629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607void CTeeHistorian::RecordConsoleCommand(int ClientId, int FlagMask, const char *pCmd, IConsole::IResult *pResult)
608{
609 EnsureTickWritten();
610
611 CTeehistorianPacker Buffer;
612 Buffer.Reset();
613 Buffer.AddInt(-TEEHISTORIAN_CONSOLE_COMMAND);
614 Buffer.AddInt(ClientId);
615 Buffer.AddInt(FlagMask);
616 Buffer.AddString(pCmd, 0);
617 Buffer.AddInt(pResult->NumArguments());
618 for(int i = 0; i < pResult->NumArguments(); i++)
619 {
620 Buffer.AddString(pResult->GetString(i), 0);
621 }
622
623 if(m_Debug)
624 {
625 dbg_msg("teehistorian", "ccmd cid=%d cmd='%s'", ClientId, pCmd);
626 }
627
628 Write(Buffer.Data(), Buffer.Size());
629}
630
631void CTeeHistorian::RecordTestExtra()
632{

Callers 1

CommandCallbackMethod · 0.80

Calls 9

dbg_msgFunction · 0.85
WriteEnum · 0.85
AddIntMethod · 0.80
NumArgumentsMethod · 0.80
ResetMethod · 0.45
AddStringMethod · 0.45
GetStringMethod · 0.45
DataMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected