!!!!!!! TribesIP 2.1 - written by Rasia, modified and fixed by Cowboy !!!!!!!

Original by:
             Rasia
             rasia@planetstarsiege.com
             http://www.planetstarsiege.com/TheDen/

Reworked by:
             Cowboy
             cowboy@planetstarsiege.com
             http://www.planetstarsiege.com/cowboy/
             ICQ# 31184463

New features in 2.1: Deletes duplicates in the list, only keeps the most recent
                     one (doesn't affect favorites)! Also, added 'Join last
                     added server' option to the channel menu!

New features in 2.0: Favorites! Save all your favorite servers! Also, filters
                     out local-only IP masks 10.*.*.*, 192.168.*.*, 127.0.0.1
                     so you don't have to deal with links you can't use! Shows
                     state in TribesIP windowbar, can now Post IP, don't join
                     multiple servers! Fixed the 'directory long-filename' bug!
                     Oh yeah, enhanced installation script! Much nicer now!

I first saw TribesLinker on Rasia's old page (on fortunecity, before he moved
to PSS).. and as I had already been working on a Tribes IP Linker, I figured
I'd check his out... Well, it was WAY better than mine.. Creating a separate
window for the captured IP links was ingenious!

A few problems though, is the installation procedure was problematic, with
no error-checking.. And it wouldn't actually create a working .bat file!

Also, I play alot of password-protected servers, so I *needed* to be able to
join a server with the right password!

So, I modified his script, cleaned it up, got it working...

Note: Sets you marked as 'away' when you connect, this was a requested feature!

Installation Instructions - Put the TribesIP.mrc file in your mirc directory.
                            At the status window in mirc, type:

                            /load -rs TribesIP.mrc

                            Follow the on-screen instructions!

All the servers you detect will be in the TribesIP window that this script
creates when you connect to the server. If it doesn't create it the first time,
no worries, just goto your Commands menu (its up ther by DCC, File, edit, etc.)
There should be a Tribes IP Catcher menu option - just hit it, and boom, done.
Also, this is the way to restart the window if you close it accidentally.

Once you have a server in the TribesIP window, you can doubleclick to connect
to it, or you can right click to get some options. NOTE: All these options, when
activated via the TribesIP window will result in GLOBAL notification! If you only
want to notify people on a per-channel or individual basis, click the channel or
nicklist panels!

Clicking in individual Channel windows will give you options that pertain to that
specific channel ONLY! If you don't want to notify globally, you don't have to!
Also, you can /msg a selected IP to a specific nickname (click the nicklist)

Here are the basic options:

Join selected server -------- Joins the server, lets you type in a password for the 
                              server. If you just hit <enter> it uses the last Tribes
                              password (or no password if it's unnecessary)
Join last added server ------ Joins the most recently added server into the TribesIP
                              listbox. (appears only in the channel menu)
Tribes Main Menu ------------ Just start tribes, like you clicked its Windows icon.

Add selected to Favorites --- Adds selected lines to TribesIPfavorites.txt
Delete selected from Favs --- Deletes selected lines from TribesIPfavorites.txt

Enter manual IP (and join?) - Lets you manually type in a server name and/or IP to
                              be added to the TribesIP listbox. If you want, you
                              can then choose to join it!
Post IP, don't join --------- Only posts the server in all your channels (no join)

Delete selected line(s) ----- Deletes the selected lines from the TribesIP window.

Toggle auto-notify joiners -- Anytime someone Joins a channel you are on, it will
                              send a private msg to them with the message that you
                              specify, as well as the server IP of the currently
                              selected server.

Toggle demo record mode ----- Lets you toggle whether or not you want to record a
                              demo! (also shows current status) Basically, it adds
                              the +record parameter to the Tribes command line until
                              you disable it! (defaults to disabled on startup)

About TribesIP -------------- Gives you some info! (Tells you where to send your
                              donations.. hehehe)

...

Running the script for the first time creates the file TribesIP.bat in your mirc
directory. This file looks like this (i: and cd\games\tribes are where I installed
tribes, and d:\mirc\ is my mirc directory - Yours will probably be different):

@echo off

echo !!!!!!!! TribesIP 2.1 - written by Rasia, modified and fixed by Cowboy !!!!!!!!
echo.
echo Cowboy
echo cowboy@planetstarsiege.com
echo http://www.planetstarsiege.com/cowboy/
echo ICQ# 31184463
echo.
echo If you need to use any other command line parameters, you can just add them in
echo at the end of the appropriate line! (d:\mirc\TribesIP.bat)
echo.

echo Changing directory to: i:\games\tribes\

i:
cd\games\tribes

echo.
echo Running: tribes.exe %1 %2 %3 %4 %5 %6 %7 %8 %9

tribes.exe %1 %2 %3 %4 %5 %6 %7 %8 %9

echo.
echo You'll notice that this DOS-box stays up after you choose to connect to a game
echo using TribesIP. This is normal, but annoying... What you can do to make it go
echo away is go to its Properties box (Alt-Space, P) check the 'Close on Exit' box
echo and then the 'OK' button. Every time henceforth, it will close automatically!

...

Also created is the Tribes script config\TribesIPrecord.cs that contains this:

// This file is used by TribesIP 2.1, don't worry about it!

setupRecorderFile();

...

This is to get around a bug in the command-line parsing / function loading of
Tribes! (not to mention the other stuff I had to do to get Tribes to recognize
passwords containing more than one word! Ack!

Thanks to Labrat for some insights into this! (he already emailed the dev team
about this bug) LOL!