diff --git a/src/net/common/servergame.cpp b/src/net/common/servergame.cpp index 3830d342..0e947c36 100644 --- a/src/net/common/servergame.cpp +++ b/src/net/common/servergame.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -47,10 +46,10 @@ static bool LessThanPlayerHandStartMoney(const boost::shared_ptr lobbyThread, u_int32_t id, const string &name, const string &pwd, const GameData &gameData, unsigned adminPlayerId, GuiInterface &gui, ConfigFile &playerConfig, Log &serverLog) +ServerGame::ServerGame(boost::shared_ptr lobbyThread, u_int32_t id, const string &name, const string &pwd, const GameData &gameData, unsigned adminPlayerId, GuiInterface &gui, ConfigFile &playerConfig) : m_adminPlayerId(adminPlayerId), m_lobbyThread(lobbyThread), m_gui(gui), m_gameData(gameData), m_curState(NULL), m_id(id), m_name(name), - m_password(pwd), m_playerConfig(playerConfig), m_serverLog(serverLog), m_gameNum(1), + m_password(pwd), m_playerConfig(playerConfig), m_gameNum(1), m_curPetitionId(1), m_voteKickTimer(lobbyThread->GetIOService()), m_stateTimer1(lobbyThread->GetIOService()), m_stateTimer2(lobbyThread->GetIOService()) { @@ -285,7 +284,7 @@ ServerGame::InternalStartGame() SetStartData(startData); GuiInterface &gui = GetGui(); - m_game.reset(new Game(&gui, factory, playerData, GetGameData(), GetStartData(), GetNextGameNum(), &m_serverLog)); + m_game.reset(new Game(&gui, factory, playerData, GetGameData(), GetStartData(), GetNextGameNum(), NULL)); GetDatabase().AsyncCreateGame(GetId(), GetName()); InitRankingMap(playerData); diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index 1ec2ca65..cd6ddd4e 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include #include @@ -220,7 +219,6 @@ ServerLobbyThread::Init(const string &logDir) m_serverConfig.readConfigString("DBServerEncryptionKey")); GetBanManager().InitGameNameBadWordList(m_serverConfig.readConfigStringList("GameNameBadWordList")); - m_serverLog.reset(new Log(&m_serverConfig)); } void @@ -1258,8 +1256,7 @@ ServerLobbyThread::HandleNetPacketCreateGame(boost::shared_ptr sess tmpData, session->GetPlayerData()->GetUniqueId(), GetGui(), - m_serverConfig, - *m_serverLog)); + m_serverConfig)); game->Init(); // Add game to list of games. diff --git a/src/net/servergame.h b/src/net/servergame.h index 7a6fe015..cb8a982c 100644 --- a/src/net/servergame.h +++ b/src/net/servergame.h @@ -37,13 +37,12 @@ class PlayerInterface; class ConfigFile; struct GameData; class Game; -class Log; class ServerGame : public boost::enable_shared_from_this { public: ServerGame( - boost::shared_ptr lobbyThread, u_int32_t id, const std::string &name, const std::string &pwd, const GameData &gameData, unsigned adminPlayerId, GuiInterface &gui, ConfigFile &playerConfig, Log &serverLog); + boost::shared_ptr lobbyThread, u_int32_t id, const std::string &name, const std::string &pwd, const GameData &gameData, unsigned adminPlayerId, GuiInterface &gui, ConfigFile &playerConfig); virtual ~ServerGame(); void Init(); @@ -207,7 +206,6 @@ private: const std::string m_name; const std::string m_password; ConfigFile &m_playerConfig; - Log &m_serverLog; unsigned m_gameNum; unsigned m_curPetitionId; boost::asio::deadline_timer m_voteKickTimer; diff --git a/src/net/serverlobbythread.h b/src/net/serverlobbythread.h index 9fba3b6a..c737336f 100644 --- a/src/net/serverlobbythread.h +++ b/src/net/serverlobbythread.h @@ -30,8 +30,6 @@ #include #include -class Log; - #define NET_LOBBY_THREAD_TERMINATE_TIMEOUT_MSEC 20000 #define NET_ADMIN_IRC_TERMINATE_TIMEOUT_MSEC 4000 @@ -233,8 +231,6 @@ private: u_int32_t m_curSessionId; mutable boost::mutex m_curUniquePlayerIdMutex; - boost::shared_ptr m_serverLog; - ServerStats m_statData; bool m_statDataChanged; mutable boost::mutex m_statMutex;