X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fweather.rb;h=b58354471e302101fe349c51d4b5622b2dc3f100;hb=25dce328a87fcf2af9fa0e1c2da7ed30b7def441;hp=da6a2116a57548525d7799f1e808c0b162845c6d;hpb=a7c40c145f5be6c7c99752bb0af93c0735971694;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/weather.rb b/data/rbot/plugins/weather.rb index da6a2116..b5835447 100644 --- a/data/rbot/plugins/weather.rb +++ b/data/rbot/plugins/weather.rb @@ -164,7 +164,7 @@ class WeatherPlugin < Plugin def wu_station(m, where, units) begin - xml = @bot.httputil.get(@wu_station_url % [units, URI.escape(where)]) + xml = @bot.httputil.get(@wu_station_url % [units, CGI.escape(where)]) case xml when nil m.reply "couldn't retrieve weather information, sorry" @@ -186,20 +186,24 @@ class WeatherPlugin < Plugin def wu_weather(m, where, units) begin - xml = @bot.httputil.get(@wu_url % [units, URI.escape(where)]) + xml = @bot.httputil.get(@wu_url % [units, CGI.escape(where)]) case xml when nil m.reply "couldn't retrieve weather information, sorry" - return when /City Not Found/ m.reply "no such location found (#{where})" - return - when /