X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FIrc%2Fextlib%2Fphergie%2FPhergie%2FProcess%2FAsync.php;h=78d5959144cf976e04a77f0024b52b4ee1d59664;hb=bf20258f4b61dd8396db9a1980463c060dab292c;hp=8605bf39f2dce8c8a2d5c7dc311abf81d1824ced;hpb=884b26229d74cc5b386406e3e9125629b4e3ecd0;p=quix0rs-gnu-social.git diff --git a/plugins/Irc/extlib/phergie/Phergie/Process/Async.php b/plugins/Irc/extlib/phergie/Phergie/Process/Async.php index 8605bf39f2..78d5959144 100644 --- a/plugins/Irc/extlib/phergie/Phergie/Process/Async.php +++ b/plugins/Irc/extlib/phergie/Phergie/Process/Async.php @@ -1,6 +1,6 @@ * @copyright 2008-2010 Phergie Development Team (http://phergie.org) @@ -20,11 +20,11 @@ */ /** - * Connection data processor which polls to handle input in an + * Connection data processor which polls to handle input in an * asynchronous manner. Will also cause the application tick at * the user-defined wait time. * - * @category Phergie + * @category Phergie * @package Phergie * @author Phergie Development Team * @license http://phergie.org/license New BSD License @@ -37,14 +37,14 @@ class Phergie_Process_Async extends Phergie_Process_Abstract * * @var int */ - protected $sec; + protected $sec = 0; /** * Length of time to poll for stream activity (microseconds) * * @var int */ - protected $usec; + protected $usec = 200000; /** * Length of time to wait between ticks. @@ -61,7 +61,7 @@ class Phergie_Process_Async extends Phergie_Process_Abstract protected $lastTick = 0; /** - * Overrides the parent class to set the poll time. + * Overrides the parent class to set the poll time. * * @param Phergie_Bot $bot Main bot class * @param array $options Processor arguments @@ -87,7 +87,7 @@ class Phergie_Process_Async extends Phergie_Process_Abstract } } - if (empty($this->sec) && empty($this->usec)) { + if (!isset($this->sec) && !isset($this->usec)) { throw new Phergie_Process_Exception( 'One of the processor options "sec" or "usec" must be specified' ); @@ -97,7 +97,7 @@ class Phergie_Process_Async extends Phergie_Process_Abstract } /** - * Waits for stream activity and performs event processing on + * Waits for stream activity and performs event processing on * connections with data to read. * * @return void @@ -117,11 +117,7 @@ class Phergie_Process_Async extends Phergie_Process_Abstract if ($event = $this->driver->getEvent()) { $this->ui->onEvent($event, $connection); $this->plugins->setEvent($event); - - if (!$this->plugins->preEvent()) { - continue; - } - + $this->plugins->preEvent(); $this->plugins->{'on' . ucfirst($event->getType())}(); } @@ -144,7 +140,7 @@ class Phergie_Process_Async extends Phergie_Process_Abstract } /** - * Obtains and processes incoming events, then sends resulting outgoing + * Obtains and processes incoming events, then sends resulting outgoing * events. * * @return void