mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-22 11:59:43 +01:00
Plugin/Wttr: add sunHour and uvIndex to -sun; decrease cache timeout from 1hr to 15m
This commit is contained in:
parent
d8803a4c29
commit
d29ec9b6b9
@ -109,7 +109,7 @@ sub get_wttr {
|
||||
|
||||
my %cache_opt = (
|
||||
'namespace' => 'wttr',
|
||||
'default_expires_in' => 3600
|
||||
'default_expires_in' => 900
|
||||
);
|
||||
|
||||
my $location_uri = uri_escape_utf8 $location;
|
||||
@ -287,8 +287,7 @@ sub get_wttr {
|
||||
|
||||
when ('sun') {
|
||||
my $a = $w->{'astronomy'}->[0];
|
||||
$result .= "Sun: rise: $a->{'sunrise'}, set: $a->{'sunset'};\n";
|
||||
}
|
||||
$result .= "Sun: rise: $a->{'sunrise'}, set: $a->{'sunset'}; hours: $w->{'sunHour'}; UV Index: $c->{'uvIndex'};\n";}
|
||||
|
||||
when ('sunhours') { $result .= "Hours of sun: $w->{'sunHour'};\n"; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user