PHilliP is an IRC bot written in PHP.
git clone git://github.com/JoshuaEstes/PHilliP.git
cd PHilliP
git submodule update --init --recursive
cp lib/config/services.yml.dist lib/config/services.yml
php phillip
Open up lib/config/services.yml and update the server, port, nickname, and trusted users.
Create a new class and place it in the src/ folder, open up lib/config/services.yml and add that information to the services section. You will need to just give the class name and the location of the file.
In your construct of that class you will need to attach a listener to all the events you want your class to listen to. Server commands are name 'server.command.COMMAND' where COMMAND is the IRC command (such as PRIVMSG). You can see examples in some of the other classes.