NAME

Games::Quake::Log - information gleaned from the output of a Quake2 DM log

SYNOPSIS

my $q_log = Games::Quake::Log->new($log_file_with_dir_path_if_necessary);

my %kills        = %{ $q_log->kills        };
my %suicides     = %{ $q_log->suicides     };
my %game         = %{ $q_log->game         };
my %time_in_gmae = %{ $q_log->time_in_game };
my %frequency    = %{ $q_log->frequency    };

DESCRIPTION

This module parses the log file generated by Quake2 from one of the standard logging mods. (Personally, I use sl_dm.)

When instansiated with a log file, you can ask for certain information. This is all the information that the log file has. So, if you want to make stats, just rearrange into different ways!

kills

my %kills = %{ $q_log->kills };

This returns a hash, in the following format: $kills{$gameid}{$victor}{$victim}{$weapon} = $total_kills

game

my %game = %{ $q_log->game };

This returns a hash in the following format: $game{$gameid}{$game_flag} = $value

suicides

my %suicides = %{ $q_log->suicides };

This returns a hash in the following format: $suicides{$gameid}{$who}{$how_they_killed_themselves} = $total

time_in_game

my %time_in_game = %{ $q_log->time_in_game };

This returns a hash in the following format: $time_in_game{$gameid}{$who}{'time'} = $time_in_secs

frequency

my %freq = %{ $q_log->frequency };

This returns a hash in the following format: $freq{$gameid}{$when_in_game} = ($victor, $victim)

number_of_games

my $number_of_games = $q_log->number;

Self-evident, really.

BUGS

A few bizarre things happen sometimes.

TODO

Extend to cope with other mods, like CTF et al.

SUPP INFO

This is the 'return-a-hash' version of this module. I originally wrote it with Class::DBI so I could store all the info in a mySQL database for a bit of persistence. If you want that version, mail me and I can send it on, with table definitions and everything!

AUTHOR

 StrayToaster <quake@stray-toaster.co.uk>