# $EPIC: rejoin,v 1.2 2005/03/08 05:53:31 jnelson Exp $
Synopsis:
   window rejoin ["]<channel>[,<channel>] [<key-list>]["]

Technical:
   * This is the command that CHANNEL uses to do its work.
   * This command takes one argument.  The argument should be surrounded by
     double quotes if it contains a space.
   * The one argument to this command is a comma-separated list of channels
     optionally followed by a space and a comma-separated list of channel 
     keys.  Remember to use double-quotes if you supply channel keys.
   * For each channel in the channel list:
     * If we are already on the channel,
       * If the current window is connected to the current server [1]
         -> Move this channel to the current window
       * If the current window is NOT connected to the current server
         -> Do nothing
     * If we are not already on the channel
       * If there is a window which is "waiting" for the channel or there
         is a window to which the channel is "bound" (/WINDOW BIND)
         -> Join the channel and put it in that window
       * If there is NOT a window which is waiting for or owns the channel
         * If the current window is connected to the current server
           -> Join the channel and put it in the current window
         * If the current window is NOT connected to the current server
           -> Join the channel and put it in any of current server's windows.

Practical:
   This command allows you to join many channels at a time without the risk
   of damaging your window->channel assocations.  If you use this command
   on a channel that you are already a part of, then it will move the channel
   to a new window.  If you use this command on a channel you are not a part 
   of, epic will do its best to put the channel where it thinks you want it.
   You can use WINDOW BIND to tell epic which windows you want your
   channels put into.

   This command was specifically created to be used in /ON CONNECT to rejoin
   your channels after a disconnection.

See Also:
   bind(4) switch_channels; window(4) bind, unbind

