public function listenFor($messagetype, $regex = '.*')
    {
        $listenfor = new Net_SmartIRC_listenfor();
        $this->registerActionHandler($messagetype, $regex, array($listenfor, 'handler'));
        $this->listen();
        return $listenfor->result;
    }
public function listenFor($messagetype, $regex = '.*')
    {
        $listenfor = new Net_SmartIRC_listenfor();
        $this->registerActionHandler($messagetype, $regex, array($listenfor, 'handler'));
        $this->listen();
        return $listenfor->result;
    }
public function listenFor ( $ messagetype , $ regex = '.*' ) { $ listenfor = new Net_SmartIRC_listenfor ( ) ; $ this -> registerActionHandler ( $ messagetype , $ regex , array ( $ listenfor , 'handler' ) ) ; $ this -> listen ( ) ; return $ listenfor -> result ; }
waits for a special message type and returns the answer

Creates a special actionhandler for that given TYPE and returns the answer.
This will only receive the requested type, immediately quit and disconnect from the IRC server.
Made for showing IRC statistics on your homepage, or other IRC related information.

@api
@param integer $messagetype see in the documentation 'Message Types'
@param string  $regex the pattern to match on
@return array answer from the IRC server for this $messagetype
waits for a special message type and returns the answer