# HG changeset patch # User Matti Hamalainen # Date 1327689575 -7200 # Node ID cbbef11d7cac9377ad22183017b544fb55cfcc29 # Parent c7e066bb192991aa62319631350260aae6294f08 Add support for parsing 'whereami' output with global coordinates. diff -r c7e066bb1929 -r cbbef11d7cac log2template.pl --- a/log2template.pl Fri Dec 23 02:33:35 2011 +0200 +++ b/log2template.pl Fri Jan 27 20:39:35 2012 +0200 @@ -223,13 +223,13 @@ if ($s =~ /^You prod (.+?) like a stray cow\.$/o) { # Get 'short name' $$mob{"sname"} = $1; - } elsif ($s =~ /^You are in '.*?' in (.+?) on the continent of ([A-Z][a-z]+). \(Coordinates: (\d+)x, (\d+)y\)$/o) { + } elsif ($s =~ /^You are in '.*?' in (.+?) on the continent of ([A-Z][a-z]+). \(Coordinates: (\d+)x, (\d+)y(; Global: \d+x, \d+y)?\)$/o) { # Area, continent $$mob{"area"} = $1; $$mob{"continent"} = $2; $$mob{"xc"} = $3; $$mob{"yc"} = $4; - } elsif ($s =~ /^You are in '.*?', which is on the continent of ([A-Z][a-z]+). \(Coordinates: (\d)+x, (\d)+y\)$/o) { + } elsif ($s =~ /^You are in '.*?', which is on the continent of ([A-Z][a-z]+). \(Coordinates: (\d)+x, (\d)+y(; Global: \d+x, \d+y)?\)$/o) { # Area, continent $$mob{"area"} = $1; $$mob{"continent"} = $1;