/**
 *    This file is part of "Liberty Gaming NQ Stats Analyzer".
 *
 *    "Liberty Gaming NQ Stats Analyzer" is free software; you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation; either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    "Liberty Gaming NQ Stats Analyzer" is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */



==================
Short description
==================

Liberty Gaming NQ Stats Analyzer was developed for parse Enemy Territory (tm)
NoQuarter game server logs and display results in human-friendly format.
This software is Open Source and was released under the Terms and Conditions of
GPL License: http://www.gnu.org/licenses/gpl.html



=================
Before you begin
=================

Installation of this software requires some basic knowledges in
server administration and shell scripting. If you are not familiar with that, then
ask someone to help you or refer to Liberty Gaming support forums at:
http://www.liberty-gaming.org/



=============
Requirements
=============

 - PHP 4.3.3 or later
 - MySQL 4.0.15 or later
 - Enemy Territory (tm) server with NoQuarter mod version 1.1.1



=============
Installation
=============

1. Open file config.inc.php with your favorite text editor and edit appropriate
   settings.

2. Create database tables from file etstats.sql (for example, using phpMyAdmin
   or MySQL command line client).



==========================
Game server configuration
==========================

In order to get Liberty Gaming NQ Stats Analyzer work propertly, you must add
following lines to the end of your noquarter.cfg file:

set g_log "etserver.log"
set g_logsync 1
set g_logOptions 384

IMPORTANT: after you copied server log file into ./data directory you must empty
the source file in order to avoid double stats. You can find an example shell
script called "synclogs.sh" in this packege. Edit that script to fit your
requirements. That script can be called manually or using following crontab entry:

16 3 * * * /home/gameserver/scripts/synclogs.sh >/dev/null 2>&1



=======================
Running stats analyzer
=======================

After you copied log file into the ./data directory you can execute parser script
located in ./data directory and called parser.php. YOu can do that manually or
using crontab entry.

Calling parser script manually (replace "path_to_your_stats" with the real path to
stats analyzer):

/usr/local/bin/php -d max_execution_time=72000 -d open_basedir=/ -q /path_to_your_stats/data/parser.php

Calling parser script using crontab entry (replace "path_to_your_stats" with the
real path to stats analyzer, also check the path to php):

41 3 * * * cd /path_to_your_stats/data && /usr/local/bin/php -d max_execution_time=72000 -d open_basedir=/ -q /path_to_your_stats/data/parser.php >/dev/null 2>&1



========
Support
========

Need help? Visit Liberty Gaming forums at http://www.liberty-gaming.org/

