diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-01-30 21:58:00 +0100 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2011-01-30 21:58:00 +0100 |
commit | 182d062906f1951e4f253d395fae88f3db620658 (patch) | |
tree | 0dec2fee14a427fdcc19c7e14c7dd7d400ac29d3 /data/rbot | |
parent | 334735b7f900644c10388e6c45345b62e9ad9c77 (diff) |
weather: defaults for missing service
The refactoring that introduced google removed them erroneously.
Diffstat (limited to 'data/rbot')
-rw-r--r-- | data/rbot/plugins/weather.rb | 8 |
1 files changed, 8 insertions, 0 deletions
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" |