Supybot
Supybot is not much different than Eggdrop, but instead, it's written in Python instead of C. So it's basically an IRC bot with nested commands, easy configuration, and an incredibly flexible and easy-to-use plugin system distinguish it from other IRC bots. After installing it, run the very simple setup wizard in which you answer few questions, and your bot it ready to be launched!
Are you still interested? Then let's go through it's installation process specific for SHellium's server.
- Warning
- Supybot is known to use a lot of resources, so you probably will be locked if use Supybot.
Installation
As most of the shell hosting services that you could have tried before, as well as Shellium, restrict their users to install all there packages under their own home directory. This could sound easy if you already have compiled and installed any package under such circumstances. Thus, there is something different about Supybot than any other packages. First of all, as you've read aboce, Supybot is written in Python language and it's different from any other package, since Python itself is a language not supported natively by Linux, in the contrary to C, Cpp, etc.. This means to install and run Supybot we need to make sure we have the correct environment installed before we do anything. This is shipped with Supybot's source package, so don't worry.
So first of all, we need to get the latest available Supybot source code, which is found here. Now in our shell we type the following:
wget http://sourceforge.net/projects/supybot/files/supybot/Supybot-0.83.4.1/Supybot-0.83.4.1.tar.gz/download
This will download the source file from the web. Now the next step will be, to extract this tarball package by issuing the following command:
tar -zvvxf Supybot-0.83.4.1.tar.gz
Please make sure you are in the same folder as the tarball file. If you wonder what tar -zvvxf means, then I would recommend you to read man tar provided by the link here, or you could read the same manual page by typing 'man tar' in your shell.
Browse now to the extracted folder Supybot-0.83.4.1/ by:
cd Supybot-0.83.4.1/
After that, we need to install the bot into our home directory. So type down the following command:
python setup.py install --prefix=$HOME/your_folder
This command will extract the necessary Supybot files and install them in it's own created Python's environment, different than the global one found on Shellium's server. For those that would like to look at more installation customized options, this could be done by using: python setup.py install --help.
Now let's get into the hardest but not complicated part of this setup. As we've said before, Supybot needs it's own environment to be ran under and as this environment should be our local one, different than the global server's, we need to specify the path of that specific environment that we would like to use. This is done in 2 steps. In the first step we need to export the local Python's path into our shell account and in the second step, save that path, in our shell account permanently. In case the shell account gets restarted or the server gets rebooted.
Step 1:
To export the environment we type the following in our shell:
export PYTHONPATH=$HOME/your_folder/lib/python2.5/site-packages
Please make sure you change your_folder to the folder name you specified before when installing your bot.
Step 2:
Now we need to permanently save this path in our shell's setup. For that we need to edit ~/.bashrc file. Use any preferred shell text editor you would like. I'm personally a fan of VIM, so I will use it here:
vim ~/.bashrc
scroll now to the bottom of this file and add:
export PYTHONPATH=$HOME/your_folder/lib/python2.5/site-packages
Now save and exit. If it complains that the file is read-only, simply override it.
So far we are done with the installation. All what we need now is to run the easy configuration script provided by Supybot developers to make our life easier.
Configuration
This is the fun part in the whole setup. We need first to get into the script directory:
cd ~/your_folder/bin
and again do not forget to change your_folder to your folder's name you specified before. Now we start our script by:
./supybot-wizard
take your time answering the questions and let the script do the rest for you. It will create a .conf file with the name of the bot you specified during configuration.
You may want to use some usefull plugins shipped by the Supy's source tarball. Those plugins are found in ~/Supybot-0.83.4.1/plugins , to use them, simply copy and paste the whole chosen plugins folder to the plugin's path you specified in your configuration script before.
Bot Launching and Loading Plugins
If you are still in ~/your_folder/bin folder and you want to start the bot, you need to issue the following command:
./supybot -d path/to/bot_name.conf
The -d flag specifies that you want to load the bot as a daemon. If you remove that flag you will end up having your bot loading in foreground. Also if you have the bot_name.conf file in the same directory as bin/ then you don't need to specify the path to the configuration file.
Of course now we will need to load the plugins you chose to use. Though, this requires to identify to the bot after the bot got lunched and connected to IRC. We identify to it like this:
/msg bot_name identify owner_name your_password
After this step, you need to type the following command in your bot's query console:
load PluginName
Please note here, you need to specify the exact PluginName as the folder's name you copied to your plugin/ directory, else the bot won't recognize the plugin you want to load and would complain that it's not found.