My ircbot libary for PHP

As a hobby I have created a libary for PHP that enables PHP scripts to easily connect to an IRC server and act as bots. The libary is syncronos and fuly taking advandge of all OO PHP features, including classes.

The libary is not concidered stable, but it generaly does not crash as long you avoid the newest parts of the code or have an unsupported server. The libary comes CTCP enabled, it can easily parse and send CTCP messages over IRC. The libary currently only supports the Unrealircd ircserver, but it should not work that bad on other types of servers.

You can freely download the library from my site.

The libary makes it very easy to code irc bots. Here is an example bot:

<?php //$server,$port,$user,$password,$realname,$nick,$nickpass=''
require 'botclass.php';

class 
examplebot extends ircbot {
 function 
pmfunc(ircmessage $message) {
  
$this->say($message->user,'You told me: '.$message->message);
 }
}

$bot=new examplebot(
 
'irc.x.com',//the host, prepend ssl:// to use a ssl connection
 
6667,//the port
 
'examplebot',//the ident
 
'',//the connection password, rarely used since most networks uses services
 
'a simple bot to show how the syntax is',//the long name
 
'Examplebot',//the nick
 
''// the nickserv password, if any
);

$bot->connect();
$bot->join('#bots');
$bot->loop();