An open API service indexing awesome lists of open source software.

https://github.com/gianarb/girc

IRC bot written in PHP
https://github.com/gianarb/girc

Last synced: over 1 year ago
JSON representation

IRC bot written in PHP

Awesome Lists containing this project

README

          

## Girc
Girc is a simple irc Bot written in PHP.

### Use Case
``` php
$con = new \Girc\Connection\Socket("irc.freenode.net", 6667);
$bot = new \Girc\Bot($con);
$bot->getEventManager()->attach("Bot::run", function(\Zend\EventManager\Event $e){
$b = $e->getParam('bot');
$m = $e->getParam('message');
if(preg_match("/!hello/", $m)){
$b->getConnection()->send(\Girc\Command\PrivMsg::send("#BotDiProva", "Hi!!"));
}
});
$bot->run();
```

### Install
``` bash
git clone https://github.com/gianarb/girc.git
cd girc
composer install
```