Mercurial > eagle-eye
diff spy.pl @ 305:ff8db948e1a1
list user and city name
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Wed, 10 Dec 2008 00:42:12 +0800 |
parents | b3b845d30d4b |
children | 8a69b96be376 |
line wrap: on
line diff
--- a/spy.pl Sun Dec 07 22:26:44 2008 +0800 +++ b/spy.pl Wed Dec 10 00:42:12 2008 +0800 @@ -6,6 +6,8 @@ use Decision::ParseTree q{ParseTree}; use YAML qw/LoadFile Dump DumpFile/; +Ikariam::Cities->has_a(user => 'Ikariam::User'); + our $i = new Ikariam($::server, $::user, $::pass); $i->login; # $i->check(); @@ -14,6 +16,9 @@ # $i->{'cities'}->{$city->{id}} = $city; my $spydata = $i->checkSafeHouse($city->{id}); foreach (keys(%{$spydata})) { + my $city = Ikariam::Cities->retrieve($_); + my $user = $city->user; + printf("%s %s\n", $user->name, $city->cityname); DumpFile("spy-$_-dump.yaml", $spydata->{$_}); } }