aboutsummaryrefslogtreecommitdiffstats
path: root/stats.pl
diff options
context:
space:
mode:
Diffstat (limited to 'stats.pl')
-rwxr-xr-xstats.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/stats.pl b/stats.pl
index 9643de9..4614b3f 100755
--- a/stats.pl
+++ b/stats.pl
@@ -37,7 +37,7 @@ my @group_names = ();
my $content = get($score_url);
if (!defined($content) || !$content || length $content < 1) {
print STDERR "Could not fetch scoreboard!";
- exit 1
+ exit 1;
}
my $now = `date +%Y%m%d-%H%M%S`;
@@ -48,6 +48,11 @@ close FH;
my @content = split /^-+$/m, $content;
shift @content;
+if (scalar @content < 1) {
+ print STDERR, "Scoreboard seems to be empty!";
+ exit 1;
+}
+
for my $section (@content) {
my ($position, $user, $balance, $endpoint, $time_up, $time_maint, $time_down) = (undef);