mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 03:33:06 +01:00
Plugins/Weather.pm: fix temps
This commit is contained in:
parent
8c9087c57e
commit
6547acc2f0
@ -115,7 +115,7 @@ sub get_weather {
|
|||||||
|
|
||||||
sub fix_temps {
|
sub fix_temps {
|
||||||
my ($self, $text) = @_;
|
my ($self, $text) = @_;
|
||||||
$text =~ s|(\d+)\s*F|my $f = $1; my $c = ($f - 32 ) * 5 / 9; $c = sprintf("%.1d", $c); "${f}F/${c}C"|eg;
|
$text =~ s|(-?\d+)\s*F|my $f = $1; my $c = ($f - 32 ) * 5 / 9; $c = sprintf("%.1d", $c); "${f}F/${c}C"|eg;
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user