Re-enable core.get_server_status()
This commit is contained in:
parent
2c0b370748
commit
c4d691600d
@ -3180,8 +3180,7 @@ std::string Server::getStatusString()
|
|||||||
{
|
{
|
||||||
std::ostringstream os(std::ios_base::binary);
|
std::ostringstream os(std::ios_base::binary);
|
||||||
|
|
||||||
// Disabled due to misuse.
|
os << "# Server: ";
|
||||||
/*os << "# Server: ";
|
|
||||||
// Version
|
// Version
|
||||||
os << "version=" << g_version_string;
|
os << "version=" << g_version_string;
|
||||||
// Uptime
|
// Uptime
|
||||||
@ -3189,8 +3188,9 @@ std::string Server::getStatusString()
|
|||||||
// Max lag estimate
|
// Max lag estimate
|
||||||
os << ", max_lag=" << (m_env ? m_env->getMaxLagEstimate() : 0);
|
os << ", max_lag=" << (m_env ? m_env->getMaxLagEstimate() : 0);
|
||||||
|
|
||||||
|
// Disabled due to misuse.
|
||||||
// Information about clients
|
// Information about clients
|
||||||
bool first = true;
|
/*bool first = true;
|
||||||
os << ", clients={";
|
os << ", clients={";
|
||||||
if (m_env) {
|
if (m_env) {
|
||||||
std::vector<session_t> clients = m_clients.getClientIDs();
|
std::vector<session_t> clients = m_clients.getClientIDs();
|
||||||
@ -3211,10 +3211,10 @@ std::string Server::getStatusString()
|
|||||||
os << "}";*/
|
os << "}";*/
|
||||||
|
|
||||||
if (m_env && !((ServerMap*)(&m_env->getMap()))->isSavingEnabled())
|
if (m_env && !((ServerMap*)(&m_env->getMap()))->isSavingEnabled())
|
||||||
os /*<< std::endl*/ << "# Server: " << " WARNING: Map saving is disabled.";
|
os << std::endl << "# Server: " << " WARNING: Map saving is disabled.";
|
||||||
|
|
||||||
if (!g_settings->get("motd").empty())
|
if (!g_settings->get("motd").empty())
|
||||||
os /*<< std::endl*/ << "# Server: " << g_settings->get("motd");
|
os << std::endl << "# Server: " << g_settings->get("motd");
|
||||||
|
|
||||||
return os.str();
|
return os.str();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user