Usage: WAIT [%process] [-cmd <command> <do_command>]
  There are several forms of this command.  The first is:
    WAIT -CMD command

  WAIT causes the command to be executed when server output
  that hasn't yet arrived, finally arrives.  This allows you to
  take a specific action immediately after receiving output from 
  the server, or client.  THIS DOES NOT CAUSE YOUR ALIAS TO STOP
  EXECUTING!  If you use WAIT -CMD, your aliases will continue
  to be executed as if the WAIT command had not ben executed!
  So do not expect the WAIT -CMD construct to really "WAIT"
  until you get your output!

  For example, the following alias:
    ALIAS BACKWARDS wait -cmd echo hello there;echo hi there
  will actually display "hi there" before "hello there", because
  the "hello there" echo is not executed until a WAIT token is
  received from the server.  If for instance you wanted to make
  sure to execute some command after the completion of a TRACE
  of your server, the format would be.
    TRACE
    WAIT -CMD command
  Note: This doesn't work for commands that depend on another server to 
  send you information. TRACE <remote server> for instance.

  The second form of the command is:
    WAIT -CMD %process command
  Where %process is a valid running processes id or name.  This is
  used to cause IRCII to execute the command after the process has
  exited.  If the given process doesn't exist, return is immediate.
  Here is an example of it's use:
    alias uptime {
      exec -name uptime uptime
      wait %uptime -cmd echo The time is $uptime
    }
    alias dotime uptime
    on ^exec uptime assign uptime $1
  When dotime is called, a request will be sent to get the uptime.
  The ON EXEC will catch the time and assign it to the variable 
  'uptime' at the same time that the alias is at the 'wait %uptime'
  stage, when the process exits, WAIT will continue and execute 
  echo The time is $uptime, where '$uptime' has been set already.

  If you are echoing output to the screen from within the WAIT -CMD
  form, it is probably a good idea to record the current window
  and use XECHO -WINDOW to ensure that output goes where it should.

  The second form of WAIT is the traditional syntax, and can be 
  used in the form of
    WAIT
  or
    WAIT %process

  This causes the client to suspend execution of the alias it is in, 
  and will recieve no keyboard input until the server (or process) has 
  finished output.  THIS FORM DOES ACCEPT INPUT FROM THE SERVER 
  WHILE IT IS WAITING!  It only does not accept input from the keyboard.
  If two waits are pending at the same time, both will return when the 
  last one is complete (recursive WAIT) to ensure you do not miss any 
  output.  THIS IS THE FORM YOU MUST USE IF YOU EXPECT THE CLIENT 
  TO WAIT FOR OUTPUT FROM THE SERVER (or process) BEFORE YOU CONTINUE
  WITH YOUR ALIAS!

