Valeyard IRC<->SQL
What is it?
Valeyard IRC to SQL GateWay is an experimental IRC bot written in PHP, designed to be modular with a variety of hooks to choose from. You can write your own modules for Gateway using these hooks.
It’s coded with mIRC Scripting Language in mind, in an effort to make it easier to bring module-coding to developers and to make learning the API easier.
For the forseeable future, this project will only be updated to be compatible with the IRC daemon UnrealIRCd.
If you would like to see a small example module utilising some of the features, check this link.
Setup for UNIX machines
Dependencies:
– php-cli
(installed with PHP)
Installing PHP
To have installed `php-cli`. This can be installed from your SSH session with the following:
$ sudo apt-get install php
You can verify PHP is installed by checking the version using:
$ php -v
Downloading IRC SQL GateWay
As always, I am going to recommend you do not do any of this as root. Please log into a separate shell account with non-root priviledges. This is in case someone hijacks the bot, they won’t have root access.
So, for the purposes of this example, we are assuming you are using account “ircd”.
Change directory (cd
) to your user directory;
$ cd /home/ircd/
Clone the repository for IRC SQL GateWay;
$ git clone https://github.com/ValwareIRC/Valeyard.git
Configuration
Change directory (cd
) to IRC-SQL-GateWay
$ cd Valeyard/
Now from here you can either use your FTP client (WinSCP, FileZilla, etc) to copy the example configuration to the same directory and call it “gateway.conf.php”, or you can copy it over from SSH like this;
$ cp example.config.php gateway.config.php
Again, you can either use your FTP client to edit and save the file to your specifications, or you can edit it in your SSH client like this (I recommend nano);
$ nano gateway.config.php
You can save and exit the nano editor by pressing Ctrl+X
and then hitting 'y'
and Enter
when it asks you to save.
Running IRC SQL GateWay
GateWay must be run from a screen, otherwise when you exit the SSH client the bot will stop running.
To do this, you can simply type the following;
$ screen
If you are already running a screen and need to get back into it, you can resume the screen instead by using;
$ screen -r
Once inside the screen, you simply need to type the following to execute the bot;
$ php gateway.php
When you have ensured it is up and running, you can close the screen by pressing;
Ctrl+A
then Ctrl+D
And that’s you all set!
If you’d like to contribute anything, please check out my GitHub. You can find a link at the top of the page.