public function &getChannel($channelname)
    {
        $err = null;

        if (!$this->_channelsyncing) {
            $this->log(SMARTIRC_DEBUG_NOTICE,
                'WARNING: getChannel() is called and the required Channel '
                .'Syncing is not activated!', __FILE__, __LINE__
            );
            return $err;
        }

        if (!isset($this->_channels[strtolower($channelname)])) {
            $this->log(SMARTIRC_DEBUG_NOTICE,
                'WARNING: getChannel() is called and the required channel '
                .$channelname.' has not been joined!', __FILE__, __LINE__
            );
            return $err;
        }

        return $this->_channels[strtolower($channelname)];
    }