From 2b24dab57b8dc9610dac4fe37255f5f271f39ee0 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 4 Sep 2013 13:29:05 +0200 Subject: [PATCH] Modified startup messages --- src/API/ServerAPI.php | 9 ++++++--- src/PocketMinecraftServer.php | 7 ++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/API/ServerAPI.php b/src/API/ServerAPI.php index 12381ba7a..e7c894514 100644 --- a/src/API/ServerAPI.php +++ b/src/API/ServerAPI.php @@ -47,8 +47,9 @@ class ServerAPI{ @mkdir(DATA_PATH."players/", 0755); @mkdir(DATA_PATH."worlds/", 0755); @mkdir(DATA_PATH."plugins/", 0755); - console("[INFO] \x1b[33;1mPocketMine-MP ".MAJOR_VERSION." API #".CURRENT_API_VERSION.", LGPL License", true, true, 0); - + $version = new VersionString(); + console("[INFO] Starting Minecraft PE server version \x1b[36;1m".CURRENT_MINECRAFT_VERSION); + console("[INFO] Loading properties..."); $this->config = new Config(DATA_PATH . "server.properties", CONFIG_PROPERTIES, array( "server-name" => "Minecraft: PE Server", @@ -91,7 +92,9 @@ class ServerAPI{ $this->server = new PocketMinecraftServer($this->getProperty("server-name"), $this->getProperty("gamemode"), ($seed = $this->getProperty("level-seed")) != "" ? (int) $seed:false, $this->getProperty("server-port"), ($ip = $this->getProperty("server-ip")) != "" ? $ip:"0.0.0.0"); $this->server->api = $this; self::$serverRequest = $this->server; - + console("[INFO] This server is running PocketMine-MP version ".($version->isDev() ? "\x1b[31;1m":"").MAJOR_VERSION."\x1b[0m (MCPE: ".CURRENT_MINECRAFT_VERSION.") (API ".CURRENT_API_VERSION.")", true, true, 0); + console("[INFO] PocketMine-MP is distibuted under the LGPL License", true, true, 0); + if($this->getProperty("upnp-forwarding") === true){ console("[INFO] [UPnP] Trying to port forward..."); UPnP_PortForward($this->getProperty("server-port")); diff --git a/src/PocketMinecraftServer.php b/src/PocketMinecraftServer.php index 994e2f653..f7a430823 100644 --- a/src/PocketMinecraftServer.php +++ b/src/PocketMinecraftServer.php @@ -29,10 +29,7 @@ class PocketMinecraftServer{ if(defined("DEBUG") and DEBUG >= 0){ @cli_set_process_title("PocketMine-MP ".MAJOR_VERSION); } - if($this->version->isDev()){ - console("[INFO] \x1b[31;1mThis is a Development version"); - } - console("[INFO] Starting server for Minecraft: PE \x1b[36;1m".CURRENT_MINECRAFT_VERSION."\x1b[0m #".CURRENT_PROTOCOL." at ".$this->serverip.":".$this->port); + console("[INFO] Starting Minecraft PE server on ".($this->serverip === "0.0.0.0" ? "*":$this->serverip).":".$this->port); define("BOOTUP_RANDOM", Utils::getRandomBytes(16)); $this->serverID = $this->serverID === false ? Utils::readLong(Utils::getRandomBytes(8, false)):$this->serverID; $this->seed = $this->seed === false ? Utils::readInt(Utils::getRandomBytes(4, false)):$this->seed; @@ -354,7 +351,7 @@ class PocketMinecraftServer{ public function init(){ register_tick_function(array($this, "tick")); - console("[INFO] Starting internal ticker calculation"); + console("[DEBUG] Starting internal ticker calculation", true, true, 2); $t = 0; while(true){ switch($t){