diff --git a/README.md b/README.md index 24c80549b..2333302c3 100644 --- a/README.md +++ b/README.md @@ -39,12 +39,10 @@ The entire server is done in PHP, and has been tested, profiled and optimized to * __[PHP Sockets](http://php.net/manual/en/book.sockets.php)__ * __[PHP SQLite3](http://php.net/manual/en/book.sqlite3.php)__ * __[PHP BCMath](http://php.net/manual/en/book.bc.php)__ -* __[PHP libevent](http://pecl.php.net/package/libevent)__ by _[Antony Dovgal](http://pecl.php.net/user/tony2001)_ * __[PHP pthreads](https://github.com/krakjoe/pthreads)__ by _[krakjoe](https://github.com/krakjoe)_: Threading for PHP - Share Nothing, Do Everything. * __[PHP NBT](https://github.com/TheFrozenFire/PHP-NBT-Decoder-Encoder/blob/master/nbt.class.php)__ by _[TheFrozenFire](https://github.com/TheFrozenFire)_: Class for reading in NBT-format files (modified to handle Little-Endian files). * __[Spyc](https://github.com/mustangostang/spyc/blob/master/Spyc.php)__ by _[Vlad Andersen](https://github.com/mustangostang)_: A simple YAML loader/dumper class for PHP. * __[ANSICON](https://github.com/adoxa/ansicon)__ by _[Jason Hood](https://github.com/adoxa)_: Process ANSI escape sequences for Windows console programs. -* __[libevent](http://libevent.org/)__: An event notification library * __[cURL](http://curl.haxx.se/)__: cURL is a command line tool for transferring data with URL syntax * __[Zlib](http://www.zlib.net/)__: A Massively Spiffy Yet Delicately Unobtrusive Compression Library * __[Source RCON Protocol](https://developer.valvesoftware.com/wiki/Source_RCON_Protocol)__ diff --git a/src/API/ConsoleAPI.php b/src/API/ConsoleAPI.php index dbd15e4e6..770745bdb 100644 --- a/src/API/ConsoleAPI.php +++ b/src/API/ConsoleAPI.php @@ -40,7 +40,7 @@ class ConsoleAPI{ $this->loop = new ConsoleLoop(); $this->register("help", "[page|command name]", array($this, "defaultCommands")); $this->register("status", "", array($this, "defaultCommands")); - $this->register("difficulty", "<0|1>", array($this, "defaultCommands")); + $this->register("difficulty", "<0|1|2>", array($this, "defaultCommands")); $this->register("invisible", "", array($this, "defaultCommands")); $this->register("save-all", "", array($this, "defaultCommands")); $this->register("stop", "", array($this, "defaultCommands")); diff --git a/src/build/compile.sh b/src/build/compile.sh index b808cadbe..5346d6021 100644 --- a/src/build/compile.sh +++ b/src/build/compile.sh @@ -7,8 +7,6 @@ ZEND_VM="GOTO" ZLIB_VERSION="1.2.7" PTHREADS_VERSION="53eb5d9ee6ec9c00ffa698681ecd132edeb5b8b2" CURL_VERSION="curl-7_30_0" -LIBEVENT_VERSION="release-1.4.14b-stable" -PHP_LIBEVENT_VERSION="0.0.5" echo "[PocketMine] PHP installer and compiler for Linux & Mac - v$COMPILER_VERSION" DIR="$(pwd)" @@ -79,30 +77,6 @@ wget https://github.com/krakjoe/pthreads/archive/$PTHREADS_VERSION.tar.gz --no-c mv pthreads-$PTHREADS_VERSION "$DIR/install_data/php/ext/pthreads" echo " done!" -#php-libevent -echo -n "[PHP libevent] downloading $PHP_LIBEVENT_VERSION..." -wget http://pecl.php.net/get/libevent-$PHP_LIBEVENT_VERSION.tgz -q -O - | tar -zx >> "$DIR/install.log" 2>&1 -mv libevent-$PHP_LIBEVENT_VERSION "$DIR/install_data/php/ext/libevent" -echo " done!" - -#libevent -echo -n "[libevent] downloading $LIBEVENT_VERSION..." -wget https://github.com/libevent/libevent/archive/$LIBEVENT_VERSION.tar.gz --no-check-certificate -q -O - | tar -zx >> "$DIR/install.log" 2>&1 -mv libevent-$LIBEVENT_VERSION libevent -echo -n " checking..." -cd libevent -./autogen.sh >> "$DIR/install.log" 2>&1 -./configure --prefix="$DIR/install_data/php/ext/libevent/lib" \ ---disable-shared >> "$DIR/install.log" 2>&1 -echo -n " compiling..." -make >> "$DIR/install.log" 2>&1 -echo -n " installing..." -make install >> "$DIR/install.log" 2>&1 -echo -n " cleaning..." -cd .. -rm -r -f ./libevent -echo " done!" - echo -n "[PHP]" set +e @@ -131,7 +105,6 @@ rm -f ./configure >> "$DIR/install.log" 2>&1 --enable-bcmath \ --with-curl="$DIR/install_data/php/ext/curl" \ --with-zlib="$DIR/install_data/php/ext/zlib" \ ---with-libevent="$DIR/install_data/php/ext/libevent/lib" \ --disable-libxml \ --disable-xml \ --disable-dom \ diff --git a/src/dependencies.php b/src/dependencies.php index ecd421fad..6f6f156b7 100644 --- a/src/dependencies.php +++ b/src/dependencies.php @@ -65,11 +65,6 @@ if(!extension_loaded("pthreads") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"" ++$errors; } -if(!extension_loaded("libevent") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "libevent." . PHP_SHLIB_SUFFIX) === false){ - console("[ERROR] Unable to find the libevent extension.", true, true, 0); - ++$errors; -} - if(!extension_loaded("curl") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "curl." . PHP_SHLIB_SUFFIX) === false){ console("[ERROR] Unable to find the cURL extension.", true, true, 0); ++$errors;