public function unregisterActionHandler($handlertype, $regexhandler,
        $object, $methodname = ''
    ) {
        // precheck
        if (!($handlertype & SMARTIRC_TYPE_ALL)) {
            $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: passed invalid handler'
                .'type to unregisterActionHandler()', __FILE__, __LINE__
            );
            return false;
        }

        if (!empty($methodname)) {
            $object = array($object, $methodname);
        }

        foreach ($this->_actionhandler as $i => &$handlerinfo) {
            if ($handlerinfo['type'] == $handlertype
                && $handlerinfo['message'] == $regexhandler
                && $handlerinfo['callback'] == $object
            ) {
                $id = $handlerinfo['id'];
                unset($this->_actionhandler[$i]);

                $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: '
                    .'actionhandler('.$id.') unregistered', __FILE__, __LINE__
                );
                $this->_actionhandler = array_values($this->_actionhandler);
                return $this;
            }
        }

        $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: could '
            .'not find actionhandler type: "'.$handlertype.'" message: "'
            .$regexhandler.'" matching callback. Nothing unregistered', __FILE__, __LINE__
        );
        return false;
    }
public function unregisterActionHandler($handlertype, $regexhandler,
        $object, $methodname = ''
    ) {
        // precheck
        if (!($handlertype & SMARTIRC_TYPE_ALL)) {
            $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: passed invalid handler'
                .'type to unregisterActionHandler()', __FILE__, __LINE__
            );
            return false;
        }

        if (!empty($methodname)) {
            $object = array($object, $methodname);
        }

        foreach ($this->_actionhandler as $i => &$handlerinfo) {
            if ($handlerinfo['type'] == $handlertype
                && $handlerinfo['message'] == $regexhandler
                && $handlerinfo['callback'] == $object
            ) {
                $id = $handlerinfo['id'];
                unset($this->_actionhandler[$i]);

                $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: '
                    .'actionhandler('.$id.') unregistered', __FILE__, __LINE__
                );
                $this->_actionhandler = array_values($this->_actionhandler);
                return $this;
            }
        }

        $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: could '
            .'not find actionhandler type: "'.$handlertype.'" message: "'
            .$regexhandler.'" matching callback. Nothing unregistered', __FILE__, __LINE__
        );
        return false;
    }
public function unregisterActionHandler ( $ handlertype , $ regexhandler , $ object , $ methodname = '' ) { // precheck if ( ! ( $ handlertype & SMARTIRC_TYPE_ALL ) ) { $ this -> log ( SMARTIRC_DEBUG_NOTICE , 'WARNING: passed invalid handler' . 'type to unregisterActionHandler()' , __FILE__ , __LINE__ ) ; return false ; } if ( ! empty ( $ methodname ) ) { $ object = array ( $ object , $ methodname ) ; } foreach ( $ this -> _actionhandler as $ i => & $ handlerinfo ) { if ( $ handlerinfo [ 'type' ] == $ handlertype && $ handlerinfo [ 'message' ] == $ regexhandler && $ handlerinfo [ 'callback' ] == $ object ) { $ id = $ handlerinfo [ 'id' ] ; unset ( $ this -> _actionhandler [ $ i ] ) ; $ this -> log ( SMARTIRC_DEBUG_ACTIONHANDLER , 'DEBUG_ACTIONHANDLER: ' . 'actionhandler(' . $ id . ') unregistered' , __FILE__ , __LINE__ ) ; $ this -> _actionhandler = array_values ( $ this -> _actionhandler ) ; return $ this ; } } $ this -> log ( SMARTIRC_DEBUG_ACTIONHANDLER , 'DEBUG_ACTIONHANDLER: could ' . 'not find actionhandler type: "' . $ handlertype . '" message: "' . $ regexhandler . '" matching callback. Nothing unregistered' , __FILE__ , __LINE__ ) ; return false ; }
unregisters an existing actionhandler

@api
@param integer $handlertype
@param string $regexhandler
@param object $object
@param string $methodname
@return boolean
unregisters an existing actionhandler