mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Server: move shutdown parts to a specific shutdown state object (#7437)
* Server: move shutdown parts to a specific shutdown state object
This commit is contained in:
@@ -402,11 +402,8 @@ void Server::handleCommand_ClientReady(NetworkPacket* pkt)
|
||||
m_clients.event(peer_id, CSE_SetClientReady);
|
||||
m_script->on_joinplayer(playersao);
|
||||
// Send shutdown timer if shutdown has been scheduled
|
||||
if (m_shutdown_timer > 0.0f) {
|
||||
std::wstringstream ws;
|
||||
ws << L"*** Server shutting down in "
|
||||
<< duration_to_string(myround(m_shutdown_timer)).c_str() << ".";
|
||||
SendChatMessage(pkt->getPeerId(), ws.str());
|
||||
if (m_shutdown_state.isTimerRunning()) {
|
||||
SendChatMessage(pkt->getPeerId(), m_shutdown_state.getShutdownTimerMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user