From e14bb61eeed956dda60f2e2ad3a3b9cc8667306a Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 26 Mar 2012 18:22:38 +0200 Subject: [PATCH] weather: use proper units text when using config option Previously, if units was false (no units specified), wu_units would become "_false" instead of "_". --- data/rbot/plugins/weather.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.2