/**
  * Joins a channel if nickname and channel matches the own nickname
  * and a channel in 'channels' configuration respectively.
  *
  * @param string $nickname
  * @param \Phergie\Irc\Event\UserEventInterface $event
  * @param \Phergie\Irc\Bot\React\EventQueueInterface $queue
  */
 public function joinOnMatch($nickname, UserEventInterface $event, EventQueueInterface $queue)
 {
     if ($nickname == $event->getConnection()->getNickname() && ($index = array_search($event->getSource(), $this->channels)) !== false) {
         $queue->ircJoin($this->channels[$index], $this->keys ? $this->keys[$index] : null);
     }
 }
 /**
  * Joins the provided list of channels.
  *
  * @param mixed $dummy Unused, as it only matters that one of the
  *        subscribed events has occurred, not what it is
  * @param \Phergie\Irc\Bot\React\EventQueueInterface $queue
  */
 public function joinChannels($dummy, EventQueueInterface $queue)
 {
     $queue->ircJoin($this->channels, $this->keys);
 }