<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2719.2200" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello everyone!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have been working on the programs and&nbsp;am 
happy to report that the server component is finished and it appears to be 
stable after the last batch of tests I have run.&nbsp; The client program is 
also functional, but I am going to work on it a little more before I release 
anything just to be sure I worked out most of the kinks.&nbsp; In the meantime, 
I figured it might be a good idea to let everyone know some more of the 
technical details.&nbsp; This way if anyone has any ideas, comments, questions, 
or criticisms I can address them before I release the code.&nbsp; Hopefully this 
will make it a better utility in the long run.&nbsp; Having said that, here is a 
list of the loader's features:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>-&nbsp;Configuration file</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; On startup, a configuration file 
is read to provide the loader with information needed to operate the game server 
and the loader itself.&nbsp; This is where the command to launch MOHAA is 
located along with several other settings that adjust how the loader 
operates.&nbsp; If you are running more than one server on a system, they should 
each have their own config file specified on the command line.&nbsp; Below is a 
copy of the configuration file I am currently using:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#<BR>#&nbsp; MOHAA Loader Configuration 
File<BR>#<BR>#&nbsp; - All characters after a "#" on a line are comments and 
will be ignored.<BR>#&nbsp; - All blank lines will be ignored.<BR>#&nbsp; - The 
only option that must be specified in this file is PROGRAM.&nbsp; 
Without<BR>#&nbsp;&nbsp;&nbsp; it, the loader cannot operate.&nbsp; All other 
settings have defaults already<BR>#&nbsp;&nbsp;&nbsp; specified within the 
loader itself.<BR>#</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#<BR># Specify the fully qualified path to the game 
server program including all<BR># command line options.<BR>#<BR>PROGRAM = 
/usr/local/games/MOHAA/mohaa_lnxded +set dedicated 1 +set cheats 0 +set 
ui_console 1 +set g_gametype 2 +set sv_maxclients 18 +set developer 2 +map 
dm/mohdm1 +exec server.cfg</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#<BR># Specify message broadcast interval in 
seconds.<BR>#<BR>MSG_INTERVAL = 300<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>#<BR># Specify if messages are to be printed.&nbsp; 
Setting this to anything other than<BR># "Y" will suppress message output to the 
server.&nbsp; Normal processing will<BR># continue regardless of how this is 
set.<BR>#<BR>MSG_PRINT = Y</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#<BR># Specify limit of how many lines of the total 
message to print during each<BR># broadcast.&nbsp; Setting this to any value 
less than "1" will not impose any limit<BR># at all.&nbsp; Values of "1" or 
greater will cause the number of lines specified by<BR># this value to print 
with the appropriate MSG_LINE_DELAY between each line.<BR># Once the limit has 
been reached, the program will pause for the number of<BR># seconds indicated by 
MSG_INTERVAL.<BR>#<BR>MSG_LINE_LIMIT = 0</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#<BR># Specify the amount of time to wait between 
printing each line in seconds.<BR>#<BR>MSG_LINE_DELAY = 0<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>#<BR># Specify server broadcast message 
content.&nbsp; Each line of text must begin with<BR># the text "MSG_LINE" and 
will be broadcast in the order it appears here.&nbsp; If<BR># you want to split 
broadcasts into logical groups using the MSG_LINE_LIMIT<BR># setting but don't 
want to print content for all possible lines in a given<BR># grouping, use a 
null line:<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e.g.&nbsp; MSG_LINE = 
NULL<BR># The line will count towards the limit, but not be 
printed.<BR>#<BR>MSG_LINE = Welcome to RAGNAROK!&nbsp; Server IP: 
216.42.80.176<BR>MSG_LINE = Server Admin email: <A 
href="mailto:shockwave@clanshortfuse.com">shockwave@clanshortfuse.com</A><BR>MSG_LINE 
= No Realism.&nbsp; Friendly Fire OFF.&nbsp; Have fun and fight 
honorably.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#<BR># Ban messages can be tailored by using the 
BAN_MSG_START and BAN_MSG_END<BR># config variables.&nbsp; The START component 
will be printed before the player's<BR># name and the END component will be 
printed after the player's name.&nbsp; After<BR># the player has been kicked, 
the message will be assembled and sent to the<BR># 
console.<BR>#<BR></DIV></FONT>
<DIV><FONT face=Arial size=2>#<BR># Specify start text of ban 
message.<BR>#<BR>BAN_MSG_START =</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#<BR># Specify end text of ban 
message.<BR>#<BR>BAN_MSG_END =</FONT></DIV>
<DIV>&nbsp;</DIV><FONT face=Arial size=2>
<DIV><BR>#####################<BR>#<BR># E O F<BR>#</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; The configuration file is re-read after each message 
interval has elapsed to provide for the ability to change every setting with the 
exception of PROGRAM.&nbsp; Simply use a text editor and make whatever changes 
you require and they will be picked up&nbsp;during the next message cycle, 
whether you have opted to broadcast anything or not.</DIV>
<DIV>&nbsp;&nbsp;&nbsp; I spent some time thinking about how to handle server 
message broadcasts and I tried to develop a structure that would be both easy to 
use and flexible.&nbsp; I have tested every combination I could think of and 
everything runs smoothly.&nbsp; If the explanation given in the configuration 
file of how it all works&nbsp;still leaves anyone with questions,&nbsp;please 
let me know.&nbsp; Also, if anyone requires message handling that this system 
doesn't support I'd like to hear the specifics.</DIV>
<DIV></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>- Command line overrides</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; Options can be placed on the 
command line to override program defaults not handled by the configuration 
file.&nbsp; Here is the output generated by invoking the loader's --help 
option:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Usage: mohaa_loader [--host host] [--port port] 
[--cfg filename] [--log filename] [--ban 
filename]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mohaa_loader 
--defaults<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mohaa_loader 
--help</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
--host&nbsp;&nbsp; IP address or host name: name must resolve to an IP 
address<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
(e.g. localhost&nbsp; or&nbsp; 192.168.1.1&nbsp; or&nbsp; <A 
href="http://www.myserver.com">www.myserver.com</A>)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
--port&nbsp;&nbsp; port number<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
--cfg&nbsp;&nbsp;&nbsp; path to configuration file, including filename 
itself<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
(e.g.&nbsp; 
/usr/local/games/MOHAA/yourconfig.cfg)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
--log&nbsp;&nbsp;&nbsp; path to game server log file, including filename 
itself<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
(e.g.&nbsp; 
/usr/local/games/MOHAA/server.log)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
--ban&nbsp;&nbsp;&nbsp; path to banned IP file, including filename 
itself<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
(e.g.&nbsp; /usr/local/games/MOHAA/badboys.cfg)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
--defaults<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
prints current program defaults and 
exits<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
--help<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
prints this usage information and exits</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; As you can see, you have the 
ability to either share or specify&nbsp;different files for banned IP 
addresses.&nbsp; However, it is important to note that the log files and 
configuration files for each server you are running be separate and properly 
specified on the command line.&nbsp; Running the command with the --defaults 
option will dump the internal program defaults so you can see what the settings 
will be if they are not overridden either on the command line or in the 
configuration file.</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; I also want to take a moment and 
discuss the --host and --port options, specifically as they relate to system 
security.&nbsp; I have set the program default for&nbsp;--host to 
&nbsp;"localhost" because I didn't employ any encryption on the socket 
connections.&nbsp; Specifying an Internet address means that the socket will be 
exposed externally and that might not be the best idea.&nbsp; Personally, I use 
PuTTY&nbsp;(a free utility found here:&nbsp; <A 
href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">http://www.chiark.greenend.org.uk/~sgtatham/putty/</A>&nbsp;)&nbsp;to 
connect to the game server if I'm using a Windows system or "ssh" from the Linux 
shell prompt if I'm on a Linux system because the connection is encrypted.&nbsp; 
Once connected, I invoke the program I want to run by using the "screen" program 
(e.g. screen batch_file_that_starts_loader).&nbsp; This allows me to 
&lt;Ctrl&gt;&lt;A&gt;&lt;Ctrl&gt;&lt;D&gt; to detach from the process and keep 
it running.&nbsp; I can then disconnect and go about my business.&nbsp; To 
regain control, I ssh back into the server and issue the command "screen -r" to 
pick up the process.&nbsp; I can &lt;Ctrl&gt;&lt;C&gt; at any time while 
connected to the process to kill it entirely.&nbsp; I apologize if this is 
review for any of you, but I want to be sure I explain the situation 
thoroughly.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>- Game server by clients via sockets</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; The loader starts the game 
server using a piped open in order to feed input to the server process.&nbsp; 
Once the server is running, the loader forks processes to handle server 
messaging, monitoring output for kicking banned IP's, and servicing incoming 
client connections.&nbsp; If the client connection process receives a connection 
request, it forks two processes to handle input and output from the client 
respectively.&nbsp; Each additional client that connects will receive its own 
set of I/O processes as well.&nbsp; So far I have connected with two clients at 
the same time and everything worked well.&nbsp; The client program operates 
similarly and forks to accommodate I/O on separate processes.&nbsp; The result 
is&nbsp;smooth traffic flow without&nbsp;devouring large amounts of server 
resources.&nbsp;Unfortunately, I was unable to latch onto the output from the 
game server itself directly.&nbsp; Piped opens, IPC::Open2, and named pipes 
didn't seem to allow it much less facilitate good communications with clients 
attempting to connect to the loader.&nbsp; Therefore, server output is processed 
by opening filehandles to the server log and tailing it.&nbsp; The data&nbsp;is 
fed&nbsp;to the loader's input channel&nbsp;and subsequently out via sockets to 
each client connected.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>- Banned IP file handling</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; As I stated earlier, there is a 
process running whose job is solely to monitor server output and react 
accordingly.&nbsp; This is the process that watches for banned players.&nbsp; 
When a player connects, it re-reads the banned IP file and checks it against the 
players currently connected to the server.&nbsp; Upon getting a match, the 
player in question is kicked and a ban message is output to the 
server.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>======</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Well, that's about all I have for now.&nbsp; I've 
been a little short on sleep lately, so I apologize in advance for anything I 
may have omitted.&nbsp; Next on the list will be finishing off the client 
program so I can release everything to those who have expressed an interest in 
testing.&nbsp; Any feedback, technical or otherwise, is solicited.&nbsp; I want 
to make this a viable tool for all of us who are responsible 
for&nbsp;administrating Linux MOHAA game servers and the best way to do that is 
to maintain an open forum.&nbsp; Thanks for your time and I'll let everyone know 
when the client is finished.&nbsp; With any luck it will be either today or 
tomorrow.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Shockwave</FONT></DIV></BODY></HTML>