Deathmatch Database GSLogMod UDP Logging Application

version 1.00.0001	(beta) Copyright 1999, Rockn-Roll@PlanetQuake.com

This is a Windows Application designed to be run on Windows NT 4.0 SP4, although it is compatible with NT SP3 and Windows 95/98.

How to use it:
Install it on your web server and copy the test.mdb and dmdb.asp files to a folder in your web site...usually off of the inetpub\wwwroot folder for example c:\inetpub\wwwroot\dmdb.  Start up the program from the Start menu at the bottom left of your screen: Start|Programs|Deathmatch Database|GSLogMod UDP.  The program starts up connected to port 28000, database C:\Program Files\DMDBGSLogMod_UDP\test.mdb with no passwords, no logon required (logon=false), and process logging to C:\Program Files\DMDBGSLogMod_UDP\process.log.  Click on the tools menu, or right click on a connection to modify the Port, Database, Logon, and Log settings for the currently selected connection.  These settings are saved when you close the program by clicking the top right X box of the window, however you can save them from the file menu at any time, plus if you want to exit without saving use the Exit selection from the File menu.  A backup of your previous connection.cfg file is created each time the settings are saved.  A new connection is automatically saved when it is completely set up.  

Next notify a Quake2 server of your IP address and the port you have set for the connection and have them add the GSLogMod to their mod list.  The GSLogMod ver 1.2a gamex86.dll (beta) Copyright 1999, Mark Davies is available in this zip file.  The easiest way to use this mod is to make a copy of the baseq2 folder and name it gslog then replace the gamex86.dll with the gamex86.dll from this zip file.  More information is available by sending an email to the discussion group at mailto:sl-general@egroups.com

Here are the new cvars for the game server:

set sl_log_method 2			//binary number bits can be added: bit1=log to file, bit2=log to udp, bit3=log to tcp:  for example: 0=no log, 1=log to file only, 2=log to udp only , 3=log to both file and udp, 4=log to tcp/ip, 7=log to file, udp, and tcp.
set sl_filename   "Test.log"		//filename for logfile
set sl_udp_dest   "1.1.1.1:28000"	//IP address where logs are sent via tcp/ip...this will be the IP and Port of the connection settings.
set sl_tcp_dest   "1.1.1.1:28000"	//IP address where logs are sent...this is not used with the DMDBGSLogMod_UDP application.
set sl_log_style  1			//0=version 1.2, 1=version 1.2a
set sl_udp_buffer_size 4096		//This sets the size of in text lines of the buffer for log entries.  Logs are automatically sent when this number of lines is reached.
set sl_log_flush 1			//0=default sending (log sent when buffer is full), 1=force sending log at map change (the flushing preferred by log parsers), 2=force sending at every log entry (the necessary flushing required for real-time tournament displays)

sl_server_info  = "$HOST_NAME$ $HOST_IP$ cheats fraglimit game gamedate gamedir gamename hostname maxclients timelimit version port ip"	//This list of Cvars are included with each packet to identify the server and game...the $HOST_NAME$ is the machine name and $HOST_IP$ is the network IP.  The $HOST_NAME$ is useful for lan games while the hostname cvar is more useful for internet games.  IMPORTANT!!! $HOST_IP$, hostname, AND port MUST BE INCLUDED IN THE sl_server_info LIST OR THE LOG WILL NOT BE SCORED.

sl_client_info  = "motto ip skin"	//This list of Cvars is included at the end of each packet to identify the players.  Each player can add a motto to their autoexec.cfg file: (set motto "Their Motto" u) without the parentheses.  The motto will be used as a password to identify the player.  IMPORTANT!!! PLAYERS NOT USING THEIR MOTTO WILL NOT HAVE THEIR SCORES ADDED TO THEIR DEATHMATCH DATABASE RANKING.  PLAYERS WITHOUT A REGISTERED MOTTO WILL HAVE ALL THEIR SCORES ADDED TO THEIR DEATHMATCH DATABASE RANKING.  The motto is there to protect the players from malicious abuse by impersonators attempting to sabotage a player's rankings...so take full advantage of this new feature and register your motto with the deathmatch database .

For more information visit: http://www.planetquake.com/gslogmod
and also http://www.planetquake.com/thecoven/death

Once you have the logs flowing in you can view the data tables using the dmdb.asp file included with this beta installation.  However, since the database represents a complete relational database the actual user interface for a web site to display the information would be a web application using extensive VBScript and HTML.  A complete web application will be made availabe for use (not for distribution) at http://www.gamespy.com when beta testing has proved successful.  

What does it do?
DMDBGSLogMod_UDP binds to a port on the local machine where it is running.  It then waits for any incomming data on that port.  Once it receives something it calls an included ActiveX component which scores the game.  The ActiveX component reads the log and creates a score table for each map played.  This score table can be read by an Active Server Page on the NT Server's Web Site to display rankings and other statistics on the game...or even play the whole game back frag by frag.  A test ASP file is included.  This beta version currently has been only been tested with MS Access and SQL Server Databases...other DBMS's will be support if there is a demand for them.

What Port does it bind to?
It initially binds to port 28000 by default, however it can be changed from the Tools menu...as can the database where logs and scores are kept and the process log which provides up-to-date information on how many ActiveX components are running.

What if I need help or have suggestions?
Contact Rockn-Roll@PlanetQuake.com
Also check the web page at http://www.planetquake.com/gslogmod and subscibe and browse the information in the sl-general discussion group at egroups.com

I'll be working on an online help system for this program...

For now here's the guts:

What gets installed:  
Default install folder is c:\Program Files\DMDBGSLogMod_UDP\

DMDBGSLogMod_UDP.exe	This is the main VB program with user interface to manage connections, databases, and log files.
Score_Game.dll		This is an ActiveX dll with no user interface.  A new copy of this is launched every time a log is received.
test.mdb			This is a Microsoft Access Database to use as a starter logging database, it contains no tables since the program creates them as needed.

Details on what happens when the exe is run:

It first checks for the location of the registered dll and uses that folder to read a text file named connections.cfg.
If it can't find the dll then program aborts.
If it can't find the text file then it assumes defaults of:
	Port=28000
	Database=Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=C:\Program Files\DMDBGSLogMod_UDP\test.mdb
	Logon=False
	Log=C:\Program Files\DMDBGSLogMod_UDP\Process.log
then saves these settings in a new connections.cfg file.  User passwords and other logon information is not saved to the connection file nor is it displayed on screen for security reasons.
It then binds to a port and waits for data.
When it receives data it starts up a Score_Game.dll.

The Score_Game.dll component reads the log, if Raw Logging (File menu) is checked (default during beta testing) then an exact copy of what is received is sent to a file named logout.log located in the folder where the application is installed...default is c:\Program Files\DMDBGSLogMod_UDP\logout.log.  This log file could grow at the rate of 1MB per week so if it gets too big then you can delete it.  It's main use if for debugging during this beta release.  If you don't want this file to grow then uncheck the Raw Log selection in the File menu.  You can add logout=0 as a command line parameter to keep it from being checked when you start up the program.  It then updates tables in the database from the server cvars and creates a new table with all the log entries for player scores then updates the player cvars and finally exits.  A log of when the component starts and stops is written to a text file specified by the Log line in the connections.cfg file.

You can add, modify, and delete connections from the main window...to save the settings use the file menu save configuration option.  To exit without saving use the File|Exit menu selection.