New admin function to remove a complete game by any player name within that game (#115).

This commit is contained in:
lotodore
2012-02-13 20:28:55 +00:00
parent 17960e1415
commit 81ee27de70
3 changed files with 28 additions and 0 deletions
+17
View File
@@ -509,6 +509,23 @@ ServerLobbyThread::KickPlayerByName(const std::string &playerName)
return retVal;
}
bool
ServerLobbyThread::RemoveGameByPlayerName(const std::string &playerName)
{
bool retVal = false;
boost::shared_ptr<SessionData> session = m_gameSessionManager.GetSessionByPlayerName(playerName);
if (session) {
boost::shared_ptr<ServerGame> game = session->GetGame();
if (game) {
m_ioService->post(boost::bind(&ServerLobbyThread::InternalRemoveGame, shared_from_this(), game));
retVal = true;
}
}
return retVal;
}
string
ServerLobbyThread::GetPlayerIPAddress(const std::string &playerName) const
{