public function getCommonChans($nick)
    {
        $nick       = self::extractNick($nick);
        $collator   = $this->connection->getCollator();
        $nick       = $collator->normalizeNick($nick);
        $key        = array_search($nick, $this->nicks);
        if ($key === false) {
            throw new \Erebot\NotFoundException('No such user');
        }

        $results = array();
        foreach ($this->chans as $chan => $users) {
            if (isset($users[$key])) {
                $results[] = $chan;
            }
        }
        return $results;
    }
public function getCommonChans($nick)
    {
        $nick       = self::extractNick($nick);
        $collator   = $this->connection->getCollator();
        $nick       = $collator->normalizeNick($nick);
        $key        = array_search($nick, $this->nicks);
        if ($key === false) {
            throw new \Erebot\NotFoundException('No such user');
        }

        $results = array();
        foreach ($this->chans as $chan => $users) {
            if (isset($users[$key])) {
                $results[] = $chan;
            }
        }
        return $results;
    }
public function getCommonChans ( $ nick ) { $ nick = self :: extractNick ( $ nick ) ; $ collator = $ this -> connection -> getCollator ( ) ; $ nick = $ collator -> normalizeNick ( $ nick ) ; $ key = array_search ( $ nick , $ this -> nicks ) ; if ( $ key === false ) { throw new \ Erebot \ NotFoundException ( 'No such user' ) ; } $ results = array ( ) ; foreach ( $ this -> chans as $ chan => $ users ) { if ( isset ( $ users [ $ key ] ) ) { $ results [ ] = $ chan ; } } return $ results ; }
Returns a list of IRC channels the bot and some
other user have in common.

\param string $nick
Nickname of the user for which we want to know
what channels (s)he shares with the bot.

\retval list
A list with the names of all IRC channels
that user and the bot have in common.

\throw Erebot::NotFoundException
The given nickname does not match any known user.
Returns a list of IRC channels the bot and some other user have in common .