[TASK] Introduced addLine() to the buffer class.

[TASK] Made createBuffer function protected in ProtocolHandler classes.
This commit is contained in:
Jan Philipp Timme
2011-06-26 14:03:32 +00:00
parent df030e453d
commit 8e32f35edf
8 changed files with 50 additions and 21 deletions
+4 -3
View File
@@ -65,7 +65,7 @@ class Client_IrcClient extends Client_AbstractClient {
*/
public function initializeConnection() {
if(!$this->authed) {
$data = "USER poweruser as as :JPTs Bot\r\nNICK :" . $this->nick . "\r\n";
$data = "USER poweruser as as :JPTs Bot\r\nNICK " . $this->nick . "\r\n";
$this->authed = TRUE;
}
$this->protocolHandler->sendRaw($data);
@@ -80,7 +80,8 @@ class Client_IrcClient extends Client_AbstractClient {
protected function processContentObject($contentObject) {
$data = $contentObject->getRawData();
//DEBUG
//var_dump($contentObject);
var_dump($contentObject);
var_dump($data);
//respond to pings
if($contentObject->getCommand() === "PING") $this->protocolHandler->pong($contentObject->getParams());
@@ -98,7 +99,7 @@ class Client_IrcClient extends Client_AbstractClient {
foreach($this->channels AS $channel) $return .= "JOIN " . $channel . "\r\n";
}
if(strpos($data, "multivitamin") !== FALSE) {
if(strpos($data, "musdsdsafgagltivitamin") !== FALSE) {
$return .= "PRIVMSG ".$this->channels[0]." :roger that :D\r\n";
$return .= "QUIT :lol\r\n";
}