2010-11-21 23:48:11 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* IrcClient class that contains all the Plugins
|
|
|
|
* @author jpt
|
|
|
|
* @package Client
|
|
|
|
* @depends Client_AbstractClient
|
|
|
|
*/
|
|
|
|
class Client_BotClient extends Client_AbstractClient {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Default constructor.
|
|
|
|
*/
|
|
|
|
function __construct() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Does all the hard work.
|
|
|
|
* @param string $data
|
|
|
|
* @return string
|
|
|
|
*/
|
2010-11-28 02:15:20 +01:00
|
|
|
public function processContentObject($contentObject) {
|
2010-11-28 03:45:25 +01:00
|
|
|
$return = "";
|
2010-11-28 02:15:20 +01:00
|
|
|
$data = $contentObject->rawData;
|
2010-11-21 23:48:11 +01:00
|
|
|
if(strpos($data, "-") !== FALSE ) {
|
|
|
|
$data = explode("-", $data);
|
|
|
|
$this->clientManager->sendToID((int) $data[0], $data[1]."\r\n");
|
|
|
|
$return = print_r($data, TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(strpos($data, "+") !== FALSE ) {
|
|
|
|
$data = explode("+", $data);
|
|
|
|
$this->clientManager->sendToGroup($data[0], $data[1]."\r\n");
|
|
|
|
$return = print_r($data, TRUE);
|
|
|
|
}
|
|
|
|
|
2010-12-08 17:47:04 +01:00
|
|
|
//TODO: implement this correctly
|
|
|
|
$this->protocolHandler->sendRaw($return);
|
2010-11-21 23:48:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Loads the given configuration.
|
|
|
|
* @param array $config
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function loadConfig($config) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
?>
|