[TASK] Added the ProtocolHandlerException

[TASK] Started to implement the IRC-Protocol
This commit is contained in:
Jan Philipp Timme
2010-12-12 21:44:19 +00:00
parent b1a7ac5fdb
commit 03a4dfff71
10 changed files with 365 additions and 14 deletions
+8 -4
View File
@@ -42,14 +42,18 @@ class Client_IrcClient extends Client_AbstractClient {
* @return void
*/
public function processContentObject($contentObject) {
$data = $contentObject->rawData;
echo "[RECV] ".$data;
$data = $contentObject->getRawData();
//DEBUG
//var_dump($contentObject);
//echo "[RECV] ".$data;
//respond to pings
if($contentObject->getCommand() === "PING") $this->protocolHandler->pong($contentObject->getParams());
$this->clientManager->sendToGroup("srv", "[#".$this->ID."] ".$data."\r\n\r\n");
$return = "";
if(strpos($data, "PING :") !== FALSE) $return .= str_replace("PING", "PONG", $data);
if(preg_match("/001/", $data)) $this->got_001 = TRUE;
$this->lines++;