parent
04cc9de8f2
commit
6120251320
|
@ -726,7 +726,7 @@ void Server::handleCommand_ClientReady(NetworkPacket* pkt)
|
||||||
if (m_shutdown_timer > 0.0f) {
|
if (m_shutdown_timer > 0.0f) {
|
||||||
std::wstringstream ws;
|
std::wstringstream ws;
|
||||||
ws << L"*** Server shutting down in "
|
ws << L"*** Server shutting down in "
|
||||||
<< duration_to_string(round(m_shutdown_timer)).c_str() << ".";
|
<< duration_to_string(myround(m_shutdown_timer)).c_str() << ".";
|
||||||
SendChatMessage(pkt->getPeerId(), ws.str());
|
SendChatMessage(pkt->getPeerId(), ws.str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1047,7 +1047,7 @@ void Server::AsyncRunStep(bool initial_step)
|
||||||
std::wstringstream ws;
|
std::wstringstream ws;
|
||||||
|
|
||||||
ws << L"*** Server shutting down in "
|
ws << L"*** Server shutting down in "
|
||||||
<< duration_to_string(round(m_shutdown_timer - dtime)).c_str()
|
<< duration_to_string(myround(m_shutdown_timer - dtime)).c_str()
|
||||||
<< ".";
|
<< ".";
|
||||||
|
|
||||||
infostream << wide_to_utf8(ws.str()).c_str() << std::endl;
|
infostream << wide_to_utf8(ws.str()).c_str() << std::endl;
|
||||||
|
@ -3502,7 +3502,7 @@ void Server::requestShutdown(const std::string &msg, bool reconnect, float delay
|
||||||
std::wstringstream ws;
|
std::wstringstream ws;
|
||||||
|
|
||||||
ws << L"*** Server shutting down in "
|
ws << L"*** Server shutting down in "
|
||||||
<< duration_to_string(round(m_shutdown_timer)).c_str()
|
<< duration_to_string(myround(m_shutdown_timer)).c_str()
|
||||||
<< ".";
|
<< ".";
|
||||||
|
|
||||||
infostream << wide_to_utf8(ws.str()).c_str() << std::endl;
|
infostream << wide_to_utf8(ws.str()).c_str() << std::endl;
|
||||||
|
|
|
@ -616,9 +616,9 @@ inline const char *bool_to_cstr(bool val)
|
||||||
|
|
||||||
inline const std::string duration_to_string(int sec)
|
inline const std::string duration_to_string(int sec)
|
||||||
{
|
{
|
||||||
int min = floor(sec / 60);
|
int min = sec / 60;
|
||||||
sec %= 60;
|
sec %= 60;
|
||||||
int hour = floor(min / 60);
|
int hour = min / 60;
|
||||||
min %= 60;
|
min %= 60;
|
||||||
|
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
|
Loading…
Reference in New Issue