src/Plugin.php
public function processNames(ServerEvent $event, Queue $queue)
    {
        $special = '\[\]\\`_\^\{\|\}';

        $server = strtolower($event->getConnection()->getServerHostname());
        $params = array_slice($event->getParams(), 2);
        $channel = array_shift($params);

        $this->getLogger()->debug('Adding names to channel', array('server' => $server, 'channel' => $channel));

        $names = (count($params) == 1) ? explode(' ', $params[0]) : $params;

        foreach (array_filter($names) as $name) {
            // Strip prefix characters
            $name = preg_replace("/^[^A-Za-z$special]+/", '', $name);

            $this->channels[$server][$channel][$name] = true;
        }
    }
public function processNames(ServerEvent $event, Queue $queue)
    {
        $special = '\[\]\\`_\^\{\|\}';

        $server = strtolower($event->getConnection()->getServerHostname());
        $params = array_slice($event->getParams(), 2);
        $channel = array_shift($params);

        $this->getLogger()->debug('Adding names to channel', array('server' => $server, 'channel' => $channel));

        $names = (count($params) == 1) ? explode(' ', $params[0]) : $params;

        foreach (array_filter($names) as $name) {
            // Strip prefix characters
            $name = preg_replace("/^[^A-Za-z$special]+/", '', $name);

            $this->channels[$server][$channel][$name] = true;
        }
    }
public function processNames ( ServerEvent $ event , Queue $ queue ) { $ special = '\[\]\\`_\^\{\|\}' ; $ server = strtolower ( $ event -> getConnection ( ) -> getServerHostname ( ) ) ; $ params = array_slice ( $ event -> getParams ( ) , 2 ) ; $ channel = array_shift ( $ params ) ; $ this -> getLogger ( ) -> debug ( 'Adding names to channel' , array ( 'server' => $ server , 'channel' => $ channel ) ) ; $ names = ( count ( $ params ) == 1 ) ? explode ( ' ' , $ params [ 0 ] ) : $ params ; foreach ( array_filter ( $ names ) as $ name ) { // Strip prefix characters $ name = preg_replace ( "/^[^A-Za-z$special]+/" , '' , $ name ) ; $ this -> channels [ $ server ] [ $ channel ] [ $ name ] = true ; } }
Populate channels with names on join.

@param \Phergie\Irc\Event\ServerEventInterface $event
@param \Phergie\Irc\Bot\React\EventQueueInterface $queue
Populate channels with names on join .