adjusted logging calls to new parameter order and count
This commit is contained in:
parent
68c9c4e555
commit
98b5f132dc
@ -390,7 +390,7 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener {
|
||||
|
||||
$chatMessage .= '!';
|
||||
$this->maniaControl->getChat()->sendInformation($chatMessage);
|
||||
Logger::logInfo($chatMessage, true, true, true);
|
||||
Logger::logInfo($chatMessage, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -181,7 +181,7 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener {
|
||||
* @see Logger::log()
|
||||
*/
|
||||
public function log($message, $stripCodes = false) {
|
||||
Logger::log($message, true, true, $stripCodes);
|
||||
Logger::log($message, $stripCodes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -400,7 +400,7 @@ class DirectoryBrowser implements ManialinkPageAnswerListener {
|
||||
// Message
|
||||
$message = $player->getEscapedNickname() . ' added ' . $map->getEscapedName() . '!';
|
||||
$this->maniaControl->getChat()->sendSuccess($message);
|
||||
Logger::logInfo($message, true, true, true);
|
||||
Logger::logInfo($message, true);
|
||||
|
||||
// Queue requested Map
|
||||
$this->maniaControl->getMapManager()->getMapQueue()->addMapToMapQueue($player, $map);
|
||||
|
@ -222,7 +222,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
||||
|
||||
$message = $player->getEscapedNickname() . ' skipped the current Map!';
|
||||
$this->maniaControl->getChat()->sendSuccess($message);
|
||||
Logger::logInfo($message, true, true, true);
|
||||
Logger::logInfo($message, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -238,7 +238,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
||||
}
|
||||
$message = $player->getEscapedNickname() . ' restarted the current Map!';
|
||||
$this->maniaControl->getChat()->sendSuccess($message);
|
||||
Logger::logInfo($message, true, true, true);
|
||||
Logger::logInfo($message, true);
|
||||
|
||||
try {
|
||||
$this->maniaControl->getClient()->restartMap();
|
||||
@ -260,7 +260,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
||||
}
|
||||
$message = $player->getEscapedNickname() . ' replays the current Map!';
|
||||
$this->maniaControl->getChat()->sendSuccess($message);
|
||||
Logger::logInfo($message, true, true, true);
|
||||
Logger::logInfo($message, true);
|
||||
|
||||
$this->maniaControl->getMapManager()->getMapQueue()->addFirstMapToMapQueue($player, $this->maniaControl->getMapManager()->getCurrentMap());
|
||||
}
|
||||
@ -294,7 +294,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
||||
|
||||
$message = 'Maplist $<$fff' . $maplist . '$> written.';
|
||||
$this->maniaControl->getChat()->sendSuccess($message, $player);
|
||||
Logger::logInfo($message, true, true, true);
|
||||
Logger::logInfo($message, true);
|
||||
} catch (FaultException $e) {
|
||||
$this->maniaControl->getChat()->sendError('Cannot write maplist $<$fff' . $maplist . '$>!', $player);
|
||||
}
|
||||
@ -330,7 +330,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
||||
$message = 'Maplist $<$fff' . $maplist . '$> loaded.';
|
||||
$this->maniaControl->getMapManager()->restructureMapList();
|
||||
$this->maniaControl->getChat()->sendSuccess($message, $player);
|
||||
Logger::logInfo($message, true, true, true);
|
||||
Logger::logInfo($message, true);
|
||||
} catch (FaultException $e) {
|
||||
$this->maniaControl->getChat()->sendError('Cannot load maplist $<$fff' . $maplist . '$>!', $player);
|
||||
}
|
||||
|
@ -655,7 +655,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
||||
|
||||
$message = $player->getEscapedNickname() . ' skipped to Map $z' . $map->getEscapedName() . '!';
|
||||
$this->maniaControl->getChat()->sendSuccess($message);
|
||||
Logger::logInfo($message, true, true, true);
|
||||
Logger::logInfo($message, true);
|
||||
|
||||
$this->playerCloseWidget($player);
|
||||
break;
|
||||
|
@ -316,7 +316,7 @@ class MapManager implements CallbackListener {
|
||||
$action = ($eraseFile ? 'erased' : 'removed');
|
||||
$message = $admin->getEscapedNickname() . ' ' . $action . ' ' . $map->getEscapedName() . '!';
|
||||
$this->maniaControl->getChat()->sendSuccess($message);
|
||||
Logger::logInfo($message, true, true, true);
|
||||
Logger::logInfo($message, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -446,13 +446,13 @@ class MapManager implements CallbackListener {
|
||||
// Message
|
||||
$message = $player->getEscapedNickname() . ' added $<' . $mapInfo->name . '$>!';
|
||||
$this->maniaControl->getChat()->sendSuccess($message);
|
||||
Logger::logInfo($message, true, true, true);
|
||||
Logger::logInfo($message, true);
|
||||
// Queue requested Map
|
||||
$this->maniaControl->getMapManager()->getMapQueue()->addMapToMapQueue($login, $mapInfo->uid);
|
||||
} else {
|
||||
$message = $player->getEscapedNickname() . ' updated $<' . $mapInfo->name . '$>!';
|
||||
$this->maniaControl->getChat()->sendSuccess($message);
|
||||
Logger::logInfo($message, true, true, true);
|
||||
Logger::logInfo($message, true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -603,7 +603,7 @@ class MapManager implements CallbackListener {
|
||||
if ($admin) {
|
||||
$message = $admin->getEscapedNickname() . ' shuffled the Maplist!';
|
||||
$this->maniaControl->getChat()->sendSuccess($message);
|
||||
Logger::logInfo($message, true, true, true);
|
||||
Logger::logInfo($message, true);
|
||||
}
|
||||
|
||||
// Restructure if needed
|
||||
|
@ -125,7 +125,7 @@ class MapQueue implements CallbackListener, CommandListener {
|
||||
|
||||
$message = '$fa0' . $title . ' $<$fff' . $admin->nickname . '$> cleared the Map-Queue!';
|
||||
$this->maniaControl->getChat()->sendInformation($message);
|
||||
Logger::logInfo($message, true, true, true);
|
||||
Logger::logInfo($message, true);
|
||||
|
||||
// Trigger callback
|
||||
$this->maniaControl->getCallbackManager()->triggerCallback(self::CB_MAPQUEUE_CHANGED, array('clear'));
|
||||
|
@ -118,7 +118,7 @@ class PlayerActions {
|
||||
return;
|
||||
}
|
||||
$this->maniaControl->getChat()->sendInformation($chatMessage);
|
||||
Logger::logInfo($chatMessage, true, true, true);
|
||||
Logger::logInfo($chatMessage, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -197,7 +197,7 @@ class PlayerActions {
|
||||
$title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel);
|
||||
$chatMessage = $title . ' ' . $admin->getEscapedNickname(). ' forced ' . $target->getEscapedNickname(). ' to Spectator!';
|
||||
$this->maniaControl->getChat()->sendInformation($chatMessage);
|
||||
Logger::logInfo($chatMessage, true, true, true);
|
||||
Logger::logInfo($chatMessage, true);
|
||||
|
||||
if ($releaseSlot) {
|
||||
// Free player slot
|
||||
@ -238,7 +238,7 @@ class PlayerActions {
|
||||
$title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel);
|
||||
$chatMessage = $title . ' ' . $admin->getEscapedNickname() . ' un-muted ' . $target->getEscapedNickname(). '!';
|
||||
$this->maniaControl->getChat()->sendInformation($chatMessage);
|
||||
Logger::logInfo($chatMessage, true, true, true);
|
||||
Logger::logInfo($chatMessage, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -270,7 +270,7 @@ class PlayerActions {
|
||||
$title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel);
|
||||
$chatMessage = $title . ' ' . $admin->getEscapedNickname(). ' muted ' . $target->getEscapedNickname(). '!';
|
||||
$this->maniaControl->getChat()->sendInformation($chatMessage);
|
||||
Logger::logInfo($chatMessage, true, true, true);
|
||||
Logger::logInfo($chatMessage, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -352,7 +352,7 @@ class PlayerActions {
|
||||
$title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel);
|
||||
$chatMessage = $title . ' ' . $admin->getEscapedNickname(). ' warned ' . $target->getEscapedNickname(). '!';
|
||||
$this->maniaControl->getChat()->sendInformation($chatMessage);
|
||||
Logger::log($chatMessage, true, true);
|
||||
Logger::log($chatMessage, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -388,7 +388,7 @@ class PlayerActions {
|
||||
$title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel);
|
||||
$chatMessage = $title . ' ' . $admin->getEscapedNickname() . ' kicked ' . $target->getEscapedNickname() . '!';
|
||||
$this->maniaControl->getChat()->sendInformation($chatMessage);
|
||||
Logger::logInfo($chatMessage, true, true, true);
|
||||
Logger::logInfo($chatMessage, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -420,7 +420,7 @@ class PlayerActions {
|
||||
$title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel);
|
||||
$chatMessage = $title . ' ' . $admin->getEscapedNickname(). ' banned ' . $target->getEscapedNickname(). '!';
|
||||
$this->maniaControl->getChat()->sendInformation($chatMessage);
|
||||
Logger::logInfo($chatMessage, true, true, true);
|
||||
Logger::logInfo($chatMessage, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -458,7 +458,7 @@ class PlayerActions {
|
||||
$title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel);
|
||||
$chatMessage = $title . ' ' . $admin->getEscapedNickname(). ' added ' . $target->getEscapedNickname(). ' as $< ' . $authLevelName . '$>!';
|
||||
$this->maniaControl->getChat()->sendInformation($chatMessage);
|
||||
Logger::logInfo($chatMessage, true, true, true);
|
||||
Logger::logInfo($chatMessage, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -495,7 +495,7 @@ class PlayerActions {
|
||||
$title = $this->maniaControl->getAuthenticationManager()->getAuthLevelName($admin->authLevel);
|
||||
$chatMessage = $title . ' ' . $admin->getEscapedNickname(). ' revoked the Rights of ' . $target->getEscapedNickname(). '!';
|
||||
$this->maniaControl->getChat()->sendInformation($chatMessage);
|
||||
Logger::logInfo($chatMessage, true, true, true);
|
||||
Logger::logInfo($chatMessage, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -319,7 +319,7 @@ class PlayerManager implements CallbackListener, TimerListener {
|
||||
|
||||
$played = Formatter::formatTimeH(time() - $player->joinTime);
|
||||
$logMessage = "Player left: {$player->login} / {$player->nickname} Playtime: {$played}";
|
||||
Logger::logInfo($logMessage, true, true, true);
|
||||
Logger::logInfo($logMessage, true);
|
||||
|
||||
if ($this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_JOIN_LEAVE_MESSAGES)) {
|
||||
$this->maniaControl->getChat()->sendChat('$0f0$<$fff' . $player->nickname . '$> has left the game');
|
||||
@ -417,7 +417,7 @@ class PlayerManager implements CallbackListener, TimerListener {
|
||||
}
|
||||
|
||||
$logMessage = "Player joined: {$player->login} / {$player->nickname} Nation: " . $player->getCountry() . " IP: {$player->ipAddress}";
|
||||
Logger::logInfo($logMessage, true, true, true);
|
||||
Logger::logInfo($logMessage, true);
|
||||
|
||||
// Increment the Player Join Count
|
||||
$this->maniaControl->getStatisticManager()->incrementStat(self::STAT_JOIN_COUNT, $player, $this->maniaControl->getServer()->index);
|
||||
|
@ -367,7 +367,7 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
|
||||
$activated = $this->maniaControl->getPluginManager()->activatePlugin($pluginClass, $player->login);
|
||||
if ($activated) {
|
||||
$this->maniaControl->getChat()->sendSuccess($pluginClass::getName() . ' activated!', $player);
|
||||
Logger::logInfo("{$player->login} activated '{$pluginClass}'!", true, true, true);
|
||||
Logger::logInfo("{$player->login} activated '{$pluginClass}'!", true);
|
||||
} else {
|
||||
$this->maniaControl->getChat()->sendError('Error activating ' . $pluginClass::getName() . '!', $player);
|
||||
}
|
||||
@ -377,7 +377,7 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
|
||||
$deactivated = $this->maniaControl->getPluginManager()->deactivatePlugin($pluginClass);
|
||||
if ($deactivated) {
|
||||
$this->maniaControl->getChat()->sendSuccess($pluginClass::getName() . ' deactivated!', $player);
|
||||
Logger::logInfo("{$player->login} deactivated '{$pluginClass}'!", true, true, true);
|
||||
Logger::logInfo("{$player->login} deactivated '{$pluginClass}'!", true);
|
||||
} else {
|
||||
$this->maniaControl->getChat()->sendError('Error deactivating ' . $pluginClass::getName() . '!', $player);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user