diff --git a/src/API/PlayerAPI.php b/src/API/PlayerAPI.php index 009f3892f..eb78f971c 100644 --- a/src/API/PlayerAPI.php +++ b/src/API/PlayerAPI.php @@ -32,7 +32,7 @@ class PlayerAPI{ $this->server->api->console->register("kill", "", array($this, "commandHandler")); $this->server->api->console->register("gamemode", " [player]", array($this, "commandHandler")); $this->server->api->console->register("tp", "[target player] OR /tp [target player] ", array($this, "commandHandler")); - $this->server->api->console->register("setspawn", "[player] [x] [y] [z]", array($this, "commandHandler")); + $this->server->api->console->register("spawnpoint", "[player] [x] [y] [z]", array($this, "commandHandler")); $this->server->api->console->register("spawn", "", array($this, "commandHandler")); $this->server->api->console->register("ping", "", array($this, "commandHandler")); $this->server->api->console->alias("lag", "ping"); @@ -118,7 +118,7 @@ class PlayerAPI{ public function commandHandler($cmd, $params, $issuer, $alias){ $output = ""; switch($cmd){ - case "setspawn": + case "spawnpoint": if(!($issuer instanceof Player)){ $output .= "Please run this command in-game.\n"; break; @@ -497,4 +497,4 @@ class PlayerAPI{ $this->server->handle("player.offline.save", $data); $data->save(); } -} \ No newline at end of file +} diff --git a/src/build/compile.sh b/src/build/compile.sh index e521f03f9..885898db7 100755 --- a/src/build/compile.sh +++ b/src/build/compile.sh @@ -1,7 +1,7 @@ #!/bin/bash -COMPILER_VERSION="0.15" +COMPILER_VERSION="0.16" -PHP_VERSION="5.5.8" +PHP_VERSION="5.5.9" ZEND_VM="GOTO" LIBEDIT_VERSION="0.3" diff --git a/src/build/installer.sh b/src/build/installer.sh index d56550b59..67812bbc8 100644 --- a/src/build/installer.sh +++ b/src/build/installer.sh @@ -1,8 +1,9 @@ #!/bin/bash PMMP_VERSION="" -MAC_BUILD="PHP_5.5.8_x86_MacOS" -RPI_BUILD="PHP_5.5.8_ARM_Raspbian_hard" -AND_BUILD="PHP_5.5.8_ARMv7_Android" +MAC_BUILD="PHP_5.5.9_x86_MacOS" +RPI_BUILD="PHP_5.5.9_ARM_Raspbian_hard" +AND_BUILD="PHP_5.5.9_ARMv7_Android" +IOS_BUILD="PHP_5.5.9_ARMv6_iOS" update=off #Needed to use aliases @@ -70,8 +71,20 @@ else echo -n "[3/3] Obtaining PHP:" echo " detecting if build is available..." if [ "$(uname -s)" == "Darwin" ]; then - if ["$(uname -s)" == iPhone*] || ["$(uname -s)" == iPod*] || ["$(uname -s)" == iPad*]; then - echo -n "[3/3] No binaries for iOS available" + set +e + UNAME_M=$(uname -m) + IS_IOS=$(expr match $UNAME_M 'iP[a-zA-Z0-9,]*') + set -e + if [ $IS_IOS -gt 0 ]; then + rm -r -f bin/ >> /dev/null 2>&1 + echo -n "[3/3] iOS PHP build available, downloading $IOS_BUILD.tar.gz..." + download_file "http://sourceforge.net/projects/pocketmine/files/builds/$IOS_BUILD.tar.gz" | tar -zx > /dev/null 2>&1 + chmod +x ./bin/php5/bin/* + echo -n " regenerating php.ini..." + echo "date.timezone=$TIMEZONE" >> "./bin/php5/lib/php.ini" + echo "short_open_tag=0" >> "./bin/php5/lib/php.ini" + echo "asp_tags=0" >> "./bin/php5/lib/php.ini" + echo " done" else rm -r -f bin/ >> /dev/null 2>&1 echo -n "[3/3] Mac OSX PHP build available, downloading $MAC_BUILD.tar.gz..." @@ -99,7 +112,7 @@ else if [ $? -eq 0 ]; then set -e rm -r -f bin/ >> /dev/null 2>&1 - echo -n "[3/3] Raspberry Pi build available, downloading $RPI_BUILD.tar.gz..." + echo -n "[3/3] Raspberry Pi PHP build available, downloading $RPI_BUILD.tar.gz..." download_file "http://sourceforge.net/projects/pocketmine/files/builds/$RPI_BUILD.tar.gz" | tar -zx > /dev/null 2>&1 chmod +x ./bin/php5/bin/* echo -n " regenerating php.ini..." diff --git a/src/config.php b/src/config.php index 900d9453c..b93bee79d 100644 --- a/src/config.php +++ b/src/config.php @@ -40,13 +40,13 @@ if(ini_get("date.timezone") == ""){ //No Timezone set $daylight = (int) date("I"); $d = timezone_name_from_abbr("", $offset, $daylight); - ini_set("date.timezone", $d); + @ini_set("date.timezone", $d); date_default_timezone_set($d); }else{ $d = @date_default_timezone_get(); if(strpos($d, "/") === false){ $d = timezone_name_from_abbr($d); - ini_set("date.timezone", $d); + @ini_set("date.timezone", $d); date_default_timezone_set($d); } } @@ -77,4 +77,4 @@ if(file_exists(FILE_PATH.".git/refs/heads/master")){ //Found Git information! define("GIT_COMMIT", strtolower(trim(file_get_contents(FILE_PATH.".git/refs/heads/master")))); }else{ //Unknown :( define("GIT_COMMIT", str_repeat("00", 20)); -} \ No newline at end of file +} diff --git a/src/utils/Utils.php b/src/utils/Utils.php index 4651e4ab8..a83793fbf 100644 --- a/src/utils/Utils.php +++ b/src/utils/Utils.php @@ -28,7 +28,7 @@ class Utils{ public static $ip = false; public static function isOnline(){ - return ((@fsockopen("google.com", 80, $e = null, $n = null, 2) !== false or @fsockopen("www.linux.org", 80, $e = null, $n = null, 2) !== false or @fsockopen("www.php.net", 80, $e = null, $n = null, 2) !== false) ? true:false); + return ((@fsockopen("8.8.8.8", 80, $e = null, $n = null, 2) !== false or @fsockopen("www.linux.org", 80, $e = null, $n = null, 2) !== false or @fsockopen("www.php.net", 80, $e = null, $n = null, 2) !== false) ? true:false); } public static function getUniqueID($raw = false, $extra = ""){