Added primary server version interface to cRoot and "primaryserverversion" console command.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1059 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user