]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/games/azgame.rb
*** (httputil) major rework, new caching implementation, unified request
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / games / azgame.rb
index a6979830439741ca861fe41e80c49ce0aea7d386..f62232c086046094e874916d6281837d7dcf3612 100644 (file)
@@ -351,7 +351,7 @@ class AzGamePlugin < Plugin
     wc = @wordcache[:italian]\r
     return true if wc.key?(word.to_sym)\r
     rules = @rules[:italian]\r
-    p = @bot.httputil.get_cached(rules[:wapurl] % word)\r
+    p = @bot.httputil.get(rules[:wapurl] % word)\r
     if not p\r
       error "could not connect!"\r
       return false\r
@@ -404,11 +404,11 @@ class AzGamePlugin < Plugin
         l = ('a'..'z').to_a[rand(26)]\r
         debug "getting random word from dictionary, starting with letter #{l}"\r
         first = rules[:url] % "lettera_#{l}_0_50"\r
-        p = @bot.httputil.get_cached(first)\r
+        p = @bot.httputil.get(first)\r
         max_page = p.match(/ \/ (\d+)<\/label>/)[1].to_i\r
         pp = rand(max_page)+1\r
         debug "getting random word from dictionary, starting with letter #{l}, page #{pp}"\r
-        p = @bot.httputil.get_cached(first+"&pagina=#{pp}") if pp > 1\r
+        p = @bot.httputil.get(first+"&pagina=#{pp}") if pp > 1\r
         lemmi = Array.new\r
         good = rules[:good]\r
         bad =  rules[:bad]\r
@@ -446,7 +446,7 @@ class AzGamePlugin < Plugin
     wc = @wordcache[:english]\r
     return true if wc.key?(word.to_sym)\r
     rules = @rules[:english]\r
-    p = @bot.httputil.get_cached(rules[:url] % URI.escape(word))\r
+    p = @bot.httputil.get(rules[:url] % URI.escape(word))\r
     if not p\r
       error "could not connect!"\r
       return false\r
@@ -497,7 +497,7 @@ class AzGamePlugin < Plugin
         ll = ('a'..'z').to_a[rand(26)]\r
         random = [l,ll].join('*') + '*'\r
         debug "getting random word from dictionary, matching #{random}"\r
-        p = @bot.httputil.get_cached(rules[:url] % URI.escape(random))\r
+        p = @bot.httputil.get(rules[:url] % URI.escape(random))\r
         debug p\r
         lemmi = Array.new\r
         good = rules[:good]\r