Mercurial > eagle-eye
comparison enemy_scores.pl @ 374:e551351b18de
updated for timestamp of scores information
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Tue, 14 Apr 2009 17:01:17 +0800 |
parents | cea21f99e56f |
children |
comparison
equal
deleted
inserted
replaced
373:dd3d76f43999 | 374:e551351b18de |
---|---|
17 | 17 |
18 my ($u) = Ikariam::User->search('name' => $ARGV[0]); | 18 my ($u) = Ikariam::User->search('name' => $ARGV[0]); |
19 if(defined($u)) { | 19 if(defined($u)) { |
20 foreach my $i (qw/name time score trader_score_secondary army_score_main ally/) { | 20 foreach my $i (qw/name time score trader_score_secondary army_score_main ally/) { |
21 if($i eq "time") { | 21 if($i eq "time") { |
22 printf("time: %s, ", strftime ("%Y-%m-%d %H:%M", localtime($u->get('time')))); | 22 if(defined($u->get('time'))) { |
23 printf("time: %s, ", strftime ("%Y-%m-%d %H:%M", localtime($u->get('time')))); | |
24 } else { | |
25 printf("time: %s, ", strftime ("%Y-%m-%d %H:%M", localtime())); | |
26 } | |
23 } else { | 27 } else { |
24 printf("%s: %s, ", $i, $u->get($i)); | 28 printf("%s: %s, ", $i, $u->get($i)); |
25 } | 29 } |
26 } | 30 } |
27 print("\n"); | 31 print("\n"); |