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

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

        $id = $this->_actionhandlerid++;
        $this->_actionhandler[] = array(
            'id' => $id,
            'type' => $handlertype,
            'message' => $regexhandler,
            'callback' => $object,
        );
        $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: '
            .'actionhandler('.$id.') registered', __FILE__, __LINE__
        );
        return $id;
    }
public function registerActionHandler($handlertype, $regexhandler, $object,
        $methodname = ''
    ) {
        // precheck
        if (!($handlertype & SMARTIRC_TYPE_ALL)) {
            $this->log(SMARTIRC_DEBUG_NOTICE, 'WARNING: passed invalid handler'
                .'type to registerActionHandler()', __FILE__, __LINE__
            );
            return false;
        }

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

        $id = $this->_actionhandlerid++;
        $this->_actionhandler[] = array(
            'id' => $id,
            'type' => $handlertype,
            'message' => $regexhandler,
            'callback' => $object,
        );
        $this->log(SMARTIRC_DEBUG_ACTIONHANDLER, 'DEBUG_ACTIONHANDLER: '
            .'actionhandler('.$id.') registered', __FILE__, __LINE__
        );
        return $id;
    }
public function registerActionHandler ( $ handlertype , $ regexhandler , $ object , $ methodname = '' ) { // precheck if ( ! ( $ handlertype & SMARTIRC_TYPE_ALL ) ) { $ this -> log ( SMARTIRC_DEBUG_NOTICE , 'WARNING: passed invalid handler' . 'type to registerActionHandler()' , __FILE__ , __LINE__ ) ; return false ; } if ( ! empty ( $ methodname ) ) { $ object = array ( $ object , $ methodname ) ; } $ id = $ this -> _actionhandlerid ++ ; $ this -> _actionhandler [ ] = array ( 'id' => $ id , 'type' => $ handlertype , 'message' => $ regexhandler , 'callback' => $ object , ) ; $ this -> log ( SMARTIRC_DEBUG_ACTIONHANDLER , 'DEBUG_ACTIONHANDLER: ' . 'actionhandler(' . $ id . ') registered' , __FILE__ , __LINE__ ) ; return $ id ; }
registers a new actionhandler and returns the assigned id

Registers an actionhandler in Net_SmartIRC for calling it later.
The actionhandler id is needed for unregistering the actionhandler.

@api
@see example.php
@param integer $handlertype bits constants, see in this documentation Message Types
@param string $regexhandler the message that has to be in the IRC message in regex syntax
@param object|callable $object either an object with the method, or a callable
@param string $methodname the methodname that will be called when the handler happens
@return integer assigned actionhandler id
registers a new actionhandler and returns the assigned id