# HG changeset patch # User Matti Hamalainen # Date 1362107651 -7200 # Node ID c79dd30a368f219cbde125e1e25b318145e88809 # Parent b35c643a64d91c1eec7a45ff40a89bec791d6344 Cosmetics. diff -r b35c643a64d9 -r c79dd30a368f icesusplaque.pl --- a/icesusplaque.pl Sun Feb 24 19:28:02 2013 +0200 +++ b/icesusplaque.pl Fri Mar 01 05:14:11 2013 +0200 @@ -39,7 +39,7 @@ $line =~ s/[\r\n]+$//; if ($line =~ /^Server time: (.+)/) { $stamp = str2time($1); - } elsif ($state == 0 && $line =~ /^\| +The top 150 players of Icesus +lvl +Exp +\|/) { + } elsif ($state == 0 && $line =~ /^\| +The top \d+ players of Icesus +lvl +Exp +\|/) { $state = 1; } elsif ($state == 1 && $line =~ /^\| +(\d+) +([A-Z][a-z]+) +(\d+) +([0-9][0-9,]+) +\|/) { my ($pos, $name, $level, $exp) = ($1, $2, $3, $4); @@ -162,7 +162,8 @@ if ($opt_plaque) { $sbar = $shead = sprintf "| %-10s | %-12s | %-10s | %-30s |", "Pos", "Name", "Lvl", "Exp"; - $sbar =~ s/./-/g; + $sbar =~ tr/\|/+/; + $sbar =~ s/[^\+]/-/g; print "" . scalar localtime($$p0{0})." to ".scalar localtime($$p1{0})." (".get_period($$p1{0} - $$p0{0}).")\n". "$sbar\n$shead\n$sbar\n"; @@ -177,7 +178,8 @@ if ($opt_topexp) { $sbar = $shead = sprintf "| %-15s | %7s | %-15s | %-15s |", "Exp gain", "% (*)", "Total exp", "Name"; - $sbar =~ s/./-/g; + $sbar =~ tr/\|/+/; + $sbar =~ s/[^\+]/-/g; print "" . scalar localtime($$p0{0})." to ".scalar localtime($$p1{0}). " (".get_period($$p1{0} - $$p0{0}).")\n" unless ($opt_plaque);