26036e9994
[TASK] Added some DocComments for the IrcClient.
51 lines
1020 B
PHP
51 lines
1020 B
PHP
<?php
|
|
/**
|
|
* IrcClient class that contains all the Plugins
|
|
* @author jpt
|
|
* @package Client
|
|
* @depends Client_AbstractClient
|
|
*/
|
|
class Client_BotClient extends Client_AbstractClient {
|
|
|
|
/**
|
|
* Default constructor.
|
|
*/
|
|
public function __construct() {
|
|
|
|
}
|
|
|
|
/**
|
|
* Does all the hard work.
|
|
* @param string $data
|
|
* @return string
|
|
*/
|
|
public function processContentObject($contentObject) {
|
|
$return = "";
|
|
$data = $contentObject->rawData;
|
|
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);
|
|
}
|
|
|
|
//TODO: implement this correctly
|
|
$this->protocolHandler->sendRaw($return);
|
|
}
|
|
|
|
/**
|
|
* Loads the given configuration.
|
|
* @param array $config
|
|
* @return void
|
|
*/
|
|
public function loadConfig($config) {
|
|
|
|
}
|
|
|
|
}
|
|
?>
|