From db1b7ec4f2f7f1b9bed6e552761447522ecb6631 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Wed, 2 Jan 2013 19:41:23 +0100 Subject: [PATCH] Line ending cleanup --- .gitattributes | 5 +++++ PocketMine-MP.php | 25 ++++++------------------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/.gitattributes b/.gitattributes index 412eeda78..bcbb3fc3d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,10 @@ # Auto detect text files and perform LF normalization * text=auto +*.php text eol=lf +*.sh text eol=lf +*.txt text eol=lf +*.properties text eol=lf +*.bat text eol=crlf # Custom for Visual Studio *.cs diff=csharp diff --git a/PocketMine-MP.php b/PocketMine-MP.php index a20aa4de0..6eb0fa0c0 100644 --- a/PocketMine-MP.php +++ b/PocketMine-MP.php @@ -29,24 +29,11 @@ require_once("src/common/dependencies.php"); require_once("classes/PocketMinecraftServer.class.php"); require_once("API/ServerAPI.php"); -while(true){ - $server = new ServerAPI(); - if($server->start() !== true){ - break; - }else{ - console("[INFO] Cleaning up..."); - hard_unset($server); - $excludeList = array("GLOBALS", "_FILES", "_COOKIE", "_POST", "_GET", "excludeList"); - foreach(get_defined_vars() as $key => $value){ - if(!in_array($key, $excludeList)){ - $$key = null; - unset($$key); - } - } - $server = null; - unset($server); - console("[NOTICE] The server is restarting... (".gc_collect_cycles()." cycles collected)", true, true, 0); - } +$server = new ServerAPI(); +if($server->start() !== true){ + //Stop +}else{ + //Restart } -kill(getmypid()); \ No newline at end of file +kill(getmypid()); //Fix for segfault \ No newline at end of file