Mercurial > eagle-eye
diff Ikariam.pm @ 9:ae412d1f7761
added logout function.
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Wed, 08 Oct 2008 04:30:32 +0800 |
parents | e4b3168d0319 |
children | f590b5ea5e55 |
line wrap: on
line diff
--- a/Ikariam.pm Wed Oct 08 04:23:01 2008 +0800 +++ b/Ikariam.pm Wed Oct 08 04:30:32 2008 +0800 @@ -209,11 +209,16 @@ return @cities; } +sub logout +{ + my $self = shift; + $self->{mech}->get(sprintf('http://%s/index.php?action=loginAvatar&function=logout', $self->{server})); +} + sub login { my $self = shift; - # $self->{mech}->get(sprintf('http://%s/', $self->{server})); my $res = $self->{mech}->post(sprintf("http://%s/index.php?action=loginAvatar&function=login", $self->{server}), [ name => $self->{user}, password => $self->{pass},