
Stats                ~ Quake World log parser ~                by Goran Koruga


1. What is this ?

A little program to parse log file generated by Quake World server. As a
result of its processing it creates 4 HTML files:
   - rank.html   (sorted on Rank)
   - eff.html    (sorted on Efficiency)
   - frags.html  (sorted on Frags)
   - deaths.html (sorted on Deaths)


2. What does it support ?

So far it supports these messages from log-file:

 * = supports
 o = no support yet

 *  Teaboy EATS x.gurgeh's pineapple
 *  Anal-Intruder-2 ACCEPTS א's discharge
 *  [GSEH].Pecker RIDES Idaho's rocket
 *  Teaboy WAS GIBBED BY x.gurgeh's grenade
 *  StoneDog CHEWED ON CFU_Strychnine's boomstick
 *  xiphos WAS NAILED BY fucker_knuckles
 *  Bomber. WAS PUNCTURED BY X.Guardian
 *  xiphos WAS TELEGRAFED BY fucker_knuckles
 *  StoneDog ATE 2 LOADS OF Teaboy's buckshot

 o  nemesis DIED
 *  CFU_Strychnine TRIES TO PUT the pin back in
 *  StoneDog VISITS THE VOLCANO God
 *  X.Bagpuss's486 BURST INTO FLAMES
 *  [GSEH].Pecker WAS SQUISHED
 *  Idaho TURNED INTO HOT slag
 *  X.Bagpuss's486 BECOMES BORED WITH life
 *  fucker_knuckles DISCHARGES INTO THE water
 *  X.Bagpuss's486 SUCKS IT DOWN
 *  X.Bagpuss's486 SLEEPS WITH THE fishes

 We might be in big trouble because server logs what people talk to each
 other. So someone says 'nemesis died', server logs 'Faker: nemesis died',
 program finds ' died' string and adds 'Faker: nemesis' as new person!!!
 I have no idea how to get rid of such things, maybe server has an option
 not to log what people talk about.


3. How does it handle Quake's weird names ?

Excellent :^). As of version 1.0pl01 it translates all of Quake's names to
look exactly the same in WWW browser. Of course there are some exceptions,
like very weird chars have no their "representative" in HTML specification.
If you happen to know how to get around this I will change it of course.
Chars that are printed differently are:
5,14,15,28,133,142,143 and 156 ==> .
1-4,6-13,29-32,128-132,139-140 and 157-160 ==> ' '
141 ==> >
157 and 255 ==> <


4. How to compile it ?

On Un*x :        "cc -O -o stats stats.c"
With DJGPP/DOS : "gcc -O2 -o stats stats.c"


5. Keeping track of users all the time

As of version 1.0pl01 Stats saves info about users to file so you don't need
to keep adding to log file all the time (also parsing of log file is quite a
bit faster because of this). Info is saved to file called "stats.tmp" which
is then renamed to "stats.qwp" (upon success that is - so you don't loose
old info if something goes wrong). Old info file is renamed to "stats.bak".


6. Options

They are implemented by reading file "stats.cfg". For more info on this
subject read "USINGIT".


7. Using it

"stats log_file" where log_file is log created by your Quake World
server. Read "USINGIT" for more detailed descriptions of how to use it.


8. Credits

Many credits go to Paul Ryder for "asking" me to write this parser for him
and for being patient with beta (and buggy) versions of Stats.


9. Misc

Author: Goran Koruga      [Mail: Goran.Koruga@snet.fri.uni-lj.si]

Legal crap:

   THIS SOFTWARE IS PROVIDED BY AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
   EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
   TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

In other words you may freely distribute this package but make sure it is
distributed in it's original form (it should include all these files :
stats.c, stats.h, TODO, CHANGES, USINGIT, stats.txt, stats.cfg and two sample
files : header.html and footer.html).
Author is not responsible for its behavior.
