summaryrefslogtreecommitdiffstats
path: root/source/Server.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-20 22:28:43 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-11-20 22:28:43 +0100
commit2fcdbfd42807111940e9c52f26491ffea1fb8a27 (patch)
treeb118b3b811de68f51c9c9f5df7365802f293c75d /source/Server.cpp
parentLinux Makefile: Added the gcc option to output debugging information even in release builds. (diff)
downloadcuberite-2fcdbfd42807111940e9c52f26491ffea1fb8a27.tar
cuberite-2fcdbfd42807111940e9c52f26491ffea1fb8a27.tar.gz
cuberite-2fcdbfd42807111940e9c52f26491ffea1fb8a27.tar.bz2
cuberite-2fcdbfd42807111940e9c52f26491ffea1fb8a27.tar.lz
cuberite-2fcdbfd42807111940e9c52f26491ffea1fb8a27.tar.xz
cuberite-2fcdbfd42807111940e9c52f26491ffea1fb8a27.tar.zst
cuberite-2fcdbfd42807111940e9c52f26491ffea1fb8a27.zip
Diffstat (limited to '')
-rw-r--r--source/Server.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/Server.cpp b/source/Server.cpp
index 95d5617cb..cc5e2a731 100644
--- a/source/Server.cpp
+++ b/source/Server.cpp
@@ -548,6 +548,25 @@ void cServer::ServerCommand(const AString & a_Cmd)
}
#endif
+ if (split[0].compare("primaryserverversion") == 0)
+ {
+ if (split.size() > 1)
+ {
+ int Version = atol(split[1].c_str());
+ if (Version == 0)
+ {
+ LOGWARNING("Cannot parse version \"%s\". Not setting anything.");
+ return;
+ }
+ cRoot::Get()->SetPrimaryServerVersion(Version);
+ }
+ LOGINFO("Primary server version: %d (%s)",
+ cRoot::Get()->m_PrimaryServerVersion,
+ cProtocolRecognizer::GetVersionTextFromInt(cRoot::Get()->m_PrimaryServerVersion).c_str()
+ );
+ return;
+ }
+
if (split.size() > 1)
{
if (split[0].compare("say") == 0)