Compare commits

..

2 Commits

Author SHA1 Message Date
beu
9ee0668509 enclose value to prevent coloring by the map name 2025-07-25 09:02:43 +02:00
beu
291a3ecc05 fix commands check 2025-07-14 10:32:11 +02:00
2 changed files with 4 additions and 4 deletions

View File

@@ -469,7 +469,7 @@ class DirectoryBrowser implements ManialinkPageAnswerListener {
$message = ''; $message = '';
$infos = $this->maniaControl->getClient()->getMapInfo($relativeFilePath); $infos = $this->maniaControl->getClient()->getMapInfo($relativeFilePath);
foreach ($infos as $key => $value) { foreach ($infos as $key => $value) {
$message .= '$<$0c0' . $key .':$> '. $value . PHP_EOL; $message .= '$<$0c0' . $key .':$> $<'. $value .'$>'. PHP_EOL;
} }
$this->maniaControl->getChat()->sendChat($message, $player->login, false); $this->maniaControl->getChat()->sendChat($message, $player->login, false);
} catch (\Throwable $th) { } catch (\Throwable $th) {

View File

@@ -192,7 +192,7 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer
$extension = 10; $extension = 10;
$params = explode(' ', $chat[1][2]); $params = explode(' ', trim($callback[1][2]));
if (count($params) >= 2) { if (count($params) >= 2) {
$extension = $params[1]; $extension = $params[1];
} }
@@ -331,7 +331,7 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer
return; return;
} }
// Check for delayed shutdown // Check for delayed shutdown
$params = explode(' ', $chat[1][2]); $params = explode(' ', trim($chat[1][2]));
if (count($params) < 2) { if (count($params) < 2) {
$this->shutdownServer($player->login); $this->shutdownServer($player->login);
return; return;
@@ -378,7 +378,7 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer
return; return;
} }
$params = explode(' ', $chat[1][2], 2); $params = explode(' ', trim($chat[1][2]), 2);
if (count($params) < 2) { if (count($params) < 2) {
$message = $this->maniaControl->getChat()->formatMessage( $message = $this->maniaControl->getChat()->formatMessage(
'Usage example: %s', 'Usage example: %s',