]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/grouphug.rb
Initial implementation of proper caching based on last-modified and etag HTTP headers
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / grouphug.rb
index aa3bf6d784e96fdf4cebf300c07ca3f6c35ca20d..53fc7f0a761a118ee4f41160bc852b111578bc29 100644 (file)
@@ -14,7 +14,7 @@ class GrouphugPlugin < Plugin
         path = "/random"
         path = "/confessions/#{m.params()}" if m.params()
         begin
-          data = bot.httputil.get(URI.parse("http://grouphug.us/#{path}"))
+          data = bot.httputil.get_cached(URI.parse("http://grouphug.us/#{path}"))
 
           reg = Regexp.new( '(<td class="conf-text")(.*?)(<p>)(.*?)(</p>)', Regexp::MULTILINE )
           confession = reg.match( data )[4]