While I have never gotten into scripting ircII (I do use it :-P) and I assume that ocicat was thinking you meant shell scripting when he referenced the commands manual page, he is however almost correct.
Usage: SLEEP <number of seconds>
This suspends IRCII for the number of seconds given. NOTHING happens
during this time. This is really only useful for automatons.
Maybe not even then. Try the TIMER command instead.
Usage: TIMER [-refnum <num>] [-delete <num>] <seconds> [<command>]
Waits for the given number of seconds and then executes the
command. This is done without hindering normal operation of
the client. Any number of TIMERs can be set at once, and
all will activate at the appropriate time.
TIMER with arguments will list pending TIMERs.
TIMER -refnum <num>
will assign a specific number to that action allowing you
to delete it later if necessary with
TIMER -delete <num>
If no refnum is specified, one is automatically assigned.
I believe that timer is what you actually need, but I never learned the scripting facilities for ircII, so I can't be much help
Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.