Implement chat bot mute on server side (#1).
This commit is contained in:
@@ -102,6 +102,17 @@ ServerGame::RemovePlayer(unsigned playerId, unsigned errorCode)
|
||||
SessionError(tmpSession, errorCode);
|
||||
}
|
||||
|
||||
void
|
||||
ServerGame::MutePlayer(unsigned playerId, bool mute)
|
||||
{
|
||||
if (m_game) {
|
||||
boost::shared_ptr<PlayerInterface> tmpPlayer(m_game->getPlayerByUniqueId(playerId));
|
||||
if (tmpPlayer) {
|
||||
tmpPlayer->setIsMuted(mute);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ServerGame::MarkPlayerAsInactive(unsigned playerId)
|
||||
{
|
||||
@@ -612,6 +623,16 @@ ServerGame::GetPlayerInterfaceFromGame(const std::string &playerName)
|
||||
return tmpPlayer;
|
||||
}
|
||||
|
||||
boost::shared_ptr<PlayerInterface>
|
||||
ServerGame::GetPlayerInterfaceFromGame(unsigned playerId)
|
||||
{
|
||||
boost::shared_ptr<PlayerInterface> tmpPlayer;
|
||||
if (m_game) {
|
||||
tmpPlayer = m_game->getPlayerByUniqueId(playerId);
|
||||
}
|
||||
return tmpPlayer;
|
||||
}
|
||||
|
||||
bool
|
||||
ServerGame::IsRunning() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user