bfserve.pl - Basic xchat2 fileserving script
Serves files on an IRC channel using DCC. Leechers wishing to get your files can issue the following commands in the channel:
@nickname - sends the leecher your list of shared files !nickname filename - queues the given file @nickname-queue - lists files the user has in the queue @nickname-remove - removes user's files from the queue
your_nickname_sends. It may give an error that it cannot
open your list
/genlist filename. Look at the list file it
generates and load it by typing /loadlist filename. If the filename is
different than the one listed in the configuration section, you will need
to edit the script to point to the new file, so it will find the correct
file next time.
/showad, you're now serving!
When a user requests a file, it is added to the bottom of the queue (even if there are open send slots). The script checks every 10 seconds to see if there are open send slots, and sends the first valid thing in the queue.
The only exception is your list file. Presumably this file is very small, so even if there are no send slots open, the script will still send your list the next time it checks for things to send.
/status/genlist filename/loadlist filename/showad/enqueue nickname file!your_nickname file in the channel, it adds their request to the queue.
However, this version allows you to override the max_queue setting in the
configuration, so you can manually give someone more queue slots.
Be sure you are online before you /enqueue things (see below) -- the script
doesn't (yet) check before trying to send files.
/saveq/enqueue line for each person in the current
list of sends and queues. You can copy this text, if you need to restart
xchat and come back while keeping queues intact. Just paste the /enqueue
commands back when you return -- the sends will resume and the queue will
remain as it was.
bfserve.pl is written by Mike Rosulek <mike@mikero.com>. Feel free to contact me with comments, questions, patches, or whatever.
Copyright (c) 2003 Mike Rosulek. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.