

                  RRR Sorority Division presents 


                              Syrup
                                        
                                        
                  A greedy Perl script for xchat
                                                
                       v1.1.4 / 09.Jun.2000
		

1. Legal junk
-------------
See file COPYING


2. Syrup? Sup? Pika?
--------------------
On IRC, there lives some nice robots (aka bots) who offer
free files for the occasional visitor. The files are fetched
from the bots by executing commands like "!mrrobot gimme.zip".

Usually the bots will give you just one file at a time,
and if there's lots of people wanting something, you are
put into a queue, and usually the queue will hold just
one of your noble requests.

Now then, not everyone has the patience to wait for every 
file to arrive, and then submit a new request.

Syrup automates this. You give it some commands and launch
Syrup. It will execute a command, wait for the transfer
to start, and once its started, it will send a second command.
When the second transfer has started, a third command will
be executed, and so on. When all commands are executed,
Syrup will reset its status and wait for new activation.

Why its called Syrup? I like syrup. 


3. Requirements
---------------

  - xchat, v1.4.1 seems to work
  - perl, atleast v5.00503 release 6 seems to work


4. Usage
--------
Syrup is a Perl script. Use "Load Perl Script" in xchat
to get it into memory (or put it into "~/.xchat/" directory
to make it start automatically).

First, you must choose a target (bot nick) for your commands. 
The target is needed so that Syrup recognizes the DCC sends 
when they come. Use

/sto <nick>         Select target for following commands

You can then either push the commands manually into the queue 
(with "/sp") or create a command list file which must contain 
one command per line. Its loaded with "/sload <file>".

/sp <command>

    Push a new command to the end of the queue for the nick set
    with /sto. You can add new commands while Syrup is already 
    running. If it has stopped you'll have to restart it.

Either way, you can then start Syrup with

/syrup <nick>        

    Activates Syrup. If you don't specify a nick, 
    Syrup will start for all unstarted command queues. 
    If the nick is not on the channel, Syrup will enter
    into a delayed mode and start when the target arrives.

Some other commands:

/sabort <nick>

    Aborts Syrup operation for <nick> and clears the command
    queue of that nick.

/shelp
    
    Quick help about these commands

/slist   

    Lists the contents of current command queues

/sload
 
 	Loads a command list into memory for target.

/snext <nick>

    Send the next command for <nick>. This can be useful
	if the bots queue holds more than one request.

/ssave

	Saves all the command lists with filenames like '$nick.lst'.
	This can be useful if you exit IRC but don't want to lose
	your request lists.
	
/sresend <nick>

	Re-sends the most recent command for nick. This is useful
	if the bot didn't acknowledge your last request.


NOTE: For Syrup to be useful, you should have 
"Auto Accept DCC Send" enabled.


4.1. Example
------------
you> /sto botsy
Syrup: Ok, next commands will be to botsy.
you> /sp !slimy_pornography.zip
Syrup: Ok, total 1 commands for botsy.
you> /sp !slimy_pornography2.zip
Syrup: Ok, total 2 commands for botsy.
you> /syrup
Syrup: Launching command (1/2) for botsy.
you> /sto terrorbot
Syrup: Ok, next commands will be to terrorbot.
you> /sp !vincent_price.mp3
Syrup: Ok, total 1 commands for terrorbot.
you> /sp !dr_death.mp3
Syrup: Ok, total 2 commands for terrorbot.
you> /sp !huge_vermin.mp3
Syrup: Ok, total 3 commands for terrorbot.
you> /syrup terrorbot
Syrup: Launching command (1/3) for terrorbot.

Now, if botsy sends the file first, command (2/2) for botsy
is sent. If its terrorbot, command (2/3) for terrorbot is sent.
While Syrup is running, you can add commands to the existing
queues or add new bots with /sto, and so forth.


5. Bugs, roaches, the whole lot
-------------------------------
Syrup is the first perl script I've ever done. The first
version was coded in one evening without any previous knowledge 
about Perl. So coding wasn't done according to any principles 
of good perl programming (whatever they are).

Bugs may well exist and exceptions are not handled. 
For example, if the command isn't acknowledged by the
bot (Syrup presumes bot accepts the command), netsplit 
happens, or whatever, Syrup won't understand any of it.

Syrup CAN handle bots changing their nicks while in
operation, though! ;)

IMPORTANT: You shouldn't try to receive anything else
from the bots that Syrup is currently active with, because 
Syrup can't know which DCC Connection is a response
to which request, but will mess up instead.


6. Feedback
-----------
Email <iwronsky@yahoo.com>. Any bug-reports, comments,
patches or suggestions are welcome. If nobody sends feedback,
don't expect fixes or further development. ;)


<EOF>
