added isMuted() function to the player object + some adds what a player cant do when muted (use chatmessages like /gg, add map to queue, start a vote...)

This commit is contained in:
kremsy
2014-08-24 12:28:16 +02:00
parent afa15217a2
commit ffa3506879
7 changed files with 307 additions and 263 deletions

View File

@ -317,7 +317,7 @@ class Player {
}
/**
* Sets the Player Data
* Sets the Player Data and stores it in the Database
*
* @param mixed $object
* @param string $dataName
@ -329,6 +329,21 @@ class Player {
return $this->maniaControl->getPlayerManager()->getPlayerDataManager()->setPlayerData($object, $dataName, $this, $value, $serverIndex);
}
/*
* Check if a Player is muted
*
* @return bool
*/
public function isMuted() {
$ignoreList = $this->maniaControl->getClient()->getIgnoreList(100, 0);
foreach ($ignoreList as $ignoredPlayers) {
if ($ignoredPlayers->login === $this->login) {
return true;
}
}
return false;
}
/**
* Var_Dump the Player
*/