NAME

bfserve.pl - Basic xchat2 fileserving script


SYNOPSIS

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


QUICK START


USAGE

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.


COMMANDS

/status
Shows a list of the current sends and queues in the debug window.

/genlist filename
Generates a new list by spidering the directories listed in the configuration section, and saves the list in the given file.

/loadlist filename
This script will only serve files listed in your list! So if you have new files to be served, they will not be served by the script until you load a new list. This function is here since it's convenient to change list files while running.

/showad
Manually shows your advertisement in the channel. Normally it will only be shown at a regular interval.

/enqueue nickname file
This does the same thing as if the user with that nickname had typed !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
This prints a corresponding /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.


CAVEATS


AUTHOR

bfserve.pl is written by Mike Rosulek <mike@mikero.com>. Feel free to contact me with comments, questions, patches, or whatever.


COPYRIGHT

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.