diff --git a/src/ServerMain.cpp b/src/ServerMain.cpp index 3a9f9f0..3ced64b 100644 --- a/src/ServerMain.cpp +++ b/src/ServerMain.cpp @@ -52,9 +52,15 @@ public: getline(std::cin, line); if (line == "stop") { + LOG("Stopping server ..."); m_Server.Stop(); - } else if (line == "help") { + } else if (line == "restart") { + LOG("Restarting server ..."); + m_Server.Restart(); + } + else if (line == "help") { LOG("use \"stop\" to stop the server"); + LOG("use \"restart\" to restart the server"); } } }); diff --git a/src/server/Server.cpp b/src/server/Server.cpp index b34dfd5..95cdca5 100644 --- a/src/server/Server.cpp +++ b/src/server/Server.cpp @@ -57,6 +57,8 @@ void Server::Restart() { m_Lobby.OpenLobby(); m_Game.NotifyListeners(&game::GameListener::OnGameStateUpdate, game::GameState::Lobby); + + utils::LOG("Game restarted !"); } void Server::Close() {