Adding server irc management request to show the ip address of a user (in order to ban the user from the server).

This commit is contained in:
lotodore
2009-04-10 21:54:59 +00:00
parent dee2c6a0e5
commit f8b1123cc5
3 changed files with 34 additions and 5 deletions
+14
View File
@@ -301,6 +301,20 @@ ServerLobbyThread::ClearBanPlayerList()
m_banPlayerNameMap.clear();
}
string
ServerLobbyThread::GetPlayerIPAddress(const std::string &playerName) const
{
string ipAddress;
SessionWrapper session = m_sessionManager.GetSessionByPlayerName(playerName);
if (!session.sessionData.get())
session = m_gameSessionManager.GetSessionByPlayerName(playerName);
if (session.sessionData.get() && session.playerData.get())
ipAddress = session.sessionData->GetClientAddr();
return ipAddress;
}
void
ServerLobbyThread::RemovePlayer(unsigned playerId, unsigned errorCode)
{