]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/weather.rb
alias plugin: don't create data path if it already exists
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / weather.rb
index 07584d883f7f7a45381ce84630e6b21664f64f75..4edcc96381b2d4c52fe822d42d713c1db2b07183 100644 (file)
@@ -1,12 +1,16 @@
-# Weather plugin for rbot
+#-- vim:sw=2:et
+#++
 #
-# NOAA National Weather Service support by MrChucho (mrchucho@mrchucho.net)
-# Copyright (C) 2006 Ralph M. Churchill
+# :title: Weather plugin for rbot
 #
-# Weather Undeground support by Giuseppe "Oblomov" Bilotta <giuseppe.bilotta@gmail.com>
-# Copyright (C) 2006 Giuseppe Bilotta
+# Author:: MrChucho (mrchucho@mrchucho.net): NOAA National Weather Service support
+# Author:: Giuseppe "Oblomov" Bilotta <giuseppe.bilotta@gmail.com>
+#
+# Copyright:: (C) 2006 Ralph M. Churchill
+# Copyright:: (C) 2006-2007 Giuseppe Bilotta
+#
+# License:: GPL v2
 
-require 'uri'
 require 'rexml/document'
 
 # Wraps NOAA National Weather Service information
@@ -160,7 +164,7 @@ class WeatherPlugin < Plugin
 
   def wu_station(m, where, units)
     begin
-      xml = @bot.httputil.get_cached(@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"
@@ -182,7 +186,7 @@ class WeatherPlugin < Plugin
 
   def wu_weather(m, where, units)
     begin
-      xml = @bot.httputil.get_cached(@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"