# HG changeset patch # User "Rex Tsai " # Date 1224178030 -28800 # Node ID 5849b6fdc76ced03e840e6bfdac581bf0e2f279d # Parent 1168ad6e26f7c89b93676a9b7fcf75aa7c3ecd21 removed my password from scripts. diff -r 1168ad6e26f7 -r 5849b6fdc76c .hgignore --- a/.hgignore Thu Oct 16 21:44:05 2008 +0800 +++ b/.hgignore Fri Oct 17 01:27:10 2008 +0800 @@ -6,3 +6,5 @@ sheep.sh sheep.txt *.html +*.sh +*.txt diff -r 1168ad6e26f7 -r 5849b6fdc76c Ikariam.pm --- a/Ikariam.pm Thu Oct 16 21:44:05 2008 +0800 +++ b/Ikariam.pm Fri Oct 17 01:27:10 2008 +0800 @@ -1,4 +1,8 @@ #!/usr/bin/env perl +BEGIN { + my $HOME = (getpwuid($<))[7] || $ENV{HOME} || $ENV{LOGDIR} || "."; + require "$HOME/.eagleeye.pm"; +} use Class::DBI::AutoLoader ( dsn => 'dbi:SQLite:dbname=ikariam.sqlite', diff -r 1168ad6e26f7 -r 5849b6fdc76c README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Fri Oct 17 01:27:10 2008 +0800 @@ -0,0 +1,5 @@ +http://www.assembla.com/spaces/eagle-eye + += Files = + +Ikariam.pm - Basic modules for collectoin information from web, and the web access/submit functions will be also implemented. diff -r 1168ad6e26f7 -r 5849b6fdc76c inference.pl --- a/inference.pl Thu Oct 16 21:44:05 2008 +0800 +++ b/inference.pl Fri Oct 17 01:27:10 2008 +0800 @@ -6,15 +6,14 @@ package main; our $cities; -our $server = 's2.ikariam.tw'; sub Warn { my ($city, $msg) = @_; printf("http://%s/index.php?view=city&id=%s (%s) %s \n", - $server, $city, $cities->{$city}->{name}, $msg); + $::server, $city, $cities->{$city}->{name}, $msg); } -our $i = new Ikariam($server, "chihchun", "c795d57d"); +our $i = new Ikariam($::server, $::user, $::pass); $i->login; $cities = $i->check; $i->logout; diff -r 1168ad6e26f7 -r 5849b6fdc76c scan.pl --- a/scan.pl Thu Oct 16 21:44:05 2008 +0800 +++ b/scan.pl Fri Oct 17 01:27:10 2008 +0800 @@ -68,7 +68,7 @@ } } -our $i = new Ikariam("s2.ikariam.tw", "chihchun", "c795d57d"); +our $i = new Ikariam($::server, $::user, $::pass); my @islands; if($#ARGV == 1) { diff -r 1168ad6e26f7 -r 5849b6fdc76c scores.pl --- a/scores.pl Thu Oct 16 21:44:05 2008 +0800 +++ b/scores.pl Fri Oct 17 01:27:10 2008 +0800 @@ -35,7 +35,7 @@ } } -my $i = new Ikariam("s2.ikariam.tw", "chihchun", "c795d57d"); +my $i = new Ikariam($::server, $::user, $::pass); $i->login; if($#ARGV == 0) { diff -r 1168ad6e26f7 -r 5849b6fdc76c sheep.pl --- a/sheep.pl Thu Oct 16 21:44:05 2008 +0800 +++ b/sheep.pl Fri Oct 17 01:27:10 2008 +0800 @@ -38,7 +38,7 @@ FROM user, cities WHERE user.id == cities.user AND user.trader_score_secondary >= 50000 - AND user.army_score_main <= 40 + AND user.army_score_main <= 100 AND cities.island IN (SELECT island.id FROM island WHERE island.x <= ? AND island.x >= ? AND island.y <= ? AND island.y >= ? ) } );