diff Ikariam.pm @ 185:c6c6db6eea76

merged.
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Sun, 02 Nov 2008 21:17:50 +0800
parents 2362c8c8909e 8afd380c20ac
children 5501ce37b50f
line wrap: on
line diff
--- a/Ikariam.pm	Sun Nov 02 21:16:44 2008 +0800
+++ b/Ikariam.pm	Sun Nov 02 21:17:50 2008 +0800
@@ -608,11 +608,19 @@
         $self->{mech}->submit_form(
                 form_number => 1,
                 fields      => {
-                      cargo_army_302 => '2',
-                   }
+                        cargo_army_302 => '2', # 劍士
+                    }
                 );
     } else {
-        warn ($treaty);
+        # put the id in the friends.txt file.
+        Ikariam::Cities->has_a(user => 'Ikariam::User');
+        my $city = Ikariam::Cities->retrieve($cityId);
+        my $sheep = $city->user;
+
+        open(OUT, ">>friends.txt") or Carp::carp("can not open friends.txt");
+        print OUT $sheep->name . "\n";
+        close(OUT);
+        Carp::carp($treaty);
     }
 }