From 29f36f867923faccc8e99863e059ee4a36b279b3 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 9 May 2011 11:47:26 +0200 Subject: weather: fix url detection for multiple stations/sites --- data/rbot/plugins/weather.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/rbot/plugins/weather.rb') diff --git a/data/rbot/plugins/weather.rb b/data/rbot/plugins/weather.rb index 8f59a9ba..0d3abee2 100644 --- a/data/rbot/plugins/weather.rb +++ b/data/rbot/plugins/weather.rb @@ -211,7 +211,7 @@ class WeatherPlugin < Plugin m.reply "couldn't parse weather data from #{where}" end wu_out_special(m, xml) - when /\s*(?:]*>]+><\/a>\s*)?(.*?)<\/a>\s*:\s*(.*?)<\/td>/m) + stations = xml.scan(/\s*(?:]*>]+><\/a>\s*)?(.*?)<\/a>\s*:\s*(.*?)<\/td>/m) # debug stations m.reply "multiple stations available, use 'weather station ' or 'weather ' as appropriate, for one of the following (current temp shown):" stations.map! { |ar| -- cgit v1.2.3