diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2012-03-26 18:22:38 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2012-03-26 18:22:38 +0200 |
commit | e14bb61eeed956dda60f2e2ad3a3b9cc8667306a (patch) | |
tree | 711da88887b10049602225b424e1dd0c158694d4 /data | |
parent | c7b9d8dee7128b2fa1a3f0244c7005d7bef0b7a2 (diff) |
weather: use proper units text when using config option
Previously, if units was false (no units specified), wu_units would
become "_false" instead of "_<whatever was in the config value>".
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/weather.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/data/rbot/plugins/weather.rb b/data/rbot/plugins/weather.rb index 9d2b8aed..36a5a88f 100644 --- a/data/rbot/plugins/weather.rb +++ b/data/rbot/plugins/weather.rb @@ -130,7 +130,9 @@ class WeatherPlugin < Plugin wu_units = String.new - case (units || @bot.config['weather.units']).to_sym + units = @bot.config['weather.units'] unless units + + case units.to_sym when :english, :metric wu_units = "_#{units}" when :both |