/** * @return void */ public function endNegotiate() { $object = new CancellableDataObject($this->parent); $this->parent->getEventEmitter()->emit('irc.connection.cap.pre-end', [$object]); if ($object->isCancelled()) { $this->parent->getLoop()->addTimer(1, array($this, 'endNegotiate')); return; } $this->parent->write('CAP END' . "\r\n"); }
public function capChecker(CancellableDataObject $object) { $object->setCancelled(!$this->authenticationComplete); }