From: Giuseppe Bilotta Date: Mon, 26 Mar 2012 16:22:38 +0000 (+0200) Subject: weather: use proper units text when using config option X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=e14bb61eeed956dda60f2e2ad3a3b9cc8667306a;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git weather: use proper units text when using config option Previously, if units was false (no units specified), wu_units would become "_false" instead of "_". --- 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