annotate warfare.pl @ 137:362184763c04

added comments and added new research (greek fire)
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Fri, 31 Oct 2008 02:21:05 +0800
parents 4374173bab47
children a5517f0abb85
rev   line source
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
1 #!/usr/bin/perl
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
2 use strict;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
3 use Ikariam;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
4 use Data::Dumper;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
5 use Decision::ParseTree q{ParseTree};
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
6 use YAML qw/LoadFile Dump DumpFile/;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
7
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
8 package Ikariam::Warfare::Rules;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
9 use strict;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
10 use Data::Dumper;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
11
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
12 Ikariam::User->has_many(cities => 'Ikariam::Cities');
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
13 Ikariam::Cities->has_a(user => 'Ikariam::User');
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
14 Ikariam::Cities->has_a(island => 'Ikariam::Island');
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
15 Ikariam::Cities->set_sql(sheeps => qq {
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
16 SELECT cities.cityId
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
17 FROM user, cities
125
4374173bab47 collect hometown island information.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 124
diff changeset
18 WHERE user.id = cities.user
4374173bab47 collect hometown island information.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 124
diff changeset
19 AND user.army_score_main = 0
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
20 AND cities.island IN (SELECT island.id FROM island WHERE island.x <= ? AND island.x >= ? AND island.y <= ? AND island.y >= ? )
125
4374173bab47 collect hometown island information.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 124
diff changeset
21 AND cities.tradegood != ?
104
b369fe3c1992 fixed typo and war counting
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 101
diff changeset
22 ORDER BY cities.citylevel * (cities.citylevel - 1) * user.trader_score_secondary / 10000 DESC LIMIT 30
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
23 }
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
24 );
125
4374173bab47 collect hometown island information.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 124
diff changeset
25 # $island->tradegood,
4374173bab47 collect hometown island information.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 124
diff changeset
26 # qw/NULL 葡萄酒 大理石 水晶 硫磺/;
4374173bab47 collect hometown island information.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 124
diff changeset
27 # 不打與自己相同的資源
108
d3bece9b06b2 fixed the couting *again*
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 107
diff changeset
28 Ikariam::Report->set_sql(victim => qq {
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
29 SELECT report.id
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
30 FROM report
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
31 WHERE report.city = ?
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
32 AND report.date >= ?
108
d3bece9b06b2 fixed the couting *again*
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 107
diff changeset
33 }
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
34 );
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
35
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
36 sub new {
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
37 my ( $class, $i ) = @_;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
38 my $self = {
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
39 ikariam => $i,
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
40 };
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
41 return bless $self, $class;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
42 }
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
43
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
44 sub is_attacked {
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
45 my ($self, $city) = @_;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
46 return ($self->{'ikariam'}->{'military'}->{attacks} > 0 ) ? 1 : 0;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
47 }
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
48
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
49 sub is_actionPoint_enough {
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
50 my ($self, $city) = @_;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
51 return ($city->{actionPoints} > ($city->{maxActionPoints}/2) ) ? 1 : 0;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
52 }
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
53
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
54 sub is_army_available {
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
55 my ($self, $city) = @_;
122
11541129a389 fixed for counting ally members.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 108
diff changeset
56 return ($city->{army}->{Swordsman} >= 2 ) ? 1 : 0;
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
57 }
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
58
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
59 sub locateVictim {
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
60 my ($self, $city, $x, $y) = @_;
125
4374173bab47 collect hometown island information.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 124
diff changeset
61 my @cities = Ikariam::Cities->search_sheeps(($x + 6), ($x - 6), ($y + 6), ($y - 6), $tradegood);
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
62
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
63 foreach my $city (@cities) {
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
64 my $sheep = $city->user;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
65 my $island = $city->island;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
66
124
f8c97e5d77ab translated comments.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 122
diff changeset
67 # Ignore the user in vacation which we can not attack.
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
68 next if($city->status eq 'v');
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
69 unless ($city->status eq 'i') {
122
11541129a389 fixed for counting ally members.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 108
diff changeset
70 unless (!defined($sheep->allyId) || $sheep->allyId == 0) {
11541129a389 fixed for counting ally members.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 108
diff changeset
71 my $ally = Ikariam::Ally->retrieve($sheep->allyId);
11541129a389 fixed for counting ally members.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 108
diff changeset
72 # Ignore the ally which have more then 10 members.
11541129a389 fixed for counting ally members.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 108
diff changeset
73 # We don't want to piss off the big team.
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
74 next if(defined($ally) && $ally->members > 10);
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
75 }
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
76 }
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
77
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
78 # check if we over-attacked
108
d3bece9b06b2 fixed the couting *again*
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 107
diff changeset
79 my $c = Ikariam::Report->search_victim($city->cityId, time - 24*60*60 - 7*60*60)->count();
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
80 # check the current plunders
108
d3bece9b06b2 fixed the couting *again*
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 107
diff changeset
81 foreach (@{$self->{ikariam}->{'military'}->{'homeland'}}) {
122
11541129a389 fixed for counting ally members.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 108
diff changeset
82 # counting for both leaving and coming back.
108
d3bece9b06b2 fixed the couting *again*
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 107
diff changeset
83 $c++ if($_->{to} == $city->cityId || $_->{from} == $city->cityId);
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
84 }
122
11541129a389 fixed for counting ally members.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 108
diff changeset
85 # we attack one city maximum 4 times a day.
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
86 next if($c >= 4);
107
554bdd49c703 we should also count the force which is coming back
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 105
diff changeset
87
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
88 # {
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
89 my $capture = $city->citylevel * ($city->citylevel - 1) * $sheep->trader_score_secondary / 10000;
122
11541129a389 fixed for counting ally members.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 108
diff changeset
90 my $line = sprintf("%d %s [%d,%d] %s (%d) %s Attacked %d",
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
91 $capture, $city->status,
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
92 $island->x, $island->y,
104
b369fe3c1992 fixed typo and war counting
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 101
diff changeset
93 $city->cityname, $city->cityId,
122
11541129a389 fixed for counting ally members.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 108
diff changeset
94 $sheep->name, $c);
11541129a389 fixed for counting ally members.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 108
diff changeset
95
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
96 printf("%s\n", $line);
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
97 # }
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
98 return $city->cityId;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
99 }
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
100 return undef;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
101 }
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
102
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
103 sub engagement {
125
4374173bab47 collect hometown island information.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 124
diff changeset
104 my ($self, $cityId, $x, $y, $tradegood) = @_;
4374173bab47 collect hometown island information.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 124
diff changeset
105 my $victim = $self->locateVictim($cityId, $x, $y, $tradegood);
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
106 if(defined($victim)) {
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
107 $self->{ikariam}->changeCity($cityId);
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
108 $self->{ikariam}->plunderCity($victim);
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
109 }
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
110 }
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
111
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
112 1;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
113
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
114 package main;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
115
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
116 our $i = new Ikariam($::server, $::user, $::pass);
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
117 our $rules = Ikariam::Warfare::Rules->new($i);
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
118
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
119 $i->login;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
120 my $cities = $i->check;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
121 $i->checkMilitaryAdvisorCombatReports();
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
122
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
123 foreach my $cityId (keys(%$cities)) {
105
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 104
diff changeset
124 print Dump($i->{'military'});
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
125 # build and upgrade for cities
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
126 my $tree = LoadFile('warfare.yaml');
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
127 $cities->{$cityId}->{parse_path} = [];
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
128 $cities->{$cityId}->{parse_answer} = undef;
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
129 if(ParseTree($tree, $rules, $cities->{$cityId}) eq 'engagement') {
125
4374173bab47 collect hometown island information.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 124
diff changeset
130 my $island = Ikariam::Island->retrive($cities->{$cityId}->{island}->{id});
4374173bab47 collect hometown island information.
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents: 124
diff changeset
131 $rules->engagement($cityId, $island->{x}, $island->{y}, $island->tradegood);
101
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
132 sleep(30);
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
133 $i->checkMilitaryAdvisorMilitaryMovements();
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
134 }
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
135 print Dump($cities->{$cityId}->{parse_path});
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
136 }
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
137 DumpFile("warfare-dump.yaml", $cities);
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
138
592d3b3b7898 implemented the WAR robot
"Rex Tsai <chihchun@kalug.linux.org.tw>"
parents:
diff changeset
139 $i->logout;