public function unloadModule($name)
    {
        $this->log(SMARTIRC_DEBUG_MODULES, 'DEBUG_MODULES: unloading module: '
            ."$name...", __FILE__, __LINE__
        );

        if (isset($this->_modules[$name])) {
            if (in_array('module_exit',
                    get_class_methods(get_class($this->_modules[$name]))
            )) {
                $this->_modules[$name]->module_exit($this);
            }

            unset($this->_modules[$name]);
            $this->log(SMARTIRC_DEBUG_MODULES, 'DEBUG_MODULES: successfully'
                ." unloaded module: $name", __FILE__, __LINE__);
            return $this;
        }

        $this->log(SMARTIRC_DEBUG_MODULES, "DEBUG_MODULES: couldn't unload"
            ." module: $name (it's not loaded!)", __FILE__, __LINE__
        );
        return false;
    }