MCPcopy Create free account
hub / github.com/cuberite/cuberite / HandlePing

Method HandlePing

src/ClientHandle.cpp:411–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409
410
411void cClientHandle::HandlePing(void)
412{
413 // Somebody tries to retrieve information about the server
414 AString Reply;
415 Printf(Reply, "%s%s%i%s%i",
416 cRoot::Get()->GetServer()->GetDescription().c_str(),
417 cChatColor::Delimiter.c_str(),
418 cRoot::Get()->GetServer()->GetNumPlayers(),
419 cChatColor::Delimiter.c_str(),
420 cRoot::Get()->GetServer()->GetMaxPlayers()
421 );
422 Kick(Reply.c_str());
423}
424
425
426

Callers 1

ParsePingMethod · 0.80

Calls 5

PrintfFunction · 0.85
c_strMethod · 0.80
GetServerMethod · 0.80
GetMaxPlayersMethod · 0.80
GetNumPlayersMethod · 0.45

Tested by

no test coverage detected