Add server identification packet

This commit is contained in:
Tixx
2024-10-04 20:49:05 +02:00
parent 4f052a3e0a
commit 6aeb2eb736
3 changed files with 8 additions and 2 deletions

View File

@@ -140,8 +140,7 @@ void THeartbeatThread::operator()() {
std::string THeartbeatThread::GenerateCall() {
std::stringstream Ret;
Ret << "uuid=" << Application::Settings.getAsString(Settings::Key::General_AuthKey)
<< "&players=" << mServer.ClientCount()
Ret << "players=" << mServer.ClientCount()
<< "&maxplayers=" << Application::Settings.getAsInt(Settings::Key::General_MaxPlayers)
<< "&port=" << Application::Settings.getAsInt(Settings::Key::General_Port)
<< "&map=" << Application::Settings.getAsString(Settings::Key::General_Map)
@@ -156,6 +155,8 @@ std::string THeartbeatThread::GenerateCall() {
<< "&modstotal=" << mResourceManager.ModsLoaded()
<< "&playerslist=" << GetPlayers()
<< "&desc=" << Application::Settings.getAsString(Settings::Key::General_Description);
lastCall = Ret.str();
Ret << "&uuid=" << Application::Settings.getAsString(Settings::Key::General_AuthKey);
return Ret.str();
}
THeartbeatThread::THeartbeatThread(TResourceManager& ResourceManager, TServer& Server)