2010-11-21 23:48:11 +01:00
|
|
|
<?php
|
|
|
|
$clientManager = new Client_ClientManager();
|
2010-11-28 03:45:25 +01:00
|
|
|
$clientManager->registerProtocol("irc", "Irc");
|
|
|
|
$clientManager->registerProtocol("jpt", "Bot");
|
2010-11-21 23:48:11 +01:00
|
|
|
|
2010-12-08 17:47:04 +01:00
|
|
|
/*$freenode = $clientManager->createTcpConnection("freenode", "irc");
|
2010-11-21 23:48:11 +01:00
|
|
|
$clientManager->attachConfig(array(
|
|
|
|
"nick" => "Testinstanz",
|
|
|
|
"userident" => "uzuguck",
|
|
|
|
"channels" => array("#mstasty")
|
|
|
|
), $freenode);
|
|
|
|
$freenode->connect("irc.freenode.net", 6667);
|
2010-11-28 17:38:03 +01:00
|
|
|
$freenode->setReconnect(TRUE);
|
2010-12-08 17:47:04 +01:00
|
|
|
*/
|
2010-11-21 23:48:11 +01:00
|
|
|
|
2011-06-26 00:13:53 +02:00
|
|
|
$euirc = $clientManager->createTcpConnection("euirc", "irc");
|
2010-11-21 23:48:11 +01:00
|
|
|
$clientManager->attachConfig(array(
|
2010-12-12 22:44:19 +01:00
|
|
|
"nick" => "Pb42",
|
2011-06-26 00:13:53 +02:00
|
|
|
"userident" => "Serena",
|
2011-06-26 16:03:32 +02:00
|
|
|
"channels" => array()
|
2011-06-26 00:13:53 +02:00
|
|
|
), $euirc);
|
|
|
|
$euirc->connect("irc.euirc.net", 6667);
|
|
|
|
$euirc->setReconnect(TRUE);
|
|
|
|
|
2011-06-26 16:03:32 +02:00
|
|
|
/*$osuIRC = $clientManager->createTcpConnection("osuIRC", "irc");
|
|
|
|
$clientManager->attachConfig(array(
|
|
|
|
"nick" => "Pb42",
|
|
|
|
"userident" => "Serena",
|
|
|
|
"channels" => array("#osu", "#german")
|
|
|
|
), $osuIRC);
|
|
|
|
$osuIRC->connect("irc.ppy.sh", 6667);
|
|
|
|
$osuIRC->setReconnect(TRUE);*/
|
|
|
|
|
|
|
|
|
2010-11-21 23:48:11 +01:00
|
|
|
|
|
|
|
/*$config_eloxoph = array(
|
|
|
|
"nick" => "Frischmilch",
|
|
|
|
"userident" => "olefolol",
|
|
|
|
"channels" => array("#eloxoph")
|
|
|
|
);
|
|
|
|
|
|
|
|
$eloxoph = $clientManager->createTcpConnection("eloxoph", "irc");
|
|
|
|
$clientManager->attachConfig($config_eloxoph, $eloxoph);
|
|
|
|
$eloxoph->connect("irc.eloxoph.com", 6667);*/
|
|
|
|
|
2010-12-08 17:47:04 +01:00
|
|
|
|
|
|
|
|
2010-11-28 03:45:25 +01:00
|
|
|
$srv = $clientManager->createTcpConnection("srv", "jpt");
|
2010-11-21 23:48:11 +01:00
|
|
|
$srv->bind("localhost", 7777);
|
2010-11-28 03:45:25 +01:00
|
|
|
$srv->listen();
|
2010-11-21 23:48:11 +01:00
|
|
|
|
2010-12-08 17:54:08 +01:00
|
|
|
while($clientManager->countActiveConnections() > 0) {
|
2010-11-21 23:48:11 +01:00
|
|
|
$clientManager->work();
|
|
|
|
}
|
|
|
|
?>
|