-# 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
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"
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"