[TASK] Implemented the ProtocolHandler things so it works again.
[TASK] Added some comments. [TASK] Added TODOs concerning refactoring and more functions that are needed.
This commit is contained in:
@@ -3,7 +3,7 @@ $clientManager = new Client_ClientManager();
|
||||
$clientManager->registerProtocol("irc", "Irc");
|
||||
$clientManager->registerProtocol("jpt", "Bot");
|
||||
|
||||
$freenode = $clientManager->createTcpConnection("freenode", "irc");
|
||||
/*$freenode = $clientManager->createTcpConnection("freenode", "irc");
|
||||
$clientManager->attachConfig(array(
|
||||
"nick" => "Testinstanz",
|
||||
"userident" => "uzuguck",
|
||||
@@ -11,6 +11,7 @@ $clientManager->attachConfig(array(
|
||||
), $freenode);
|
||||
$freenode->connect("irc.freenode.net", 6667);
|
||||
$freenode->setReconnect(TRUE);
|
||||
*/
|
||||
|
||||
$freenode = $clientManager->createTcpConnection("freenode", "irc");
|
||||
$clientManager->attachConfig(array(
|
||||
@@ -20,7 +21,6 @@ $clientManager->attachConfig(array(
|
||||
), $freenode);
|
||||
$freenode->connect("irc.freenode.net", 6667);
|
||||
|
||||
|
||||
/*$config_eloxoph = array(
|
||||
"nick" => "Frischmilch",
|
||||
"userident" => "olefolol",
|
||||
@@ -31,11 +31,13 @@ $eloxoph = $clientManager->createTcpConnection("eloxoph", "irc");
|
||||
$clientManager->attachConfig($config_eloxoph, $eloxoph);
|
||||
$eloxoph->connect("irc.eloxoph.com", 6667);*/
|
||||
|
||||
|
||||
|
||||
$srv = $clientManager->createTcpConnection("srv", "jpt");
|
||||
$srv->bind("localhost", 7777);
|
||||
$srv->listen();
|
||||
|
||||
while($clientManager->countConnections() > 0) {
|
||||
while($clientManager->countSockets() > 0) {
|
||||
$clientManager->work();
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user