diff --git a/src/pocketmine/CrashDump.php b/src/pocketmine/CrashDump.php index e27e03089f..30eebff0a2 100644 --- a/src/pocketmine/CrashDump.php +++ b/src/pocketmine/CrashDump.php @@ -43,7 +43,7 @@ class CrashDump{ $this->path = $this->server->getDataPath() . "CrashDump_" . date("D_M_j-H.i.s-T_Y", $this->time) . ".log"; $this->fp = fopen($this->path, "wb"); $this->data["time"] = $this->time; - $this->addLine("PocketMine-MP Crash Dump " . date("D M j H:i:s T Y", $this->time)); + $this->addLine($this->server->getName() . " Crash Dump " . date("D M j H:i:s T Y", $this->time)); $this->addLine(); $this->baseCrash(); $this->generalData(); diff --git a/src/pocketmine/Server.php b/src/pocketmine/Server.php index 9dd32ab253..939e1b5d9d 100644 --- a/src/pocketmine/Server.php +++ b/src/pocketmine/Server.php @@ -1467,7 +1467,7 @@ class Server{ $value = array("M" => 1, "G" => 1024); $real = ((int) substr($memory, 0, -1)) * $value[substr($memory, -1)]; if($real < 128){ - $this->logger->warning("PocketMine-MP may not work right with less than 128MB of RAM", true, true, 0); + $this->logger->warning($this->getName() . " may not work right with less than 128MB of RAM", true, true, 0); } @ini_set("memory_limit", $memory); }else{ @@ -1490,7 +1490,7 @@ class Server{ Level::$COMPRESSION_LEVEL = $this->getProperty("chunk-sending.compression-level", 7); if(defined("pocketmine\\DEBUG") and \pocketmine\DEBUG >= 0 and function_exists("cli_set_process_title")){ - @cli_set_process_title("PocketMine-MP " . $this->getPocketMineVersion()); + @cli_set_process_title($this->getName() . " " . $this->getPocketMineVersion()); } $this->logger->info("Starting Minecraft PE server on " . ($this->getIp() === "" ? "*" : $this->getIp()) . ":" . $this->getPort()); @@ -1499,8 +1499,8 @@ class Server{ $this->addInterface($this->mainInterface = new RakLibInterface($this)); - $this->logger->info("This server is running PocketMine-MP version " . ($version->isDev() ? TextFormat::YELLOW : "") . $version->get(false) . TextFormat::RESET . " \"" . $this->getCodename() . "\" (API " . $this->getApiVersion() . ")", true, true, 0); - $this->logger->info("PocketMine-MP is distributed under the LGPL License", true, true, 0); + $this->logger->info("This server is running " . $this->getName() . " version " . ($version->isDev() ? TextFormat::YELLOW : "") . $version->get(false) . TextFormat::RESET . " \"" . $this->getCodename() . "\" (API " . $this->getApiVersion() . ")", true, true, 0); + $this->logger->info($this->getName() . " is distributed under the LGPL License", true, true, 0); $this->consoleSender = new ConsoleCommandSender(); $this->commandMap = new SimpleCommandMap($this); @@ -1728,7 +1728,7 @@ class Server{ $value = array("M" => 1, "G" => 1024); $real = ((int) substr($memory, 0, -1)) * $value[substr($memory, -1)]; if($real < 256){ - $this->logger->warning("PocketMine-MP may not work right with less than 256MB of RAM", true, true, 0); + $this->logger->warning($this->getName() . " may not work right with less than 256MB of RAM", true, true, 0); } @ini_set("memory_limit", $memory); }else{ @@ -1893,7 +1893,7 @@ class Server{ $reply = Utils::postURL("http://" . $this->getProperty("auto-report.host", "crash.pocketmine.net") . "/submit/api", [ "report" => "yes", - "name" => "PocketMine-MP " . $this->getPocketMineVersion(), + "name" => $this->getName() . " " . $this->getPocketMineVersion(), "email" => "crash@pocketmine.net", "reportPaste" => base64_encode($dump->getEncodedData()) ]); @@ -2029,7 +2029,7 @@ class Server{ private function titleTick(){ if(defined("pocketmine\\DEBUG") and \pocketmine\DEBUG >= 0 and \pocketmine\ANSI === true){ - echo "\x1b]0;PocketMine-MP " . $this->getPocketMineVersion() . " | Online " . count($this->players) . "/" . $this->getMaxPlayers() . " | RAM " . round((memory_get_usage() / 1024) / 1024, 2) . "/" . round((memory_get_usage(true) / 1024) / 1024, 2) . " MB | U " . round($this->mainInterface->getUploadUsage() / 1024, 2) . " D " . round($this->mainInterface->getDownloadUsage() / 1024, 2) . " kB/s | TPS " . $this->getTicksPerSecond() . "\x07"; + echo "\x1b]0;". $this->getName() . " " . $this->getPocketMineVersion() . " | Online " . count($this->players) . "/" . $this->getMaxPlayers() . " | RAM " . round((memory_get_usage() / 1024) / 1024, 2) . "/" . round((memory_get_usage(true) / 1024) / 1024, 2) . " MB | U " . round($this->mainInterface->getUploadUsage() / 1024, 2) . " D " . round($this->mainInterface->getDownloadUsage() / 1024, 2) . " kB/s | TPS " . $this->getTicksPerSecond() . "\x07"; } } diff --git a/src/pocketmine/command/defaults/TimingsCommand.php b/src/pocketmine/command/defaults/TimingsCommand.php index 8d7cc5a948..df37932eb0 100644 --- a/src/pocketmine/command/defaults/TimingsCommand.php +++ b/src/pocketmine/command/defaults/TimingsCommand.php @@ -94,7 +94,7 @@ class TimingsCommand extends VanillaCommand{ fseek($fileTimings, 0); $data = [ "public" => false, - "description" => "PocketMine-MP Timings", + "description" => $this->getName() . " Timings", "files" => [ "timings.txt" => [ "content" => stream_get_contents($fileTimings) @@ -111,7 +111,7 @@ class TimingsCommand extends VanillaCommand{ curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data, JSON_UNESCAPED_SLASHES)); curl_setopt($ch, CURLOPT_AUTOREFERER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); - curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json", "User-Agent: PocketMine-MP " . $sender->getServer()->getPocketMineVersion()]); + curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json", "User-Agent: " . $this->getName() . " " . $sender->getServer()->getPocketMineVersion()]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $ret = curl_exec($ch); $data = json_decode($ret); diff --git a/src/pocketmine/command/defaults/VersionCommand.php b/src/pocketmine/command/defaults/VersionCommand.php index 9103d918ae..9911a91881 100644 --- a/src/pocketmine/command/defaults/VersionCommand.php +++ b/src/pocketmine/command/defaults/VersionCommand.php @@ -44,7 +44,7 @@ class VersionCommand extends VanillaCommand{ } if(count($args) === 0){ - $output = "This server is running PocketMine-MP version " . $sender->getServer()->getPocketMineVersion() . " 「" . $sender->getServer()->getCodename() . "」 (Implementing API version " . $sender->getServer()->getApiVersion() . " for Minecraft: PE " . $sender->getServer()->getVersion() . " protocol version " . Info::CURRENT_PROTOCOL . ")"; + $output = "This server is running ". $this->getName() . " version " . $sender->getServer()->getPocketMineVersion() . " 「" . $sender->getServer()->getCodename() . "」 (Implementing API version " . $sender->getServer()->getApiVersion() . " for Minecraft: PE " . $sender->getServer()->getVersion() . " protocol version " . Info::CURRENT_PROTOCOL . ")"; if(\pocketmine\GIT_COMMIT !== str_repeat("00", 20)){ $output .= " [git " . \pocketmine\GIT_COMMIT . "]"; } diff --git a/src/pocketmine/event/TimingsHandler.php b/src/pocketmine/event/TimingsHandler.php index 7bb4c3ab6f..fe047c2a06 100644 --- a/src/pocketmine/event/TimingsHandler.php +++ b/src/pocketmine/event/TimingsHandler.php @@ -71,7 +71,7 @@ class TimingsHandler{ } fwrite($fp, "# Version " . Server::getInstance()->getVersion() . PHP_EOL); - fwrite($fp, "# PocketMine-MP " . Server::getInstance()->getPocketMineVersion() . PHP_EOL); + fwrite($fp, "# ". Server::getInstance()->getName() . " " . Server::getInstance()->getPocketMineVersion() . PHP_EOL); $entities = 0; $livingEntities = 0; diff --git a/src/pocketmine/network/query/QueryHandler.php b/src/pocketmine/network/query/QueryHandler.php index 2c5a312a09..3c245e58a3 100644 --- a/src/pocketmine/network/query/QueryHandler.php +++ b/src/pocketmine/network/query/QueryHandler.php @@ -58,7 +58,7 @@ class QueryHandler{ public function regenerateInfo(){ $str = ""; - $plist = "PocketMine-MP " . $this->server->getPocketMineVersion(); + $plist = $this->server->getName() . " " . $this->server->getPocketMineVersion(); $pl = $this->server->getPluginManager()->getPlugins(); if(count($pl) > 0 and $this->server->getProperty("settings.query-plugins", true) === true){ $plist .= ":";