aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xstats.pl16
1 files changed, 2 insertions, 14 deletions
diff --git a/stats.pl b/stats.pl
index f6c947e..1ef3788 100755
--- a/stats.pl
+++ b/stats.pl
@@ -9,7 +9,7 @@ use RRD::Simple ();
use LWP::UserAgent;
use LWP::Protocol::socks;
-my $rrd_path = "/home/marius/appdrift";
+my $rrd_path = "/appdrift";
my $score_url = "http://128.39.121.4/purser/scoreboard.txt";
my @group_colors = qw(
@@ -19,18 +19,6 @@ my @group_colors = qw(
000066 3366CC CC00CC 800000 CC0099
);
-# HTTP get from url through proxy
-sub proxy_get {
- my $remote = shift;
-
- my $ua = new LWP::UserAgent(agent => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Firefox/1.5.0.5');
- $ua->proxy([ qw(http https) ] => 'socks://localhost:9090');
-
- my $response = $ua->get($remote);
-
- return $response->content;
-}
-
# Check if string is in array
sub in_array {
my $str = shift;
@@ -88,7 +76,7 @@ $#group_colors = $#group_names;
for my $group (@group_names) {
my ($users, $posts, $comments) = (undef);
- my $content = proxy_get("http://".$group_info->{'server'}->{$group});
+ my $content = get("http://".$group_info->{'server'}->{$group});
for my $line (split /\n/, $content) {
last if (defined($users) && defined($posts) && defined($comments));