Mange tak! Nu virker det som det skal!
"Lars Christiansen" <lc@nospam.dixa.net> wrote in message
news:3b29b5aa$0$210$4d4eb98e@read.news.dk.uu.net...
> Det skyldes at du ikke har to (2) linieskift efter din Content-Type.
>
> -Lars
>
> Jimmy Marcus Larsen wrote:
>
> > Hej!
> >
> > Jeg har nogle problemer med et Perl-script jeg har hentet fra nettet.
Det
> > er et script der skal vise hvor mange spillere der er på en Counter
Strike
> > server.
> > Min Linux Apache server kommer med en "Internal Server Error 500" i
> > browseren når jeg forsøger at køre scriptet. I Apache's Error Log står
der
> > "Premature end of script headers". Hvad betyder det?
> > Jeg har et lille script der bare siger "testing 1, 2, 3" som virker fint
> > så jeg tror ik det er Apache's mod_perl modul der ik er konfigureret
> > korrekt.
> >
> > Her er scriptet som ik fungerer... Det er lidt langt
> >
> >
> > #!/usr/bin/perl -T
> > use POSIX qw(strftime);
> > use Net::hostent;
> > use Socket;
> >
> >
>
############################################################################
> > ####
> > # csserverstat.pl - A server info and log parser for Half-Life
> > Counter-Strike #
> > # servers.
> > #
> >
>
############################################################################
> > ####
> > #
http://server.counter-strike.net/csserverstat
> > #
> > # Version 1.06 #
> > # Modified 3/24/01 for new CS1.1 Logging format by Neo
> > #
> >
>
############################################################################
> > ####
> >
> >
> > # Set the path to your configuration file here. Make sure you use
forward
> > slashes, even if you are running Windows (i.e.
> > c:/wwwroot/cgi-bin/csserverstat.conf).
> >
> > $settings{configfile} = "/var/www/html/csserverstat/csserverstat.conf";
> >
> >
> >
>
############################################################################
> > ####
> > # Do not modify anything below this line!
> > #
> >
>
############################################################################
> > ####
> >
> > $settings{version} = "1.06";
> >
> > # Weapon display list.
> > %weaponlist = (
> > knife => "a Knife",
> > glock18 => "a Glock 18 9mm",
> > usp => "a H&K USP Tactical .45",
> > deagle => "a Desert Eagle .50",
> > p228 => "a Sig Sauer P-228 9mm",
> > elite => "a Beretta 96G Elite 9mm",
> > fiveseven => "a FN Five-Seven 5.7mm",
> > m3 => "a Bernelli M3 Super 90 12 gauge",
> > xm1014 => "a Bernelli XM1014 12 gauge",
> > mp5navy => "a H&K MP5/Navy 9mm",
> > tmp => "a Steyr Tactical Machine Pistol 9mm",
> > p90 => "a FN P90 5.7mm",
> > mac10 => "an Ingram Mac-10 9mm",
> > ump45 => "a H&K UMP .45",
> > awp => "an Arctic Warfare/Magnum (AWM) .338",
> > g3sg1 => "a H&K G3/SG-1 7.62mm",
> > scout => "a Steyr Scout 7.62mm",
> > aug => "a Steyr Aug 5.56mm",
> > m4a1 => "a Colt M4/A1 5.56mm",
> > sg550 => "a Sig SG-550 Sniper 5.56mm",
> > sg552 => "a Sig SG-552 Commando 5.56mm",
> > ak47 => "an AK47 7.62mm",
> > m249 => "a FN M-249 PARA 5.56mm",
> > grenade => "a High-Explosive Grenade",
> > );
> >
> > # This subrouting will replace any occurance of "<" or ">" with their
web
> > tag codes of "<" and ">", respectively.
> > sub TagFilter {
> > $_[0] =~ s/</</g;
> > $_[0] =~ s/>/>/g;
> > }
> >
> > # Get configuration pairs and place them in %settings.
> > if (!-f $settings{configfile}) {
> > print "Content-type: text/html\n\n<h3>Unable to open configuration
file
> > \"$settings{configfile}\".<p>Check your server's file and directory
> > permissions, as well as your\$configfile setting in
> > csserverstat.pl.</h3>";
> > exit;
> > }
> >
> > open(CONFIG,"$settings{configfile}");
> >
> > foreach $_ (<CONFIG>) {
> > chop;
> > s/^\s+//;
> > s/\s+$//;
> > next if /^$/;
> > next if /^#/;
> > s/\s*#.*//;
> > (my $setting,my $value) = split(/=/);
> > $setting =~ s/^\s+//;
> > $setting =~ s/\s+$//;
> > $value =~ s/^\s+//;
> > $value =~ s/\s+$//;
> > $settings{$setting} = $value;
> > }
> >
> > close CONFIG;
> >
> > # Check to see if all our path settings are ok.
> > if (!-f $settings{template}) {
> > print "Content-type: text/html\n\n<h3>Unable to open template
> > \"$settings{template}\".<p>Check your server's file and directory
> > permissions, as well as your \"template\" setting in
> > $settings{configfile}.</h3>";
> > exit;
> > }
> >
> > if (!-e $settings{logdir} and !-d $settings{logdir}) {
> > print "Content-type: text/html\n\n<h3>Unable to open directory
> > \"$settings{logdir}\".<p>Check your server's file and directory
> > permissions, as well as your \"logdir\" setting in
> > $settings{configfile}.</h3>";
> > exit;
> > }
> >
> > if (!-e $settings{qstatpath} or !-d $settings{qstatpath}) {
> > print "Content-type: text/html\n\n<h3>Unable to locate the QStat
> > directory, or \"$settings{qstatpath}\" is not a directory.<p>Check your
> > server's file and directory permissions, as well as your \"qstatpath\"
in
> > $settings{configfile}.</h3>";
> > exit;
> > }
> >
> > if ($settings{log_anal_url} and $settings{log_anal_path}) {
> >
> > if (!-e $settings{log_anal_path} or !-d $settings{log_anal_path}) {
> > print "Content-type: text/html\n\n<h3>Unable to open directory
> > \"$settings{log_anal_path}\".<p>Check your server's file and directory
> > permissions, as well as your \"log_anal_path\" setting in
> > $settings{configfile}.</h3>";
> > exit;
> > }
> >
> > }
> >
> > # Get configuration settings that were entered into the URL, if any.
> > $ENV{'REQUEST_METHOD'} =~ tr/a-z/A-Z/;
> >
> > if ($ENV{'REQUEST_METHOD'} eq "POST") {
> > read(STDIN, $in, $ENV{'CONTENT_LENGTH'});
> > } else {
> > $in = $ENV{'QUERY_STRING'};
> > }
> >
> > my @settings = split(/&/, $in);
> >
> > foreach my $settings (@settings) {
> > (my $setting, my $value) = split(/=/, $settings);
> > $setting =~ tr/+/ /;
> > $setting =~ s/%(..)/pack("C", hex($1))/eg;
> > $value =~ tr/+/ /;
> > $value =~ s/%(..)/pack("C", hex($1))/eg;
> > TagFilter($setting);
> > TagFilter($value);
> >
> > if ($setting eq "server") {
> > ($settings{serverip},$settings{serverport}) = split(/:/,$value);
> > }
> >
> > if ($setting eq "events") {
> > $settings{numevents} = $value;
> > }
> >
> > if ($setting eq "refresh") {
> > $settings{refresh} = $value;
> > }
> >
> > }
> >
> > # Get the local time.
> > $now = localtime;
> >
> > $tmp = gethost($settings{serverip});
> >
> > if ($tmp) {
> > $settings{serverip} = inet_ntoa($tmp->addr);
> > }
> >
> > # Determine the current log file.
> > opendir(LOGDIR,"$settings{logdir}");
> > @logdir = sort (grep (/$settings{serverip}/,readdir(LOGDIR)));
> > closedir(LOGDIR);
> > $settings{logfile} = pop(@logdir);
> >
> > # Read the current log file and look for defined events. We assume that
> > # the
> > file is readable since the script was able to view the directory to
figure
> > out which file to use.
> > open(LOGFILE,"$settings{logdir}/$settings{logfile}");
> > @logdata = grep ( /\>\" say/|
> > /\" say_team/|
> > /\" killed/|
> > /\" committed suicide with/|
> > /Touched_A_Hostage/|
> > /Rescued_A_Hostage/|
> > /Killed_A_Hostage/|
> > /killed a teammate/|
> > /Planted_The_Bomb/|
> > /Defused_The_Bomb/|
> > /Target_Bombed/|
> > /Bomb_Defused/|
> > /All_Hostages_Rescued/|
> > /Hostages_Not_Rescued/|
> > /VIP_Escaped/|
> > /VIP_Assasinated/|
> > /Terrorists_Win/|
> > /CTs_Win/|
> > /connected,/|
> > /\" disconnected/|
> > /Team "CT" scored/|
> > /Team "TERRORIST" scored/|
> > /joined team /
> > ,<LOGFILE>);
> > close(LOGFILE);
> >
> > # Don't go outside our allowable range for refresh and event display.
> > if ($settings{refresh} < $settings{minrefresh}) {
> > $settings{refresh} = $settings{minrefresh};
> > } else {
> > $settings{refresh} = $settings{defrefresh} unless $settings{refresh};
> > }
> >
> > if ($settings{numevents} > $settings{maxevents}) {
> > $settings{numevents} = $settings{maxevents};
> > } else {
> > $settings{numevents} = $settings{defevents} unless
$settings{numevents};
> > }
> >
> > # The majority of the URL for each event setting change link is the same
> > # and
> > is defined here for convenience.
> > $cgiurl =
> >
>
"refresh=$settings{refresh}&server=$settings{serverip}:$settings{serverport}
> > ";
> >
> > # Get game server, player, and rule information from QStat.
> > @qstatoptions = ("-R","-P","-tsw","-raw","!@#@!","-hls");
> > my($qstat) = open(QSTAT,"-|");
> > die "Couldn't open pipe to subprocess" unless defined($qstat);
> >
>
system("$settings{qstatpath}/qstat",@qstatoptions,"$settings{serverip}:$sett
> > ings{serverport}") or die "Couldn't exec qstat" if $qstat == 0;
> > @qstat = <QSTAT>;
> > close QSTAT;
> >
> > chomp(@qstat);
> > $serverstat = shift(@qstat);
> > $ruleslist = shift(@qstat);
> > @playerlines = @qstat;
> > ($type,$ip,$servername,$map,$maxplayers,$curplayers,$ping,$timeout) =
> > split(/!@#@!/,$serverstat);
> >
> > if (!-e "$settings{imagepath}\/$map.jpg") {
> > $mapimage = "default.jpg";
> > } else {
> > $mapimage = "$map.jpg";
> > }
> >
> > # If debug mode is on, place the %settings hash in $debug.
> > if ($settings{debug} == 1) {
> > $debug .= "<table cellspacing=\"0\" cellpadding=\"0\"
> > width=\"100%\">\n";
> >
> > foreach $setting (sort (keys %settings)) {
> > $debug .= "<tr><td nowrap><font size=\"1\"
> > color=\"#808080\">$setting</font></td><td><font size=\"1\"
> > color=\"#E0E0E0\"> = </font></td><td width=\"100%\"><font
> > size=\"1\" color=\"#E0E0E0\">$settings{$setting}</font></td></tr>\n";
> > }
> >
> > $debug .= "</table>\n<hr size=\"1\" width=\"100%\">";
> > }
> >
> > # If HLMaps is defined, link the map name and image to HLMaps. If HLMaps
> > # is
> > not defined but Log_Anal is, link the map name and image to Log_Anal.
> > Otherwise, leave it alone.
> > if ($settings{hlmaps}) {
> > $mapname = "<a href=\"$settings{hlmaps}?map=$map\">$map</a>";
> > } elsif ($settings{log_anal_url} and -f
> > "$settings{log_anal_path}/$map.$settings{log_anal_extension}") {
> > $mapname = "<a
> >
>
href=\"$settings{log_anal_url}/$map.$settings{log_anal_extension}\">$map</a>
> > ";
> > } else {
> > $mapname = $map;
> > }
> >
> > if ($settings{hlmaps}) {
> > $mapimage = "<a href=\"$settings{hlmaps}?map=$map\"><img class=\"map\"
> > src=\"$settings{imageurl}/$mapimage\" width=\"212\" height=\"160\"
> > alt=\"Current map is $map.\"></a>";
> > } elsif ($settings{log_anal_url} and -f
> > "$settings{log_anal_path}/$map.$settings{log_anal_extension}") {
> > $mapimage = "<a
> > href=\"$settings{log_anal_url}/$map.$settings{log_anal_extension}\"><img
> > class=\"map\" src=\"$settings{imageurl}/$mapimage\" width=\"212\"
> > height=\"160\" alt=\"Current map is $map.\"></a>";
> > } else {
> > $mapimage = "<img class=\"map\" src=\"$settings{imageurl}/$mapimage\"
> > width=\"212\" height=\"160\" alt=\"Current map is $map.\">";
> > }
> >
> > # Build the players list.
> > # Get the player list.
> > if (@playerlines) {
> >
> > while ($_ = shift @playerlines) {
> > ++$count1;
> > ($playername,$frags,$timeonserver) = split(/!@#@!/);
> >
> > # Sort the player list by frags.
> > push @playernamelist, $playername;
> > %playerlist = (
> > frags => $frags,
> > time => $timeonserver
> > );
> > for my $what (keys %playerlist) {
> > $player{$playername}{$what} = $playerlist{$what};
> > }
> >
> > }
> >
> > } else {
> >
> > push @playernamelist, "None connected!";
> > $player{"None connected!"}{time} = "00:00";
> > ++$count1;
> >
> > }
> >
> > sub byfrag {
> > $player{$b}{frags} <=> $player{$a}{frags};
> > }
> >
> > foreach $playername (sort byfrag @playernamelist) {
> > $frags = $player{$playername}{frags};
> > $timeonserver = $player{$playername}{time};
> > ($playerstats = $playername) =~ tr/\\\/\:\* \"\?\<\>\|\./_/;
> >
> > # Limit displayed player names to the maxplayername setting.
> > $playername =~ s/(^.{$settings{maxplayername}}(?!$))(.*$)/$1.../g;
> > TagFilter($playername);
> >
> > # Format the time on server display.
> > ($hours,$minutes,$seconds) = split(/:/,$timeonserver);
> >
> > if ($hours eq "00") {
> > $hours = "";
> > $minutes =~ s/0//;
> > } else {
> > $hours = $hours.":";
> > $hours =~ s/0//;
> > }
> >
> > if ($minutes eq "0") {
> > $minutes = "";
> > } else {
> > $minutes = $minutes.":";
> > }
> >
> > $playerinfo .= "<tr><td class=\"playerlist\" nowrap><font
> > size=\"1\"> ";
> >
> > # If any admins are present indicate them.
> > foreach my $admin (split/,/,$settings{admins}) {
> > $admin =~ s/^\s+//;
> > $admin =~ s/\s+$//;
> > TagFilter($admin);
> > if ($playername eq $admin) {
> > $playername = "$playername<font class=\"admin\">•</font>";
> > }
> > }
> >
> > # If Log_Anal is defined, link each players name to their personal stats
> > page. Otherwise, just print their name.
> > if ($settings{log_anal_url} and -f
> > "$settings{log_anal_path}/$playerstats.$settings{log_anal_extension}") {
> > $playerinfo .= "<a
> >
>
href=\"$settings{log_anal_url}/$playerstats.$settings{log_anal_extension}\">
> > $playername</a></font></td>";
> > } else {
> > $playerinfo .= "$playername</font></td>";
> > }
> >
> > $playerinfo .= "<td class=\"playerlist\" align=\"right\"><font
> > size=\"1\"> $frags </font></td>";
> > $playerinfo .= "<td class=\"playerlist\" align=\"right\" nowrap><font
> > size=\"1\"> $hours$minutes$seconds </font></td></tr>\n";
> >
> > }
> >
> > # Show blank lines up to the server's maxplayer setting. Looks nice.
> > while ($count1 < $maxplayers) {
> > ++$count1;
> > $playerinfo .= "<tr><td class=\"playerlist\" colspan=\"3\"><font
> > size=\"1\"> </td></tr>\n";
> > }
> >
> > # Build the rules list.
> > # Get and format the rules list.
> > foreach (sort(split /!@#@!/, $ruleslist)) {
> > ($rule,$value) = split(/=/);
> > TagFilter($rule);
> > TagFilter($value);
> >
> > if ($value eq 0) {
> > $value = "<font color=\"#303030\">•</font>";
> > } elsif ($value eq 1) {
> > $value = "<font color=\"#009900\">•</font>";
> > }
> >
> > if ($rule eq "sv_contact") {
> > $value = "<a href=\"mailto:$value\">$value</a>";
> > }
> >
> > if ($rule eq "mp_mapvoteratio") {
> > $value = $value*100; $value = "$value%";
> > }
> >
> > if (($rule eq "gamename") && ($value eq "CounterStrike")) {
> > $value = "<a href=\"
http://www.counter-strike.net\">CounterStrike";
> > }
> >
> > if (($rule eq "sv_os") && ($value eq "linux")) {
> > $value = "<a href=\"
http://www.linux.org\">Linux";
> > } elsif (($rule eq "sv_os") && ($value eq "windows")) {
> > $value = "<a href=\"
http://www.microsoft.com/windows\">Windows";
> > }
> >
> > # Defines which rules to show.
> > if ( /mp_mapvoteratio/ or
> > /mp_forcechasecam/ or
> > /mp_tkpunish/ or
> > /mp_autoteambalance/ or
> > /mp_limitteams/ or
> > /mp_autokick/ or
> > /mp_c4timer/ or
> > /sv_os/ or
> > /mp_roundtime/ or
> > /mp_flashlight/ or
> > /mp_friendlyfire/ or
> > /mp_timelimit/ or
> > /sv_maxrate/ or
> > /sv_minrate/ or
> > /sv_cheats/ or
> > /sv_type/ or
> > /mp_hostagepenalty/ or
> > /mp_footsteps/ or
> > /gamename/ or
> > /sv_contact/ ) {
> > ++$count2;
> > $rulesinfo .= "<tr><td class=\"ruleslist\"><font
> > size=\"1\"> $rule</font></td>";
> > $rulesinfo .= "<td class=\"ruleslist\" align=\"right\" nowrap><font
> > size=\"1\">$value </font></td></tr>\n";
> > }
> >
> > }
> >
> > # Make the rules list at least as big as the player list if it isn't
> > already. Looks nice.
> > while ($count2 < $count1) {
> > ++$count2;
> > $rulesinfo .= "<tr><td class=\"ruleslist\" colspan=\"3\"><font
> > size=\"1\"> </td></tr>\n";
> > }
> >
> > # Build the events list
> > # Grab the last x events according to what $numevents is set to.
> > while ($popcount < $settings{numevents}) {
> > ++$popcount;
> > my $newlogdata = pop @logdata;
> > push @newlogdata, $newlogdata;
> > }
> >
> > # If enabled, reverse the event order so that new events are on top.
> > if ($settings{reverse_order} == "1") {
> > @logdata = @newlogdata;
> > } else {
> > @logdata = reverse (@newlogdata);
> > }
> >
> > # This is where the log file data gets parsed out to HTML.
> > foreach $_ (@logdata) {
> >
> > # If debug is on, $eventinfo .= the raw log file message.
> > if ($settings{debug} == 1) {
> > ++$messagecount;
> > $eventinfo .= "<tr><td bgcolor=\"#D0D0D0\"></td>";
> > $eventinfo .= "<td colspan=\"2\" bgcolor=\"#D0D0D0\"><font size=\"1\"
> > color=\"#303030\">$_</font></td></tr>";
> > }
> >
> > # Print player chat messages.
> > # Updated for New Logging Format.
> > if (/\>\" say/) {
> > (undef,$_) = split(/L.*: \"/);
> > ($player,$message) = split(/\" say "/);
> > @PlayerInfo = split(/\</,$player);
> > $player = $PlayerInfo[0];
> > $message =~ s/\"//;
> > $message =~ s/\s+$//;
> > TagFilter($player);
> > TagFilter($message);
> >
> > # Remove words in the banword list.
> > foreach my $banword (split/,/,$settings{banwords}) {
> > $banword =~ s/^\s+//;
> > $banword =~ s/\s+$//;
> > $message =~ s/\Q$banword/<font
> > size="1">•••••<\/font>/i;
> > }
> >
> > $eventinfo .= "<tr><td class=\"chat\" width=\"16\"><img
> > src=\"$settings{imageurl}/chat.gif\" width=\"16\" height=\"16\"
> > alt=\"Message from $player\"></td>";
> > $eventinfo .= "<td class=\"chat\" width=\"25%\" nowrap><font
> > size=\"1\">$player </font></td>";
> > $eventinfo .= "<td class=\"chat\" width=\"75%\" width=\"100%\"><font
> > size=\"2\">$message</font></td></tr>\n";
> > }
> > # If team_messages is set to 1, show them.
> > # Updated for New Logging Format.
> > if (/\" say_team/) {
> > if ($settings{team_messages} == "1") {
> > (undef,$_) = split(/L.*: \"/);
> > ($player,$message) = split(/\" say_team "/);
> > @PlayerInfo = split(/\</,$player);
> > $player = $PlayerInfo[0];
> > $message =~ s/\"//;
> > $message =~ s/\s+$//;
> > TagFilter($player);
> > TagFilter($message);
> > # Remove words in the banword list.
> > foreach my $banword (split/,/,$settings{banwords}) {
> > $banword =~ s/^\s+//;
> > $banword =~ s/\s+$//;
> > $message =~ s/\Q$banword/<font
> > size="1">•••••<\/font>/i;
> > }
> >
> > $eventinfo .= "<tr><td class=\"teamchat\" width=\"16\"><img
> > src=\"$settings{imageurl}/chat.gif\" width=\"16\" height=\"16\"
> > alt=\"Message from $player\"></td>";
> > $eventinfo .= "<td class=\"teamchat\" width=\"25%\" nowrap><font
> > size=\"1\">$player </font></td>";
> > $eventinfo .= "<td class=\"teamchat\" width=\"75%\"
width=\"100%\"><font
> > size=\"2\">$message</font></td></tr>\n";
> > }
> > }
> >
> > # Print kill messages where another player is the cause.
> > # Updated for New Logging Format.
> > if (/\" killed/) {
> > (undef,$_) = split(/L.*: \"/);
> > ($killer,$_) = split(/\" killed \"/);
> > ($killed,$weapon) = split(/\" with "/);
> > @KillerInfo = split(/\</, $killer);
> > @KilledInfo = split(/\</, $killed);
> > ($killerteam,$_) = split(/\>/, $KillerInfo[3]);
> > ($killedteam,$_) = split(/\>/, $KilledInfo[3]);
> > $killer = $KillerInfo[0];
> > $killed = $KilledInfo[0];
> > $weapon =~ s/\s+$//;
> > $weapon =~ s/\"//;
> > ($killerstats = $killer) =~ tr/\\\/\:\* \"\?\<\>\|\./_/;
> > ($killedstats = $killed) =~ tr/\\\/\:\* \"\?\<\>\|\./_/;
> > TagFilter($killer);
> > TagFilter($killed);
> >
> > # Seperate out kills against Counter-Terrorists
> > # Updated for New Logging Format.
> > if (($killerteam eq "CT") and ($killedteam eq "TERRORIST")) {
> > $eventinfo .= "<tr><td class=\"terrorist\" width=\"16\"><img
> > src=\"$settings{imageurl}/kill.gif\" width=\"16\" height=\"16\"
> > alt=\"$killer killed $killed\"></td>";
> >
> > # If Log_Anal is defined, link each players name to their personal stats
> > page. Otherwise, just print their name.
> > if ($settings{log_anal_url} and -f
> > "$settings{log_anal_path}/$killerstats.$settings{log_anal_extension}") {
> > $killer = "<a
> >
>
href=\"$settings{log_anal_url}/$killerstats.$settings{log_anal_extension}\">
> > $killer</a>";
> > }
> >
> > if ($settings{log_anal_url} and -f
> > "$settings{log_anal_path}/$killedstats.$settings{log_anal_extension}") {
> > $killed = "<a
> >
>
href=\"$settings{log_anal_url}/$killedstats.$settings{log_anal_extension}\">
> > $killed</a>";
> > }
> >
> > $eventinfo .= "<td class=\"terrorist\" width=\"25%\" nowrap><font
> > size=\"1\">$killer </font></td>";
> > $eventinfo .= "<td class=\"terrorist\" width=\"75%\"><font
> > size=\"2\">killed $killed with ";
> >
> > # If Log_Anal is defined, link the weapon name to the weapon stats.
> > if ($settings{log_anal_url} and -f
> > "$settings{log_anal_path}/$weapon.$settings{log_anal_extension}") {
> > $eventinfo .= "<a
> >
>
href=\"$settings{log_anal_url}/$weapon.$settings{log_anal_extension}\">$weap
> > onlist{$weapon}</a></font></td></tr>\n";
> > } else {
> > $eventinfo .= "$weaponlist{$weapon}</font></a></td></tr>\n";
> > }
> >
> > }
> >
> > # Seperate out kills against Terrorists
> > # Updated for new Logging Format.
> > if (($killerteam eq "TERRORIST") and ($killedteam eq "CT")) {
> > $eventinfo .= "<tr><td class=\"ct\" width=\"16\"><img
> > src=\"$settings{imageurl}/kill.gif\" width=\"16\" height=\"16\"
> > alt=\"$killer killed $killed\"></td>";
> >
> > # If Log_Anal is defined, link each players name to their personal stats
> > page. Otherwise, just print their name.
> > if ($settings{log_anal_url} and -f
> > "$settings{log_anal_path}/$killerstats.$settings{log_anal_extension}") {
> > $killer = "<a
> >
>
href=\"$settings{log_anal_url}/$killerstats.$settings{log_anal_extension}\">
> > $killer</a>";
> > }
> >
> > if ($settings{log_anal_url} and -f
> > "$settings{log_anal_path}/$killedstats.$settings{log_anal_extension}") {
> > $killed = "<a
> >
>
href=\"$settings{log_anal_url}/$killedstats.$settings{log_anal_extension}\">
> > $killed</a>";
> > }
> >
> > $eventinfo .= "<td class=\"ct\" width=\"25%\" nowrap><font
> > size=\"1\">$killer </font></td>";
> > $eventinfo .= "<td class=\"ct\" width=\"75%\"><font size=\"2\">killed
> > $killed with ";
> >
> > # If Log_Anal is defined, link the weapon name to the weapon stats.
> > if ($settings{log_anal_url} and -f
> > "$settings{log_anal_path}/$weapon.$settings{log_anal_extension}") {
> > $eventinfo .= "<a
> >
>
href=\"$settings{log_anal_url}/$weapon.$settings{log_anal_extension}\">$weap
> > onlist{$weapon}</a></font></td></tr>\n";
> > } else {
> > $eventinfo .= "$weaponlist{$weapon}</font></a></td></tr>\n";
> > }
> >
> > }
> > # Seperate out teammate kills
> > # Added for New Logging Format.
> > if ($killerteam eq $killedteam){
> > $eventinfo .= "<tr><td class=\"system\" width=\"16\"><img
> > src=\"$settings{imageurl}/teamkill.gif\" width=\"16\" height=\"16\"
> > alt=\"$killer killed a teammate\"></td>";
> > $eventinfo .= "<td class=\"system\" width=\"25%\" nowrap><font
> > size=\"1\">$killer</font></td>";
> > $eventinfo .= "<td class=\"system\" width=\"75%\"><font
> > size=\"2\">Killed a teammate</font></td></tr>\n";
> > }
> >
> > }
> >
> > # Print kill messages where the player kills themself.
> > # Updated for New Logging Format.
> > if (/\" committed suicide with/) {
> > (undef,$_) = split(/L.*: \"/);
> > ($killed,$cause) = split(/\<.*\>\" committed suicide with "/);
> > $cause =~ s/\s+$//;
> > $cause =~s/\"//;
> > TagFilter($killed);
> > $eventinfo .= "<tr><td class=\"system\" width=\"16\"><img
> > src=\"$settings{imageurl}/kill.gif\" width=\"16\" height=\"16\"
> > alt=\"$killed committed suicide\"></td>";
> > $eventinfo .= "<td class=\"system\" width=\"25%\" nowrap><font
> > size=\"1\">$killed</font></td>";
> > $eventinfo .= "<td class=\"system\" width=\"75%\"><font
> > size=\"2\">committed suicide with $cause</font></td></tr>\n";
> > }
> >
> > # Print hostage touch messages.
> > # Updated for New Logging Format.
> > if (/Touched_A_Hostage/) {
> > (undef,$_) = split(/L.*: \"/);
> > ($groper) = split(/\<.*\>\" triggered/);
> > $eventinfo .= "<tr><td class=\"ct\" width=\"16\"><img
> > src=\"$settings{imageurl}/hostage.gif\" width=\"16\" height=\"16\"
> > alt=\"$groper touched a hostage\"></td>";
> > $eventinfo .= "<td class=\"ct\" width=\"25%\" nowrap><font
> > size=\"1\">$groper</font></td>";
> > $eventinfo .= "<td class=\"ct\" width=\"75%\"><font size=\"2\">Touched
a
> > hostage</font></td></tr>\n";
> > }
> >
> > # Print hostage rescue messages.
> > # Updated for New Logging Format.
> > if (/Rescued_A_Hostage/) {
> > (undef,$_) = split(/L.*: \"/);
> > ($rescuer) = split(/\<.*\>\" triggered/);
> > TagFilter($rescuer);
> > $eventinfo .= "<tr><td class=\"ct\" width=\"16\"><img
> > src=\"$settings{imageurl}/hostage.gif\" width=\"16\" height=\"16\"
> > alt=\"$rescuer rescued a hostage\"></td>";
> > $eventinfo .= "<td class=\"ct\" width=\"25%\" nowrap><font
> > size=\"1\">$rescuer</font></td>";
> > $eventinfo .= "<td class=\"ct\" width=\"75%\"><font size=\"2\">Rescued
a
> > hostage</font></td></tr>\n";
> > }
> >
> > # Print hostage kill messages.
> > # Updated for New Logging Format.
> > if (/Killed_A_Hostage/) {
> > (undef,$_) = split(/L.*: \"/);
> > ($killer) = split(/\<.*\>\" triggered/);
> > TagFilter($killer);
> > $eventinfo .= "<tr><td class=\"terrorist\" width=\"16\"><img
> > src=\"$settings{imageurl}/hostage.gif\" width=\"16\" height=\"16\"
> > alt=\"$killer killed a hostage\"></td>";
> > $eventinfo .= "<td class=\"terrorist\" width=\"25%\" nowrap><font
> > size=\"1\">$killer</font></td>";
> > $eventinfo .= "<td class=\"terrorist\" width=\"75%\"><font
> > size=\"2\">Killed a hostage</font></td></tr>\n";
> > }
> >
> > # Print bomb plant messages.
> > # Updated for New Logging Format.
> > if (/Planted_The_Bomb/) {
> > (undef,$_) = split(/L.*: \"/);
> > ($planter) = split(/\<.*\>\" triggered/);
> > TagFilter($planter);
> > $eventinfo .= "<tr><td class=\"terrorist\" width=\"16\"><img
> > src=\"$settings{imageurl}/bomb.gif\" width=\"16\" height=\"16\"
> > alt=\"$planter planted the bomb\"></td>";
> > $eventinfo .= "<td class=\"terrorist\" width=\"25%\" nowrap><font
> > size=\"1\">$planter</font></td>";
> > $eventinfo .= "<td class=\"terrorist\" width=\"75%\"><font
> > size=\"2\">Planted the bomb</font></td></tr>\n";
> > }
> >
> > # Print bomb defuse messages.
> > # Updated for New Logging Format.
> > if (/Defused_The_Bomb/) {
> > (undef,$_) = split(/L.*: \"/);
> > ($defuser) = split(/\<.*\>\" triggered/);
> > TagFilter($defuser);
> > $eventinfo .= "<tr><td class=\"ct\" width=\"16\"><img
> > src=\"$settings{imageurl}/bomb.gif\" width=\"16\" height=\"16\"
> > alt=\"$defuser defused the bomb\"></td>";
> > $eventinfo .= "<td class=\"ct\" width=\"25%\" nowrap><font
> > size=\"1\">$defuser</font></td>";
> > $eventinfo .= "<td class=\"ct\" width=\"75%\"><font size=\"2\">Defused
> > the
> > bomb</font></td></tr>\n";
> > }
> >
> > # Print all hostages rescued messages.
> > if (/All_Hostages_Rescued/) {
> > (undef,$_) = split(/L.*: \"/);
> > $eventinfo .= "<tr><td class=\"ct\" width=\"16\"><img
> > src=\"$settings{imageurl}/hostage.gif\" width=\"16\" height=\"16\"
> > alt=\"All hostages rescued\"></td>";
> > $eventinfo .= "<td class=\"ct\" width=\"100%\" colspan=\"2\"><font
> > size=\"1\">All hostages rescued</font></td></tr>\n";
> > $eventinfo .= "<tr><td width=\"100%\" colspan=\"3\"><img
> > src=\"$settings{imageurl}/trans.gif\" width=\"1\"
> > height=\"1\"></td></tr>";
> > $eventinfo .= "<tr><td class=\"system\" width=\"16\"><img
> > src=\"$settings{imageurl}/info.gif\" width=\"16\" height=\"16\"
> > alt=\"Counter-Terrorists Win\"></td>";
> > $eventinfo .= "<td class=\"system\" width=\"100%\" colspan=\"3\"><font
> > size=\"1\">Round result: <b>Counter-Terrorists
> > Win</b></font></td></tr>\n";
> > }
> >
> > # Print hostages not rescued message.
> > # Updated for New Logging Format
> > if (/Hostages_Not_Rescued/) {
> > (undef,$_) = split(/L.*: /);
> > @RoundInfo = split(/\(/,$_);
> > $ctscore = $RoundInfo[1];
> > $terroristscore = $RoundInfo[2];
> > $ctscore =~ s/CT//;
> > $terroristscore =~ s/T//;
> > $ctscore =~ s/\"//;
> > $ctscore =~ s/\"//;
> > $terroristscore =~ s/\"//;
> > $terroristscore =~ s/\"//;
> > $ctscore =~ s/\)//;
> > $terroristscore =~ s/\)//;
> > $ctscore =~ s/ //;
> > $ctscore =~ s/ //;
> > $terroristscore =~ s/\ //;
> > $terroristscore =~ s/\s+$//;
> > $eventinfo .= "<tr><td class=\"terrorist\" width=\"16\"><img
> > src=\"$settings{imageurl}/hostage.gif\" width=\"16\" height=\"16\"
> > alt=\"Hostages not rescued\"></td>";
> > $eventinfo .= "<td class=\"terrorist\" width=\"100%\"
colspan=\"2\"><font
> > size=\"1\">Hostages not rescued</font></td></tr>\n";
> > $eventinfo .= "<tr><td width=\"100%\" colspan=\"3\"><img
> > src=\"$settings{imageurl}/trans.gif\" width=\"1\"
> > height=\"1\"></td></tr>";
> > $eventinfo .= "<tr><td class=\"system\" width=\"16\"><img
> > src=\"$settings{imageurl}/info.gif\" width=\"16\" height=\"16\"
> > alt=\"Terrorists Win\"></td>";
> > $eventinfo .= "<td class=\"system\" width=\"100%\" colspan=\"3\"><font
> > size=\"1\">Round result: <b>Terrorists Win! Terrorists: $terroristscore
> > CTs: $ctscore</b></font></td></tr>\n";
> > }
> >
> > # Print target successfully bombed messages.
> > # Updated for New Logging Format
> > if (/Target_Bombed/) {
> > (undef,$_) = split(/L.*: /);
> > @RoundInfo = split(/\(/,$_);
> > $ctscore = $RoundInfo[1];
> > $terroristscore = $RoundInfo[2];
> > $ctscore =~ s/CT//;
> > $terroristscore =~ s/T//;
> > $ctscore =~ s/\"//;
> > $ctscore =~ s/\"//;
> > $terroristscore =~ s/\"//;
> > $terroristscore =~ s/\"//;
> > $ctscore =~ s/\)//;
> > $terroristscore =~ s/\)//;
> > $ctscore =~ s/ //;
> > $ctscore =~ s/ //;
> > $terroristscore =~ s/\ //;
> > $terroristscore =~ s/\s+$//;
> > $eventinfo .= "<tr><td class=\"terrorist\" width=\"16\"><img
> > src=\"$settings{imageurl}/bomb.gif\" width=\"16\" height=\"16\"
> > alt=\"Target successfully bombed\"></td>";
> > $eventinfo .= "<td class=\"terrorist\" width=\"100%\"
colspan=\"2\"><font
> > size=\"1\">Target successfully bombed</font></td></tr>\n";
> > $eventinfo .= "<tr><td width=\"100%\" colspan=\"3\"><img
> > src=\"$settings{imageurl}/trans.gif\" width=\"1\"
> > height=\"1\"></td></tr>";
> > $eventinfo .= "<tr><td class=\"system\" width=\"16\"><img
> > src=\"$settings{imageurl}/info.gif\" width=\"16\" height=\"16\"
> > alt=\"Terrorists Win\"></td>";
> > $eventinfo .= "<td class=\"system\" width=\"100%\" colspan=\"3\"><font
> > size=\"1\">Round result: <b>Terrorists Win! Terrorists: $terroristscore
> > CTs: $ctscore</b></font></td></tr>\n";
> > }
> >
> > # Print bomb sucessfully defused messages.
> > # Updated for New Logging Format
> > if (/Bomb_Defused/) {
> > (undef,$_) = split(/L.*: /);
> > @RoundInfo = split(/\(/,$_);
> > $ctscore = $RoundInfo[1];
> > $terroristscore = $RoundInfo[2];
> > $ctscore =~ s/CT//;
> > $terroristscore =~ s/T//;
> > $ctscore =~ s/\"//;
> > $ctscore =~ s/\"//;
> > $terroristscore =~ s/\"//;
> > $terroristscore =~ s/\"//;
> > $ctscore =~ s/\)//;
> > $terroristscore =~ s/\)//;
> > $ctscore =~ s/ //;
> > $ctscore =~ s/ //;
> > $terroristscore =~ s/\ //;
> > $terroristscore =~ s/\s+$//;
> > $eventinfo .= "<tr><td class=\"ct\" width=\"16\"><img
> > src=\"$settings{imageurl}/bomb.gif\" width=\"16\" height=\"16\"
alt=\"Bomb
> > successfully defused\"></td>";
> > $eventinfo .= "<td class=\"ct\" width=\"100%\" colspan=\"2\"><font
> > size=\"1\">Bomb successfully defused</font></td></tr>\n";
> > $eventinfo .= "<tr><td width=\"100%\" colspan=\"3\"><img
> > src=\"$settings{imageurl}/trans.gif\" width=\"1\"
> > height=\"1\"></td></tr>";
> > $eventinfo .= "<tr><td class=\"system\" width=\"16\"><img
> > src=\"$settings{imageurl}/info.gif\" width=\"16\" height=\"16\"
> > alt=\"Counter-Terrorists Win\"></td>";
> > $eventinfo .= "<td class=\"system\" width=\"100%\" colspan=\"2\"><font
> > size=\"1\">Round result: <b>Counter-Terrorists Win! CTs: $ctscore
> > Terrorists: $terroristscore</b></font></td></tr>\n";
> > }
> >
> > # Print VIP escape messages.
> > # Updated for New Logging Format
> > if (/VIP_Escaped/) {
> > (undef,$_) = split(/L.*: /);
> > @RoundInfo = split(/\(/,$_);
> > $ctscore = $RoundInfo[1];
> > $terroristscore = $RoundInfo[2];
> > $ctscore =~ s/CT//;
> > $terroristscore =~ s/T//;
> > $ctscore =~ s/\"//;
> > $ctscore =~ s/\"//;
> > $terroristscore =~ s/\"//;
> > $terroristscore =~ s/\"//;
> > $ctscore =~ s/\)//;
> > $terroristscore =~ s/\)//;
> > $ctscore =~ s/ //;
> > $ctscore =~ s/ //;
> > $terroristscore =~ s/\ //;
> > $terroristscore =~ s/\s+$//;
> > $eventinfo .= "<tr><td class=\"ct\" width=\"16\"><img
> > src=\"$settings{imageurl}/vip.gif\" width=\"16\" height=\"16\" alt=\"VIP
> > Escaped\"></td>";
> > $eventinfo .= "<td class=\"ct\" width=\"100%\" colspan=\"2\"><font
> > size=\"1\">VIP escaped</font></td>";
> > $eventinfo .= "<tr><td width=\"100%\" colspan=\"3\"><img
> > src=\"$settings{imageurl}/trans.gif\" width=\"1\"
> > height=\"1\"></td></tr>";
> > $eventinfo .= "<tr><td class=\"system\" width=\"16\"><img
> > src=\"$settings{imageurl}/info.gif\" width=\"16\" height=\"16\"
> > alt=\"Counter-Terrorists Win\"></td>";
> > $eventinfo .= "<td class=\"system\" width=\"100%\" colspan=\"2\"><font
> > size=\"1\">Round result: <b>Counter-Terrorists Win! CTs: $ctscore
> > Terrorists: $terroristscore</b></font></td></tr>\n";
> > }
> >
> > # Print VIP assassination messages.
> > # Updated for New Logging Format
> > if (/VIP_Assasinated/) {
> > (undef,$_) = split(/L.*: /);
> > @RoundInfo = split(/\(/,$_);
> > $ctscore = $RoundInfo[1];
> > $terroristscore = $RoundInfo[2];
> > $ctscore =~ s/CT//;
> > $terroristscore =~ s/T//;
> > $ctscore =~ s/\"//;
> > $ctscore =~ s/\"//;
> > $terroristscore =~ s/\"//;
> > $terroristscore =~ s/\"//;
> > $ctscore =~ s/\)//;
> > $terroristscore =~ s/\)//;
> > $ctscore =~ s/ //;
> > $ctscore =~ s/ //;
> > $terroristscore =~ s/\ //;
> > $terroristscore =~ s/\s+$//;
> > $eventinfo .= "<tr><td class=\"terrorist\" width=\"16\"><img
> > src=\"$settings{imageurl}/vip.gif\" width=\"16\" height=\"16\" alt=\"VIP
> > Assassinated\"></td>";
> > $eventinfo .= "<td class=\"terrorist\" width=\"100%\"
colspan=\"2\"><font
> > size=\"1\">VIP assassinated</font></td>";
> > $eventinfo .= "<tr><td width=\"100%\" colspan=\"3\"><img
> > src=\"$settings{imageurl}/trans.gif\" width=\"1\"
> > height=\"1\"></td></tr>";
> > $eventinfo .= "<tr><td class=\"system\" width=\"16\"><img
> > src=\"$settings{imageurl}/info.gif\" width=\"16\" height=\"16\"
> > alt=\"Terrorists Win\"></td>";
> > $eventinfo .= "<td class=\"system\" width=\"100%\" colspan=\"2\"><font
> > size=\"1\">Round result: <b>Terrorists Win! Terrorists: $terroristscore
> > CTs: $ctscore</b></font></td></tr>\n";
> > }
> >
> > # Print Terrorists Win messages.
> > # Updated for New Logging Format
> > if (/Terrorists_Win/) {
> > (undef,$_) = split(/L.*: /);
> > @RoundInfo = split(/\(/,$_);
> > $ctscore = $RoundInfo[1];
> > $terroristscore = $RoundInfo[2];
> > $ctscore =~ s/CT//;
> > $terroristscore =~ s/T//;
> > $ctscore =~ s/\"//;
> > $ctscore =~ s/\"//;
> > $terroristscore =~ s/\"//;
> > $terroristscore =~ s/\"//;
> > $ctscore =~ s/\)//;
> > $terroristscore =~ s/\)//;
> > $ctscore =~ s/ //;
> > $ctscore =~ s/ //;
> > $terroristscore =~ s/\ //;
> > $terroristscore =~ s/\s+$//;
> > $eventinfo .= "<tr><td class=\"terrorist\" width=\"16\"><img
> > src=\"$settings{imageurl}/info.gif\" width=\"16\" height=\"16\"
> > alt=\"Terrorists Win\"></td>";
> > $eventinfo .= "<td class=\"terrorist\" width=\"100%\"
colspan=\"2\"><font
> > size=\"1\">Terrorists Win!</font></td>";
> > $eventinfo .= "<tr><td width=\"100%\" colspan=\"3\"><img
> > src=\"$settings{imageurl}/trans.gif\" width=\"1\"
> > height=\"1\"></td></tr>";
> > $eventinfo .= "<tr><td class=\"system\" width=\"16\"><img
> > src=\"$settings{imageurl}/info.gif\" width=\"16\" height=\"16\"
> > alt=\"Terrorists Win\"></td>";
> > $eventinfo .= "<td class=\"system\" width=\"100%\" colspan=\"2\"><font
> > size=\"1\">Round result: <b>Terrorists Win! Terrorists: $terroristscore
> > CTs: $ctscore</b></font></td></tr>\n";
> > }
> >
> > # Print CTs Win messages.
> > if (/CTs_Win/) {
> > (undef,$_) = split(/L.*: /);
> > @RoundInfo = split(/\(/,$_);
> > $ctscore = $RoundInfo[1];
> > $terroristscore = $RoundInfo[2];
> > $ctscore =~ s/CT//;
> > $terroristscore =~ s/T//;
> > $ctscore =~ s/\"//;
> > $ctscore =~ s/\"//;
> > $terroristscore =~ s/\"//;
> > $terroristscore =~ s/\"//;
> > $ctscore =~ s/\)//;
> > $terroristscore =~ s/\)//;
> > $ctscore =~ s/ //;
> > $ctscore =~ s/ //;
> > $terroristscore =~ s/\ //;
> > $terroristscore =~ s/\s+$//;
> > $eventinfo .= "<tr><td class=\"ct\" width=\"16\"><img
> > src=\"$settings{imageurl}/info.gif\" width=\"16\" height=\"16\"
alt=\"CT's
> > Win!\"></td>";
> > $eventinfo .= "<td class=\"ct\" width=\"100%\" colspan=\"2\"><font
> > size=\"1\">CTs Win!</font></td>";
> > $eventinfo .= "<tr><td width=\"100%\" colspan=\"3\"><img
> > src=\"$settings{imageurl}/trans.gif\" width=\"1\"
> > height=\"1\"></td></tr>";
> > $eventinfo .= "<tr><td class=\"system\" width=\"16\"><img
> > src=\"$settings{imageurl}/info.gif\" width=\"16\" height=\"16\"
> > alt=\"Counter-Terrorists Win\"></td>";
> > $eventinfo .= "<td class=\"system\" width=\"100%\" colspan=\"2\"><font
> > size=\"1\">Round result: <b>Counter-Terrorists Win! CTs: $ctscore
> > Terrorists: $terroristscore</b></font></td></tr>\n";
> > }
> > # Print player connect messages.
> > # Updated for New Logging Format
> > if (/ connected/) {
> > (undef,$_) = split(/L.*: \"/);
> > ($player,$_) = split(/connected, /);
> > @PlayerInfo = split(/\</, $player);
> > $player = $PlayerInfo[0];
> > TagFilter($player);
> > $eventinfo .= "<tr><td class=\"system\" width=\"16\"><img
> > src=\"$settings{imageurl}/conn.gif\" width=\"16\" height=\"16\"
> > alt=\"$player joined the server\"></td>";
> > $eventinfo .= "<td class=\"system\" width=\"25%\"><font
> > size=\"1\">$player</font></td>";
> > $eventinfo .= "<td class=\"system\" width=\"75%\"><font
size=\"2\">joined
> > the server</font></td></tr>\n";
> > }
> >
> > # Print player disconnect messages.
> > # Updated for new Logging format
> > if (/\" disconnected/) {
> > (undef,$_) = split(/L.*: \"/);
> > ($player,$_) = split(/\" disconnected/);
> > @PlayerInfo = split(/\</,$player);
> > $player = @PlayerInfo[0];
> > TagFilter($player);
> > $eventinfo .= "<tr><td class=\"system\" width=\"16\"><img
> > src=\"$settings{imageurl}/disconn.gif\" width=\"16\" height=\"16\"
> > alt=\"$player left the server\"></td>";
> > $eventinfo .= "<td class=\"system\" width=\"25%\"><font
> > size=\"1\">$player</font></td>";
> > $eventinfo .= "<td class=\"system\" width=\"75%\"><font size=\"2\">left
> > the
> > server</font></td></tr>\n";
> > }
> >
> > # Print player team join messages.
> > # Updated for New Logging Format.
> > if (/ joined team /) {
> > (undef,$_) = split(/L.*: \"/);
> > ($player,$team) = split(/ joined team /);
> > @PlayerInfo = split(/\</,$player);
> > $team =~ s/\s+$//;
> > $team =~ s/\"//;
> > $team =~ s/\"//;
> > $player = $PlayerInfo[0];
> > TagFilter($player);
> > if ($team eq "CT") {
> > $eventinfo .= "<tr><td class=\"ct\" width=\"16\"><img
> > src=\"$settings{imageurl}/info.gif\" width=\"16\" height=\"16\"
> > alt=\"$player joined the Counter-Terrorist team\"></td>";
> > $eventinfo .= "<td class=\"ct\" width=\"25%\"><font
> > size=\"1\">$player</font></td>";
> > $eventinfo .= "<td class=\"ct\" width=\"75%\"><font size=\"2\">joined
> > the
> > Counter-Terrorist team</font></td></tr>\n";
> > }
> > if ($team eq "TERRORIST") {
> > $eventinfo .= "<tr><td class=\"terrorist\" width=\"16\"><img
> > src=\"$settings{imageurl}/info.gif\" width=\"16\" height=\"16\"
> > alt=\"$player joined the Terrorist team\"></td>";
> > $eventinfo .= "<td class=\"terrorist\" width=\"25%\"><font
> > size=\"1\">$player</font></td>";
> > $eventinfo .= "<td class=\"terrorist\" width=\"75%\"><font
> > size=\"2\">joined the Terrorist team</font></td></tr>\n";
> > }
> > }
> >
> > # Print team scores.
> > # Seperate out Counter-Terrorist wins.
> > # Updated for New Logging Format
> > if (/Team "CT" scored/) {
> > (undef,$_) = split(/L.*: /);
> > @GameInfo = split(/\"/,$_);
> > $eventinfo .= "<tr><td class=\"system\" width=\"16\"><img
> > src=\"$settings{imageurl}/info.gif\" width=\"16\" height=\"16\"
> > alt=\"Counter-Terrorist Wins\"></td>";
> > $eventinfo .= "<td class=\"system\" width=\"100%\" colspan=\"2\"><font
> > size=\"1\">Counter-Terrorist Wins: <b>Scored $GameInfo[3] with
> > $GameInfo[5] Players</b></font></td></tr>\n";
> > }
> >
> > # Seperate out Terrorist wins.
> > # Updated for New Logging Format
> > if (/Team "TERRORIST" scored/) {
> > (undef,$_) = split(/L.*: /);
> > @GameInfo = split(/\"/,$_);
> > $eventinfo .= "<tr><td class=\"system\" width=\"16\"><img
> > src=\"$settings{imageurl}/info.gif\" width=\"16\" height=\"16\"
> > alt=\"Terrorist Wins\"></td>";
> > $eventinfo .= "<td class=\"system\" width=\"100%\" colspan=\"2\"><font
> > size=\"1\">Terrorist Wins: <b>Scored $GameInfo[3] with $GameInfo[5]
> > Players</b></font></td></tr>\n";
> > $eventinfo .= "<tr><td width=\"100%\" colspan=\"3\"><img
> > src=\"$settings{imageurl}/trans.gif\" width=\"1\"
> > height=\"1\"></td></tr>"; }
> > }
> >
> > # Output to the web browser
> > print "Content-type: text/html\n\n";
> > print "<!-- generated by csserverstat -
> >
http://server.counter-strike.net/csserverstat -->\n\n";
> >
> > open(TEMPLATE,"$settings{template}");
> >
> > foreach $_ (<TEMPLATE>) {
> > $_ =~ s/(\$\w+\{\w+\})/$1/eeg;
> > $_ =~ s/(\$\w+)/$1/eeg;
> > print $_;
> > }
> >
> > close(TEMPLATE);
> >
> > # End script.
> > exit;
> >
> >
> >
>