changeset 41:5849b6fdc76c

removed my password from scripts.
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Fri, 17 Oct 2008 01:27:10 +0800
parents 1168ad6e26f7
children 0644b53fd3af
files .hgignore Ikariam.pm README inference.pl scan.pl scores.pl sheep.pl
diffstat 7 files changed, 16 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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',
--- /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.
--- 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;
--- 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) {
--- 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) {
--- 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 >= ? )
     }
 );