Add logging when an admin change a setting

This commit is contained in:
Beu
2025-06-22 10:41:45 +02:00
parent 7a8d9f2b0b
commit f15fc201d2
5 changed files with 8 additions and 1 deletions

View File

@ -10,6 +10,7 @@ use ManiaControl\Admin\AuthenticationManager;
use ManiaControl\Callbacks\CallbackListener;
use ManiaControl\Callbacks\TimerListener;
use ManiaControl\Configurator\ConfiguratorMenu;
use ManiaControl\Logger;
use ManiaControl\ManiaControl;
use ManiaControl\Players\Player;
use Maniaplanet\DedicatedServer\Structures\VoteRatio;
@ -166,6 +167,7 @@ class VoteRatiosMenu implements CallbackListener, ConfiguratorMenu, TimerListene
$success = $this->maniaControl->getClient()->setCallVoteRatios($newVoteRatios);
if ($success) {
$this->maniaControl->getChat()->sendSuccess('Vote Ratios saved!', $player);
Logger::log(AuthenticationManager::getAuthLevelName($player->authLevel) .' "'. $player->nickname . '" ('. $player->login .') changed the Vote Ratios');
} else {
$this->maniaControl->getChat()->sendError('Vote Ratios saving failed!', $player);
}