/[james]/t2stats/qstatconv
ViewVC logotype

Contents of /t2stats/qstatconv

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations) (download)
Mon Jan 27 22:18:18 2003 UTC (21 years, 3 months ago) by james
File size: 666 byte(s)
Initial checkin.

1 #!/usr/bin/perl
2
3 $datetime = `date -u '+%Y%m%d/%H%M'`;
4 chomp $datetime;
5
6 $/ = '';
7 $sep = '\\\\';
8
9 while ($server = <>) {
10 chomp $server;
11 @data = split /\n/, $server;
12 ($type, $ip, $name, $map, $maxplayers, $players, $ping, $tries)
13 = split /$sep/, $data[0];
14 next if $type ne 'T2S';
15 next if $name eq 'TIMEOUT' or $name eq 'DOWN';
16 next if $map eq '?';
17 %detail = ('bot_count' => 0, 'game' => '?', 'mission' => '?');
18 foreach $detail (split /$sep/, $data[1]) {
19 ($key, $value) = split /=/, $detail, 2;
20 $detail{$key} = $value;
21 }
22 $players -= $detail{'bot_count'};
23
24 print "$datetime\t$detail{'game'}\t$detail{'mission'}\t$map\t$maxplayers\t$players\n";
25 }
26

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26