Ultima Online Login Server Monitor
Version 1.16
By Robert Simpson  simpson@primenet.com

This program has been released to the public domain and may be freely
distributed.

Features & Instructions
-----------------------
To run this program, put it in your UO directory and launch it instead of UO.

The UO Monitor will automatically run the patch program and then will begin
polling the UO Login Servers.  Thanks to OSI, the UO Monitor will now display
the status of all the running game servers, and will not launch UO until one
comes up!

The UO Monitor will display the game servers in the following form:

<server>: <timezone offset> {up | down}

The timezone tells you where the server is located geographically.  UOTrace
and the UO Client use the timezone offset to determine the server closest
to you, but in UOMON it is for information only.

The UO Monitor is designed not to give UO's LoginServers a headache, and
polls less frequently than previous versions.  Here is the logic:

Begins polling login server.  If down, it pauses for a couple seconds before
polling again.

If login server is up, it gets game server status.  If all games are down,
UOMON waits 30 seconds before retrying.  (OSI informs me that it takes an
average of 10 minutes for the game to come up after it has been down).

If a game is up, UOMON will try verifying the game status, and then will do
a short 5-second countdown (user-configurable) and launch UO.

What's new in 1.10!
-------------------
This new version contains enhancements to the user interface, but the function
is the same as 1.09.  New features include:

- Icon in the system tray for "Status at a glance" viewing.
- All command-line params have been moved into an INI file and UOMON now has
  a configuration screen.
- UOMON can now continue to poll the game after launching UO (at relaxed
  intervals)
- It now will run the AutoPatch program at regular intervals (optional)
  If this is activated, UOMON will launch the patch program before polling
  as well.
- UOMON can be told to pay specific attention to a particular game server.
  In the future, there will be several game servers running, and now you can
  tell the program which one to pay attention to and launch UO when that
  server comes up.
- Registry fix, for those of you getting the "Another instance of UO starter
  is already running" and other such errors when UOMON tries to launch UO.
- UOMON now knows when the patch program or client is running, and will not
  launch them if they are already running.

Because of the new features, I put in a proper "About Box" identical to the
other freeware apps I've written--the "verse" (as some of you put it) is now
in that About Box.  Moving it there was not done because of any pressure from
users, or doubts on my part.  In my other apps, the About Box is where the
verse appears, and has always appeared.  I simply had it front-faced on UOMON
because there was no About Box in UOMON, and UOMON is designed to appear only
briefly if the game server is up.


COMMAND-LINE PARAMS:  (These override the default settings)
--------------------

UOMON.EXE -t[imeout] <#> -d[elay] <#> -p[lay] <wavfile> -l[ogin] <password>

-t is a value in seconds, which tells the UO Monitor how long to wait before
   timing out a connection attempt.  Defaults to 5 seconds.

-p plays a .wav file you specify when it connects to a login server and is
   about to run the UO client.

-o specifies how long (in seconds) to wait before pressing the OK button if
   the UO Patch program displays a welcome message. Defaults to 5 seconds.

-l determines how long (in seconds) to wait before launching UO after finding
   a server that is up and accepting connections.

-n Does not launch the UO Client if the servers are up.  This allows UOMON to
   keep on polling continually for updated status information.

Examples:

UOMON -o 0 -t 5 -d 1 -l 0 -p \windows\media\tada.wav

UOMON -timeout 4 -delay 5 -launch 10 -play woohoo.wav -ok 10

Common Error Messages:
----------------------

TIMED OUT
  One of the operations during the login attempt have timed out, meaning
  UOMon did not recieve a reply or a proper response within the time allowed.

REFUSED
  The request to open a socket to the UO Login Server was refused.  This means
  the particular login server is down.

GAME UP
  The game server is up!  UOMonitor will double-check another login server to 
  make absolutely sure the game is really up before launching UO.

GAME DOWN
  The LoginServers are accepting connections, but no game servers are active.

Feel free to send any questions and/or comments to me via e-mail (not ICQ!)

Robert Simpson (Monitor Dragon)
Programmer at Large
Black Castle Software, LLC
Phx, AZ
http://www.primenet.com/~simpson
mailto:simpson@primenet.com


Revision History

v1.16
-----
OSI altered their login servers again and broke UOMON <again>.  This
fixes it, and adds several new servers to the "Watch Server" list.  This
version is merely a patch until I finish a much nicer version that'll
have a new look and some more features.

UOMON no longer needs to be in the same directory as the UO game.

v1.15
-----
More changes by OSI!  They asked me to make some polling changes, one of
which removes the randomization of the login servers, and now only polls
a single login server to get status information.  Thus some of the
functionality necessary to handle multiple login servers has been removed,
and the screen adjusted accordingly.

v1.14
-----
OSI made some LoginServer changes, which required updates to UOMON.  One of
the changes is that the amount of time the game has been up/down has been 
removed from the result codes UOMON receives.  Therefore UOMON can no longer
display how long the game has been up or down.

v1.13
-----
Altered the display slightly to accomodate more game servers

v1.12
-----
Lined up all the servers, their status and time values so they're easier to
read.

Modified the "Only pay attention to xxx server" so that you can manually enter
any servername, so I don't have to keep adding them and re-releasing it.

v1.11
-----
Modified the server names to reflect recent OSI changes.  Added Great Lakes.

v1.10
-----
Many enhancements to the GUI, including new options, a Configure Screen,
a taskbar icon and several other enhancements.

Fixes the registry of UO if it is reporting the wrong ExePath.  It will
bring up a dialog if you have this error, and offer to fix it for you.

v1.09
-----
Altered the timeout behavior when the servers are down.  This version will
divide the number of down servers by the total timeout of 60 seconds, to get
the timeout value for polling the next server.  This means that if one
server is down, the timeout will only be 15 seconds until it polls the next
server.  If the next one is down, the timeout is 20 seconds, then 30
seconds, and then finally 60 seconds before the next poll if all servers are
down.  This way if only one server is reporting the game down, UOMON will
not force you to wait 60 seconds to poll the next server.

Made it impossible for more than one instance of UOMON to be running at a
time.

UOMON no longer tampers with any registry setting, and no longer runs the 
patch program before polling.  I originally did this to prevent UOMON from
polling the wrong login servers, but OSI has apparently stopped tampering
with the LOGIN.CFG so I am going back to the "old" style UOMON.


v1.08
-----
Since the client chooses a LoginServer IP/Port at random from the LOGIN.CFG,
and because Mr. Mike at OSI ask me, I have randomized the polling of servers
in this version.

Added a built-in double-check of another LoginServer if one reports the game
being up.  TWO LOGIN SERVERS MUST REPORT THE GAME UP before UOMON will launch
the game!  This will hopefully reduce the "false alarms" people are getting.

Removed the -D parameter as obsolete with the new randomizing code in effect.

v1.07a
------
Quick-fix to repair possible registry problems if people ran UOMON outside of
the UO directory, then ran it again INSIDE the directory....

Added a -N parameter to have UOMON poll without launching the client.

v1.07
-----
Dramatically altered the code in cooperation with OSI to poll the UO game
servers and obtain status information.  Unfortunately the method being used
does not specifically emulate a completed login procedure, and therefore is
not 100% reliable in theory...Thus far however, it has proven to be completely
reliable.

v1.06
-----
(internal release)

v1.05
-----
I discovered that if you set a socket to Async and attempt a connect(), it
will not detect if a connection was refused.  As a matter of fact, select()
reports the socket as writeable!  After the outage on 7-30 when UOMon reported
running Login servers and the client reported unsuccessful logins, I found the
problem and made the code corrections.  UOMon is now more reliable than ever!

v1.04
-----
Change the order of business due to the fact that Origin tends to change the
login server IP addresses during the patching process.  I thought it would be
best if the UO Monitor first ran the patch program before polling for login
servers.  This way the most accurate login servers are polled.

v1.03
-----
Enhanced command-line support

Added .WAV playing capability when the server comes up

Enhanced the logic behind the parsing of the login.cfg file so it properly
handles the alternate login method

Presses the OK button on the Welcome Message window

v1.02
-----
Un-sorted the listbox, so the UOMonitor cycles through login servers as they
are listed in the LOGIN.CFG rather than in sorted order

Added command-line parameters to increase delay times and cycle delay times.

