summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillermo Ramos2020-04-26 12:04:46 +0200
committerGuillermo Ramos2020-04-26 12:04:46 +0200
commit91e8a5cf14ff0bb30a78ad9cda6014700e7a73a3 (patch)
tree36f9383720453b9939cd86fd225ccdfd9f2b1396
parente3902a071a2a29bd6386a6be1f379fb0c29dfee3 (diff)
downloadbots-91e8a5cf14ff0bb30a78ad9cda6014700e7a73a3.tar.gz
Fix generation of multi-user graphs
-rwxr-xr-xescato.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/escato.pl b/escato.pl
index 014064b..0f804ce 100755
--- a/escato.pl
+++ b/escato.pl
@@ -71,7 +71,9 @@ sub show_dumps {
push @shures, {username => $shur->{'username'},
data => tg_id_dumps($shur->{'id'})};
}
- $graph_b64 = gen_graph(map { {$_->{username} => $_->{data}{points}} } @shures);
+ my %graph_info;
+ $graph_info{$_->{username}} = $_->{data}{points} foreach (@shures);
+ $graph_b64 = gen_graph(\%graph_info);
foreach my $shur (sort { $b->{data}{month} <=> $a->{data}{month} } @shures) {
$out .= sprintf "%d - @%s ha cagado %d veces este mes, y %d al año.\n",
$position++, $shur->{username}, $shur->{data}{month}, $shur->{data}{year};