From 182d062906f1951e4f253d395fae88f3db620658 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 30 Jan 2011 21:58:00 +0100 Subject: [PATCH 1/1] weather: defaults for missing service The refactoring that introduced google removed them erroneously. --- data/rbot/plugins/weather.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/data/rbot/plugins/weather.rb b/data/rbot/plugins/weather.rb index ab3ec908..8f59a9ba 100644 --- a/data/rbot/plugins/weather.rb +++ b/data/rbot/plugins/weather.rb @@ -110,6 +110,14 @@ class WeatherPlugin < Plugin units = reg[2] rescue nil end + if !service + if where.sub!(/^station\s+/,'') + service = :nws + else + service = :wu + end + end + if where.empty? debug "No weather location found for #{m.sourcenick}" m.reply "I don't know where you are yet, #{m.sourcenick}. See 'help weather nws' or 'help weather wu' for additional help" -- 2.39.2