mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
Plugins/Weather: Show temps in C/F instead of F/C
This commit is contained in:
parent
7412ce29c2
commit
d290fe1819
@ -115,7 +115,7 @@ sub get_weather {
|
||||
|
||||
sub fix_temps {
|
||||
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); "${c}C/${f}F"|eg;
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user