Wild IRC Bot (wildphp.com)
A modular IRC Bot built in PHP with the use of object-oriented programming.
It is designed to run off a local LAMP, WAMP, MAMP stack or just plain PHP installation.
In order to run WildPHP, we ask a few things from your system. Notably:
- A PHP version equal to or higher than 5.5.0.
- SSH or other local access to the system you plan on running WildPHP on.
- WildPHP does NOT run on services where you can host your website.
- For the best experience, we recommend using tmux or screen to allow the bot to run in the background.
If you need help or just want to idle in the IRC channel join us at #wildphp@irc.freenode.net
The bot itself has been designed to include the least features as possible. That means that only installing the core does not get you a functional bot.
The bot relies completely on modules, or plugins if you will.
Modules are installed using composer:
composer require [the package name of the module]
For example:
composer require wildphp/module-pingpong
After installation with composer, modules must be enabled in the configuration file. Please read the module description on how to do this.
We have developed a few official modules:
- module-channelmanager, which provides the
join
andpart
commands, and provides auto-joining of channels. - module-commandparser, which allows other modules to listen to commands on the bot.
- module-nickwatcher, which updates internal references to the nickname.
- module-pingpong, which allows the bot to stay online for long periods.
It is recommended to install all of those modules to get a basic bot working which sits in channels. Functionality can be extended from there on with more modules.
To install the latest build, you need Composer. Install WildPHP using the following command:
composer create-project wildphp/wild-irc-bot directory-name --stability=alpha
Where directory-name is the name of the directory where to install the bot. The stability flag is required since the bot is in alpha stage.
Copy the example configuration file and edit it to suit you. It uses the Neon syntax (borrowed from Nette Framework). It is similar to yaml but less strict and much faster to parse.
cp config.example.neon config.neon
While you can run the bot in the terminal it is best to run it in tmux or screen so that it can run in background.
php wildphp.php
<random-user> !say hello there
<wildphp-bot> hello there
You can see the full list of contributors in the GitHub repository.