public function isOn($chan, $nick = null)
    {
        if ($nick === null) {
            return isset($this->chans[$chan]);
        }

        $nick       = self::extractNick($nick);
        $collator   = $this->connection->getCollator();
        $nick       = $collator->normalizeNick($nick);
        $key        = array_search($nick, $this->nicks);
        if ($key === false) {
            return false;
        }
        return isset($this->chans[$chan][$key]);
    }
public function isOn($chan, $nick = null)
    {
        if ($nick === null) {
            return isset($this->chans[$chan]);
        }

        $nick       = self::extractNick($nick);
        $collator   = $this->connection->getCollator();
        $nick       = $collator->normalizeNick($nick);
        $key        = array_search($nick, $this->nicks);
        if ($key === false) {
            return false;
        }
        return isset($this->chans[$chan][$key]);
    }
public function isOn ( $ chan , $ nick = null ) { if ( $ nick === null ) { return isset ( $ this -> chans [ $ chan ] ) ; } $ nick = self :: extractNick ( $ nick ) ; $ collator = $ this -> connection -> getCollator ( ) ; $ nick = $ collator -> normalizeNick ( $ nick ) ; $ key = array_search ( $ nick , $ this -> nicks ) ; if ( $ key === false ) { return false ; } return isset ( $ this -> chans [ $ chan ] [ $ key ] ) ; }
Indicates whether some user is present
on a given IRC channel.

\param string $chan
IRC channel that user must be on.

\param mixed $nick
(optional) Either some user's nickname
(a string) or \b null. Defaults to \b null.
When this parameter is \b null, this method
tests whether the bot is on the given
IRC channel or not.

\retval bool
\b true is the given user is on that
IRC channel, \b false otherwise.
Indicates whether some user is present on a given IRC channel .