utor is a bot that announces changes in rtorrent's status to IRC
torrent-queue is a program which accepts messages from rtorrent and logs them to a log file. When rtorrent tells it that a torrent has finished, torrent-queue inspects the downloaded content, and will call unrar in these situations:
The content is a single rar file. If the rar archive contains more than one file/directory, a directory will be created to contain them, with the same name as the archive withou the ".rar")
The content is a directory with a rar archive that contains a single file/directory
The content is a directory containing CD[1-9] subdirectories which have rar archives (containing only a single file/directory each)
torrent-announce follows the log file created by torrent-queue and announces any added/finished/unrared torrents on IRC, along with some useful information like username, size, transfer speed, etc.
- rtorrent >= 0.8.4
- unrar (Debian folks: that means the nonfree version)
- Perl and the following Perl modules:
You can install the Perl modules with this command:
cpan List::Util POE::Component::IRC DateTime::Format::Human::Duration
Put torrent-queue and torrent-announce somewhere on your filesystem. Make sure they're executable. torrent-queue needs to be executable by the user that's running rtorrent.
Edit utor.yml to your needs.
.rtorrent.rc must have the following lines in it. But change /home/leech/utor/ to wherever you keep your copy of torrent-queue
# torrent-queue hooks system.method.set_key = event.download.inserted_new,utor_inserted_new,"execute=/home/leech/utor/torrent-queue,inserted_new,$d.get_hash=,$d.get_size_bytes=1,$d.get_loaded_file=1" system.method.set_key = event.download.finished,utor_finished,"execute=/home/leech/utor/torrent-queue,finished,$d.get_hash=,$d.get_size_bytes=1,$d.get_loaded_file=1,$d.get_name=1"
Restart rtorrent after you've edited .rtorrent.rc as instructed above. Then start the torrent-announce bot as the same user that runs torrent-queue. We recommend editing utor.yml so that it connects to an IRC proxy. That way you can restart torrent-announce if needed without spamming your channel with join/quit messages.
Any properly configured IRC proxy will do. We've been using the App::Bondage IRC proxy, you can install it with
See the App::Bondage documentation (
perldoc App::Bondage) for further