mIRC Collapsable Switchbar v1.0-03.01.2002 *** Reverted version due to instabilitys in previous release ***
by Tiernan <tiernan@lomag.net>

Introduction:
     mIRC Collapsable Switchbar (McS) is an addon for mIRC 6.0x and adds functionality to mIRC that in my opinion
     should be an integral part of mIRC to begin with.  McS allows you to keep your mIRC switchbar nice and neat
     and without the clutter that occurs from being on multiple networks.  By simply hiding all but the "Status"
     buttons for the connections that are not currently active, you are left with a relatively clean switchbar.
     
    Sorting all windows according to their connection id, and then hiding all those not associated with the current
    (or active) server connection, meaning, you will have one active status that is followed by channels, queries,
    DCCs (all types), etc and the only other buttons you will see is the other minimized status windows for the other
    networks you are connected too.

Features:

    1) Remembers the settings for each connection. Whether the windows were tiled, were minimized, etc.
    2) Highly configurable. Including selection of types of windows to include. Whether or not to hide the windows or 
       just minimize them. Whether to display text said to you on other connections in your active window, status window
       of the related connection or to display nothing at all (see feature 3).
    3) Text display.
        3a) If your nickname is mentioned in a channel on an inactive connection, depending on McS' settings, it will
            echo that text to your active window or to the status window of the relevant connection.
        3b) If someone says something to you in private msg, depending on McS' settings, it will echo that text to your
            active window or to the status window of the relevant connection.
        3c) If someone sends you a notice, depending on McS' settings, it will echo that text to your active window or
            to the status window of the relevant connection.
        3d) If someone invites you to a channel, depending on McS' settings, it will echo that text to your active window
            or to the status window of the relevant connection.
        3e) If someone says something to you in a DCC chat, depending on McS' settings, it will echo that text to your
            active window or to the status window of the relevant connection.
    4) Leaves no unwanted or unneeded variables around to clutter up mIRC. It uses a hash table for all settings.
     
Files:
     This is a list of the files that are included in the archive, if you have more files than this,
     then the original archive was modified and redistributed.

     Before installation
         1) mcs.mrc
             The addon file itself.
         2) mcs_readme.txt 
             This file that you are currently reading!

     After Installation:
          1) mcs.mrc
          2) mcs_config.dat
              This is the settings file, used by the hash table to keep your configuration
          3) mcs_config.da0
              This is the backup file of your settings.
          4) mcs_readme.txt

Installation:
     Unzip the archive into your mIRC directory (or into a subdirectory) and then in mIRC, you will type the following:
     "load -rs path-to-addon\mcs.mrc" (without the quotes!)  Then make sure to click "Yes" to any initialization warnings
     that mIRC might popup.  McS automatically creates the required files needed for it's operation, and if it's the first
     time that the addon has been installed, it automatically opens the configuration dialog.
     
Usage:
     Usage is simple.  Just go about your normal chatting habits.  When on multiple networks, just click on the status
     button for the connection you wish to chat on, and McS automatically hides the other connections windows and
     minimizes the status window for all but the active connection.
     
Known Bugs:
     1) If your dialog font is not a small font, the dialog doesn't display everything properly.
         :-: Haven't found a workaround or a fix for this problem yet. If anybody has any ideas
             please let me know: tiernan@lomag.net
     2) If you are in a channel on multiple connections, the settings are saved for that channel regardless of the 
        connection.  If #TheDen is minimized on DALnet, but was tiled on Undernet, it will appear minimized when
        Undernet is made the active connection.
     3) Windows do not restore as of yet, will be included in next release.

Upcoming Features:
     1) Restoration of windows per connection id
            McS will remember the window settings of each window for each connection id and restore the windows
            to their saved settings upon reactivation of associated connection id.

     2) Sorting of the switchbar buttons
            McS will sort the buttons on the switchbar so that it will always be:
                | Conn1 | Conn2 | Conn3 | ActiveConn | #Chan1 | #Chan2 | Query1 | Query2 | dccChat | dccSend |

     2) Custom Switchbar
            The ability to select from a couple different styles of switchbars.  One, of course, is
            mIRC's default switchbar.  Second would be a @picwin switchbar.  Third would be a
            dialog switchbar (using a DLL to preserve position and MDI functionality).  Each would
            have it's own advantages and disadvantages.  A @picwin switchbar would be themable, as
            well as be able to fit in with other scripts that use @picwin GUIs.  A dialog switchbar
            would offer an added function of having the connections sorted in a dropdown list,
            that when a connection is selected, it displays the windows associated with that
            connection... thanks [-maverick-] for the idea.
     
     ********************************************************************************************
     ** If anybody has any feature requests, please let me know, as I want this addon to be as **
     ** user-friendly as humanly possible, with as much flexibility and functionality as one   **
     ** can get.  tiernan@lomag.net                                                            **
     ********************************************************************************************
--------------------------------------------------------------------------------
Help:
     Ok, here is where I give you the rundown on commands, how to do this or that, and what does what.  And to do
     that, I am going to just include a link to a very simplistic webpage that has the help functions written out
     with screenshots so that you know what I am talking about!
     
                           http://angelsfury.myip.org/mcs/mcs-help.html

--------------------------------------------------------------------------------
Credits:
     Many thanks go out to the following people:

   1) praetorian <jpdillin@interl.net>
      :-: Original author of the snippet that MCS is based on
      :-: Suggested the "while ($window(*,%mcs_n))" method for hiding the windows and switchbar buttons
      :-: Extensive beta testing, and bug squashing.
      
   2) Saturnine <none@email.com>
      :-: Suggested the "$window(*,%mcs_n).type" method (and fix) for the hiding of @windows and their
          buttons.
          
   3) dohcan <dohcan@mircscripts.org>
      :-: For creating Dialog Studio, without which, I would STILL be trying to design the dialogs for
          McS.
          
    4) ProXieS <Lamest@hotmail.com>
       :-: Author of Hash Tables Manager 1.0 (beta) :: which I used extensively for the creation of the
           hash table that is used by McS. Without this addon, it would have been a lot harder to 
           ensure the proper creation of the hash table, the items/data contained within, and would have
           made the task of creating the hash table a hell of a lot more tedious.

--------------------------------------------------------------------------------
Changes:

03-01-2002 v1.0-03.01.2002 - Whew! The things that can cause a person to just about give up, let me tell you!  But the good
                             news is I didn't give up!  I fixed a lot of bugs that praetorian reported to me.  And then 
                             redesigned the dialog for the millionth time.  Added some new features, rewrote others.  And
                             all in all, this is the best release yet.

  - Redesigned the dialog to accomodate new options.
  - Removed the error checking as that was there mainly for my usage
  - Added "Display Options" for text display on inactive connections.
  - Fixed window "restore" bug
  - Fixed small bug in configuration when clicking "Restore Previous Display" it changed the setting for "Remove Variables"
  - Fixed small bug in configuration when clicking "Minimize Status Windows" it changed the setting for "Remove Variables"
  - Wrote the online help system


Version History:

02-19-2002 v1.0-02.19.2002 - From the message boards to mIRC Editor...  I was reading the message boards on
                             www.mircscripts.org when I saw a post by praetorian with a little snippet.  It
                             was the birth of MCS, tho I didn't know it yet.
                             
                             ::No public release::
                             
   - Wrote (ok, copied from praetorian) the first basic engine

02-22-2002 v1.0-02.22.2002 - After rethinking the idea, I began a rewrite.  I decided I wanted to have some
                             configurability to the addon.  So I designed a dialog, wrote the dialog
                             interaction routines and began the process of rewriting the engine to accept the
                             configurations. Also discovered a couple flaws in praetorians original concept,
                             and sat down for a SERIOUS rewriting of the engine.
                             
                             ::no public release::

   - Designed the dialogs
   - wrote the dialog routines
   - rewrote the engine to accept configuration settings

02-24-2002 v1.0-02.24.2002 - All's well that ends well eh?  Don't count on it!  After many hours of sitting
                             in front of my computer looking at the code to this beast, I discovered a HUGE
                             flaw in it.  It wouldn't hide @custom windows, no matter what I did.  So back
                             to the drawing board... so to speak that is... I ran to the ms.org message boards
                             and asked there... well, thanks again to praetorian (and the others who helped),
                             the engine again got another rewrite, not as big as before, but enough to be a
                             pain in my fingers!
                             
                             ::no public release::

   - Rewrote the engine (added more configurability and fixed the @window malfunction)
   - Began the process of using hash tables to hold ALL the settings for the addon...
     that's right... you will not find a MCS related variable anywhere... other than
     the "var %mcs_n" used for placeholding in "while" loops, everything is done via
     a hash table
     
02-25-2002 v1.0-02.25.2002 - Dammit... I've spent the last 48 hours working on this P.O.S. and let me tell ya...
                             it ain't easy!  I optimized the code, reworked this and that, etc and FINALLY got
                             to a point where I could feel comfortable releasing it to some people for beta
                             testing... so I did... to praetorian... since it was his idea that started this
                             mess originally, I felt it manditory (well, I hoped that he would want to see
                             what his idea evolved into) that he be a tester.
                             
   - Finished the hash table routines, including loading of settings, saving the settings, retrieving the settings
     for the addon's use.
   - Started working on the auto-update feature that will be included in the addon.

                             ::First VERY limited (just one person) public release::

   - Praetorian came up with the following bugs...
     1) if a users dialog font is NOT default, then the sizing is a bit off
     2) Discovered that I had my head up my ass when I started designing the dialog and addon... there were
        functions in the dialog that I hadn't a CLUE why I had included them

           v1.0-02.25.2002a - bugfix released to praetorian.

   - totally redesigned the dialog... removed ALL non-essential functions from the addon.
   
                             ::Re-released to praetorian::

   - Praetorian came up with these bugs this time...
     1) if mIRC got minimized, and then restored, the addon would hide ALL the windows and then reshows ALL of them.
   
   - Praetorian suggested (ok, resuggested at this point) having options for the users to decide on whether or not
     to have MCS restore their window positions when they return to a connection...
        *** this means, if you have your windows all tiled on DALnet, and click on undernet to chat for a bit ***
        *** then return to DALnet, you would have the ability to have MCS return your windows for the DALnet  ***
        *** connection to being tiled again.                                                                  ***

02-26-2002 v1.0-02.26.2002 - Ok, now that I think I have 90% of the functionality worked out for the behavior of the
                             addon, I think I feel comfortable enough about it to release it to a bigger audience than
                             just one person and see if more eyes catch things praetorian and I did not.
                             
                             ::First public beta release::

   - Redesigned the dialog AGAIN... this time, I wrote it so that any more functionality that gets added to it will
     NOT require a total rewriting of the addon's dialog related routines!
   - Added the option to restore window displays for connections.
   - Added the option to minimize the status windows.
   - Added an icon to the dialog (it's only there because otherwise there is a nasty whitespace if one doesn't have
     Error Trapping enabled.)
   - Added a drop-down list and editbox on the dialog that, if Error Trapping is enabled, is made visible allowing the user
     to verify the data integrity of the hash file.  Disabling the Error Trapping will hide these two controls and replaces
     them with the icon.
  -  Wrote this friggin readme file!