+#! /usr/bin/perl
+# Does something to Ogame combat reports... Don't really care anymore
+
+use strict;
+
+my $input;
+
+open (CREPORT, $input = "index.php.html") ||
+ die ("Could not open file: $!");
+# print ("File opened\n");
+
+open (CROUT, ">tmp");
+
+#local $/;
+
+my $atacker;
+my $defender;
+
+my $day;
+my $month;
+
+
+while (<CREPORT>) {
+# Getting atacker and defender names
+ if (/>(.*)\ vs.\ (.*)</o){
+ $atacker = $1;
+ $defender = $2;
+ }
+
+# getting the date
+ if (/(\d{2})\.(\d{2})\.\d{4}/o) {
+ $day = $1;
+ $month = $2;
+ }
+
+# removing coords
+# s/\[(\d+):(\d+):(\d+)\]/x:xxx:xx/g;
+ s/<a.*\/a>/<a>[x:xxx:xx]<\/a>/;
+
+ if (/<tr>[ \t\n]*<td>Weapons.*Armour.*<\/tr>/m) {
+ print STDERR ("yep\n");
+ }
+
+ print CROUT;
+}
+
+close(CREPORT); close(CROUT);
+
+my $output = "$month.$day $atacker -vs- $defender.html";
+
+rename ("tmp", "$output") ||
+ die ("Could not create file $output");
+unlink ($input);
+
+print ("$input renamed as $output\n");