Merge branches 'Faster-Network' and 'master' of https://github.com/PocketMine/PocketMine-MP

This commit is contained in:
Michael Yoo 2014-02-10 19:20:37 +10:30
commit d5ff5d0066
3 changed files with 19 additions and 9 deletions

View File

@ -59,7 +59,7 @@ rm -f start.sh
rm -f start.bat
echo "[1/3] Downloading PocketMine-MP $PMMP_VERSION..."
set -e
download_file "https://github.com/shoghicp/PocketMine-MP/archive/$PMMP_VERSION.tar.gz" | tar -zx > /dev/null
download_file "https://github.com/PocketMine/PocketMine-MP/archive/$PMMP_VERSION.tar.gz" | tar -zx > /dev/null
mv -f PocketMine-MP-$PMMP_VERSION/* ./
rm -f -r PocketMine-MP-$PMMP_VERSION/
rm -f ./start.cmd

View File

@ -96,7 +96,7 @@ LICENSE;
$config->set("server-port", $port);
echo "[*] ".$this->lang->ram_warning."\n";
echo "[?] ".$this->lang->server_ram." (".self::DEFAULT_MEMORY."): ";
$config->set("gamemode", ((int) $this->getInput(self::DEFAULT_MEMORY))."M");
$config->set("memory-limit", ((int) $this->getInput(self::DEFAULT_MEMORY))."M");
echo "[*] ".$this->lang->gamemode_info."\n";
do{
echo "[?] ".$this->lang->default_gamemode.": (".self::DEFAULT_GAMEMODE."): ";
@ -284,4 +284,4 @@ LICENSE;
}
}
/***REM_END***/
/***REM_END***/

View File

@ -90,13 +90,23 @@ class Utils{
}
public static function getOS(){
$uname = trim(strtoupper(php_uname("s")));
if(strpos($uname, "DARWIN") !== false){
return "mac";
}elseif(strpos($uname, "WIN") !== false){
$uname = php_uname("s");
if(stripos($uname, "Darwin") !== false){
if(strpos(php_uname("m"), "iP") === 0){
return "ios";
}else{
return "mac";
}
}elseif(stripos($uname, "Win") !== false or $uname === "Msys"){
return "win";
}elseif(strpos($uname, "LINUX") !== false){
return "linux";
}elseif(stripos($uname, "Linux") !== false){
if(@file_exists("/system/build.prop")){
return "android";
}else{
return "linux";
}
}elseif(stripos($uname, "BSD") !== false or $uname === "DragonFly"){
return "bsd";
}else{
return "other";
}