code refactoring

- improved comparing & checking
- improved string composition
This commit is contained in:
Steffen Schröder
2014-06-14 14:32:29 +02:00
parent bd6e0b5151
commit 9985b814d2
41 changed files with 337 additions and 318 deletions

View File

@ -111,7 +111,7 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage
}
$pauseExists = false;
foreach ($scriptInfos->commandDescs as $param) {
if ($param->name == "Command_ForceWarmUp") {
if ($param->name === 'Command_ForceWarmUp') {
$pauseExists = true;
break;
}
@ -269,7 +269,7 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage
$params = explode(' ', $chat[1][2]);
if (count($params) >= 2) {
$param = $params[1];
if ($param == 'empty') {
if (strtolower($param) === 'empty') {
$this->serverShutdownEmpty = !$this->serverShutdownEmpty;
if ($this->serverShutdownEmpty) {
$this->maniaControl->chat->sendInformation("The server will shutdown as soon as it's empty!", $player->login);