Remove trailing comma after player list in server status string
parent
1ed559bd24
commit
8e0ac70c4d
|
@ -4449,9 +4449,10 @@ std::wstring Server::getStatusString()
|
||||||
// Uptime
|
// Uptime
|
||||||
os<<L", uptime="<<m_uptime.get();
|
os<<L", uptime="<<m_uptime.get();
|
||||||
// Information about clients
|
// Information about clients
|
||||||
|
core::map<u16, RemoteClient*>::Iterator i;
|
||||||
|
bool first;
|
||||||
os<<L", clients={";
|
os<<L", clients={";
|
||||||
for(core::map<u16, RemoteClient*>::Iterator
|
for(i = m_clients.getIterator(), first = true;
|
||||||
i = m_clients.getIterator();
|
|
||||||
i.atEnd() == false; i++)
|
i.atEnd() == false; i++)
|
||||||
{
|
{
|
||||||
// Get client and check that it is valid
|
// Get client and check that it is valid
|
||||||
|
@ -4466,7 +4467,11 @@ std::wstring Server::getStatusString()
|
||||||
if(player != NULL)
|
if(player != NULL)
|
||||||
name = narrow_to_wide(player->getName());
|
name = narrow_to_wide(player->getName());
|
||||||
// Add name to information string
|
// Add name to information string
|
||||||
os<<name<<L",";
|
if(!first)
|
||||||
|
os<<L",";
|
||||||
|
else
|
||||||
|
first = false;
|
||||||
|
os<<name;
|
||||||
}
|
}
|
||||||
os<<L"}";
|
os<<L"}";
|
||||||
if(((ServerMap*)(&m_env->getMap()))->isSavingEnabled() == false)
|
if(((ServerMap*)(&m_env->getMap()))->isSavingEnabled() == false)
|
||||||
|
|
Loading…
Reference in New Issue