]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/weather.rb
weather: defaults for missing service
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / weather.rb
index ab3ec908b1654769f66a65980fc88c3ce214b2c3..8f59a9ba693eea6f98c61a3f42d69fe53f4a29a2 100644 (file)
@@ -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"