diff --git a/README.md b/README.md index f07f2f4a..2333302c 100644 --- a/README.md +++ b/README.md @@ -40,12 +40,10 @@ The entire server is done in PHP, and has been tested, profiled and optimized to * __[PHP SQLite3](http://php.net/manual/en/book.sqlite3.php)__ * __[PHP BCMath](http://php.net/manual/en/book.bc.php)__ * __[PHP pthreads](https://github.com/krakjoe/pthreads)__ by _[krakjoe](https://github.com/krakjoe)_: Threading for PHP - Share Nothing, Do Everything. -* __[PHP Event](https://bitbucket.org/osmanov/pecl-event)__ by _[osmanov](https://bitbucket.org/osmanov)_: Event provides an interface to `libevent` C library. * __[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. * __[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 -* __[libevent](http://libevent.org/)__: An event notification library * __[Source RCON Protocol](https://developer.valvesoftware.com/wiki/Source_RCON_Protocol)__ * __[UT3 Query Protocol](http://wiki.unrealadmin.org/UT3_query_protocol)__ \ No newline at end of file diff --git a/src/API/ConsoleAPI.php b/src/API/ConsoleAPI.php index 42a44baf..07204bbc 100644 --- a/src/API/ConsoleAPI.php +++ b/src/API/ConsoleAPI.php @@ -302,9 +302,6 @@ class ConsoleLoop extends Thread{ public function stop(){ $this->stop = true; - if(HAS_EVENT and false){ - $this->base->stop(); - } } public function readLine($fp, $events = null){ @@ -315,24 +312,11 @@ class ConsoleLoop extends Thread{ } public function run(){ - $fp = fopen("php://stdin", "r"); - if(HAS_EVENT and false){ - $this->base = new EventBase(); - $this->ev = new Event($this->base, $fp, Event::READ | Event::PERSIST, array($this, "readLine")); - $this->ev->add(); - while($this->stop === false){ - $this->base->loop(EventBase::LOOP_ONCE); - if($this->line !== false){ - $this->wait(); - $this->line = false; - } - } - }else{ - while($this->stop === false and ($line = fgets($fp)) !== false){ - $this->line = $line; - $this->wait(); - $this->line = false; - } + $fp = fopen("php://stdin", "r"); + while($this->stop === false and ($line = fgets($fp)) !== false){ + $this->line = $line; + $this->wait(); + $this->line = false; } @fclose($fp); exit(0); diff --git a/src/dependencies.php b/src/dependencies.php index 61840056..dffff427 100644 --- a/src/dependencies.php +++ b/src/dependencies.php @@ -80,12 +80,6 @@ if(!extension_loaded("zlib") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . ++$errors; } -if(extension_loaded("event")){ - define("HAS_EVENT", true); -}else{ - define("HAS_EVENT", false); -} - if($errors > 0){ console("[ERROR] Please use the installer provided on the homepage.", true, true, 0); exit(1); //Exit with error