Subversion
You can access this project with Subversion at https://svn.madcowdisease.org/mcd/MadCowOffer/trunk.
What is it?
MadCowOffer is an IRC DCC offer bot. Unlike your standard DCC offer bot, MCO is capable of handling a theoretically infinite number of packs (limited only by available memory). If you don't need any more than 10 or so packs at a time, try iroffer instead, as it will probably be a much better idea. If you want a giant archive of Pokemon JPEGs (or something equally silly), read on!
Requirements
- Python 2.2.x, may still work with 2.1.x
- The MySQLdb module for Python
- A MySQL server somewhere
Installation
-
Unpack the tar.gz somewhere:
tar zxvf MadCowOffer-x.y.z.tar.gz -
Change to the MadCowOffer-x.y.z/docs directory:
cd MadCowOffer-x.y.z/docs -
You need to make a new MySQL database, then use the MadCowOffer.mysql file to
create the database structure. You can create the database via phpMyAdmin (recommended),
or using the 'mysql' client. If you're using mysql, load it up as the MySQL
root user:
$ mysql -u root -p.
When it shows the mysql> prompt, create the database and user, reload the privileges, then quit:
mysql> CREATE DATABASE moo;
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE ON moo.* to cow@localhost IDENTIFIED BY 'woof';
mysql> FLUSH PRIVILEGES;
mysql> QUIT;
Now you can import the database layout:
$ mysql -umoo -pwoof moo < MadCowOffer.mysql
(Obviously, replace 'moo', 'cow@localhost' and 'woof' with the values you'll be using.) - Copy the sample.config to a new file, then load it up in your favourite editor. Go through and set up the various options. The comments should be all you need to read. For the database setup, 'moo' above is your database name, 'cow' is your username, and 'woof' is your password.
-
Start the bot:
$ python MadCowOffer.py -c new.config
Adding packs using madupdate
If you're using a recent version (might still only be in CVS), you have access to the
wonderful utils/madupdate.py. This script can automatically add categories/
packs to the database based on your file layout. Please read the top of the file for
instructions on setting it up.
Adding packs manually
To add your packs manually, load up the mysql client again:
$ mysql -umoo -pwoof moo
You'll need to insert a category into the database to put your files into:
mysql> INSERT INTO categories (cat_name) values ('My First Category');
mysql> SELECT * FROM categories;
The number on the left is the cat_id you'll need now to add a pack:
mysql> INSERT INTO packs (cat_id, added, filename, description, filesize, extra)
VALUES (1, NOW(), 'testfile.txt', 'My First File', 12345, 'TXT');
You don't have to use the 'extra' field if you don't want to. This ends our short
tutorial on manually adding packs.