comparison scores.pl @ 13:bb6eebd349fc

removed debug message
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Wed, 08 Oct 2008 12:09:54 +0800
parents 0aeb0fe59257
children 5849b6fdc76c
comparison
equal deleted inserted replaced
12:0aeb0fe59257 13:bb6eebd349fc
19 { 19 {
20 my $users = shift; 20 my $users = shift;
21 21
22 foreach my $user (values(%{$users})) 22 foreach my $user (values(%{$users}))
23 { 23 {
24
25 printf("Saving %s\n", $user->{'name'}); 24 printf("Saving %s\n", $user->{'name'});
26 if(my $c = Ikariam::User->retrieve($user->{id})) 25 if(my $c = Ikariam::User->retrieve($user->{id}))
27 { 26 {
28 foreach my $i (keys(%$user)) { 27 foreach my $i (keys(%$user)) {
29 eval($c->$i($user->{$i})); 28 eval($c->$i($user->{$i}));
93 } else { 92 } else {
94 # Update owner of cities 93 # Update owner of cities
95 my @cities = Ikariam::Cities->retrieve_all(); 94 my @cities = Ikariam::Cities->retrieve_all();
96 foreach my $city (@cities) 95 foreach my $city (@cities)
97 { 96 {
98 printf("%s\n", $city->owner); 97 # printf("%s\n", $city->owner);
99 foreach my $type (qw/score army_score_main trader_score_secondary/) 98 foreach my $type (qw/score army_score_main trader_score_secondary/)
100 { 99 {
101 my $users = $i->viewScore($type, $city->owner, 0); 100 my $users = $i->viewScore($type, $city->owner, 0);
102 saveUser($users); 101 saveUser($users);
103 } 102 }