diff options
author | Mattes D <github@xoft.cz> | 2013-08-15 10:56:52 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2013-08-15 10:56:52 +0200 |
commit | 1a52e89177a907b5d23d3e72f78d30a333da4bfe (patch) | |
tree | 8f2783d06d423361b02457c77f90d6ec874a5191 /source/Protocol | |
parent | Merge pull request #91 from tigerw/master (diff) | |
parent | Added simple deadlock detection code. (diff) | |
download | cuberite-1a52e89177a907b5d23d3e72f78d30a333da4bfe.tar cuberite-1a52e89177a907b5d23d3e72f78d30a333da4bfe.tar.gz cuberite-1a52e89177a907b5d23d3e72f78d30a333da4bfe.tar.bz2 cuberite-1a52e89177a907b5d23d3e72f78d30a333da4bfe.tar.lz cuberite-1a52e89177a907b5d23d3e72f78d30a333da4bfe.tar.xz cuberite-1a52e89177a907b5d23d3e72f78d30a333da4bfe.tar.zst cuberite-1a52e89177a907b5d23d3e72f78d30a333da4bfe.zip |
Diffstat (limited to 'source/Protocol')
-rw-r--r-- | source/Protocol/ProtocolRecognizer.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source/Protocol/ProtocolRecognizer.cpp b/source/Protocol/ProtocolRecognizer.cpp index 290f2df75..35c8fe993 100644 --- a/source/Protocol/ProtocolRecognizer.cpp +++ b/source/Protocol/ProtocolRecognizer.cpp @@ -14,6 +14,7 @@ #include "Protocol16x.h" #include "../ClientHandle.h" #include "../Root.h" +#include "../Server.h" #include "../World.h" #include "../ChatColor.h" @@ -729,11 +730,11 @@ void cProtocolRecognizer::HandleServerPing(void) { // http://wiki.vg/wiki/index.php?title=Protocol&oldid=3099#Server_List_Ping_.280xFE.29 Printf(Reply, "%s%s%i%s%i", - cRoot::Get()->GetDefaultWorld()->GetDescription().c_str(), - cChatColor::Delimiter.c_str(), - cRoot::Get()->GetDefaultWorld()->GetNumPlayers(), - cChatColor::Delimiter.c_str(), - cRoot::Get()->GetDefaultWorld()->GetMaxPlayers() + cRoot::Get()->GetServer()->GetDescription().c_str(), + cChatColor::Delimiter.c_str(), + cRoot::Get()->GetServer()->GetNumPlayers(), + cChatColor::Delimiter.c_str(), + cRoot::Get()->GetServer()->GetMaxPlayers() ); break; } @@ -759,9 +760,9 @@ void cProtocolRecognizer::HandleServerPing(void) // http://wiki.vg/wiki/index.php?title=Server_List_Ping&oldid=3100 AString NumPlayers; - Printf(NumPlayers, "%d", cRoot::Get()->GetDefaultWorld()->GetNumPlayers()); + Printf(NumPlayers, "%d", cRoot::Get()->GetServer()->GetNumPlayers()); AString MaxPlayers; - Printf(MaxPlayers, "%d", cRoot::Get()->GetDefaultWorld()->GetMaxPlayers()); + Printf(MaxPlayers, "%d", cRoot::Get()->GetServer()->GetMaxPlayers()); AString ProtocolVersionNum; Printf(ProtocolVersionNum, "%d", cRoot::Get()->m_PrimaryServerVersion); @@ -775,7 +776,7 @@ void cProtocolRecognizer::HandleServerPing(void) Reply.push_back(0); Reply.append(ProtocolVersionTxt); Reply.push_back(0); - Reply.append(cRoot::Get()->GetDefaultWorld()->GetDescription()); + Reply.append(cRoot::Get()->GetServer()->GetDescription()); Reply.push_back(0); Reply.append(NumPlayers); Reply.push_back(0); |