First steps to actually store game statistics.

This commit is contained in:
lotodore
2009-10-03 18:06:56 +00:00
parent 9ccd1bc9f2
commit a2a27cbdb0
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -569,6 +569,13 @@ ServerLobbyThread::GetIOService()
return *m_ioService; return *m_ioService;
} }
ServerDBInterface &
ServerLobbyThread::GetDatabase()
{
assert(m_database);
return *m_database;
}
ServerBanManager & ServerBanManager &
ServerLobbyThread::GetBanManager() ServerLobbyThread::GetBanManager()
{ {
@@ -1127,6 +1134,8 @@ ServerLobbyThread::HandleNetPacketCreateGame(SessionWrapper session, const std::
GetGui(), GetGui(),
m_playerConfig)); m_playerConfig));
game->Init(); game->Init();
m_database->AsyncCreateGame(game->GetId(), game->GetName());
// Add game to list of games. // Add game to list of games.
InternalAddGame(game); InternalAddGame(game);
+1
View File
@@ -100,6 +100,7 @@ public:
SenderHelper &GetSender(); SenderHelper &GetSender();
boost::asio::io_service &GetIOService(); boost::asio::io_service &GetIOService();
ServerDBInterface &GetDatabase();
ServerBanManager &GetBanManager(); ServerBanManager &GetBanManager();
protected: protected: