/** * Request information realtime. * * The data that are you requesting (for instance, what is in $mSearch) will not be parsed by the bot. * This essentially means it is the job of the code using that request to deal with parsing it properly. * * <code>$aMatches = $this->getRealtimeRequest("NAMES #westie", array(353, 366), 4); * * // Array * // ( * // [0] => :ircd 353 OUTRAGEbot = #westie :OUTRAGEbot ~Westie * // [1] => :ircd 366 OUTRAGEbot #westie :End of /NAMES list. * // )</code> * * @param string $sRequest Message to send to the server. * @param mixed $mSearch IRC numerics to cache. * @param integer $iSleep <i>Microseconds</i> to sleep before getting input. * @return array The response matched to the data in $aSearch. */ public function getRealtimeRequest($sRequest, $mSearch, $iSleep = 10000) { $this->oCurrentBot->iUseQueue = true; $this->oCurrentBot->aSearch = (array) $mSearch; $this->oCurrentBot->aMatchQueue = array(); $this->oCurrentBot->Output($sRequest); usleep($iSleep); $this->oCurrentBot->Input(); $this->oCurrentBot->iUseQueue = false; return $this->oCurrentBot->aMatchQueue; }