]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
plugins: remove excess requires and Net::HTTP.version setups
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 7 Apr 2007 23:27:49 +0000 (23:27 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 7 Apr 2007 23:27:49 +0000 (23:27 +0000)
data/rbot/plugins/dict.rb
data/rbot/plugins/fish.rb
data/rbot/plugins/search.rb
data/rbot/plugins/urban.rb
data/rbot/plugins/url.rb
data/rbot/plugins/weather.rb
data/rbot/plugins/wserver.rb

index d486e97b3c3c292b90530afbc785ce8907b238d7..ef162215ef4ee5044363ba24ce4b11139d775832 100644 (file)
@@ -18,8 +18,6 @@
 #\r
 # TODO: cache results and reuse them if get_cached returns a cache copy\r
 \r
-require 'uri'\r
-\r
 DEMAURO_LEMMA = /<anchor>(.*?)(?: - (.*?))<go href="lemma.php\?ID=(\d+)"\/><\/anchor>/\r
 \r
 class DictPlugin < Plugin\r
index 57bbefd06761b2717dd61446b5bd65fbbf4415c8..140c95704b2cb1a904c1aa7bf0eb034a68453eb5 100644 (file)
@@ -1,7 +1,3 @@
-require 'net/http'
-require 'uri/common'
-Net::HTTP.version_1_2
-
 class BabelPlugin < Plugin
   LANGS = %w{en fr de it pt es nl ru zh zt el ja ko}
 
index aea6dc4cc4a5f9061261eeb2b88471118b1dc22f..da98dd08d1915cccc5e0152db4d0744061c8ef26 100644 (file)
 # TODO:: use lr=lang_<code> or whatever is most appropriate to let google know
 #        it shouldn't use the bot's location to find the preferred language
 
-require 'uri'
-
-Net::HTTP.version_1_2
-
 GOOGLE_WAP_LINK = /<a accesskey="(\d)" href=".*?u=(.*?)">(.*?)<\/a>/im
 GOOGLE_CALC_RESULT = %r{<p><table><tr><td><img src=/images/calc_img\.gif></td><td>&nbsp;</td><td nowrap><font size=\+1><b>(.+)</b></td></tr><tr><td>}
 
index 0b75febea9f024dbcb74a77760c28f61236e5f7c..1a4b9d74e34562d823a7e487cbc8238a2f600fd1 100644 (file)
@@ -1,5 +1,3 @@
-require 'uri'
-
 class UrbanPlugin < Plugin
 
   def help( plugin, topic="")
index 3640160459daf0265d50157f9bba56a31a5d96f1..d1c9b6bb5804a7de7df2c9616ae22a3dcada7bef 100644 (file)
@@ -1,5 +1,3 @@
-require 'uri'
-
 Url = Struct.new("Url", :channel, :nick, :time, :url)
 TITLE_RE = /<\s*?title\s*?>(.+?)<\s*?\/title\s*?>/im
 LINK_INFO = "[Link Info]"
index cdabf9c1803bc88980bfe2a65a4e2ed445f2e1ad..da6a2116a57548525d7799f1e808c0b162845c6d 100644 (file)
@@ -11,7 +11,6 @@
 #
 # License:: GPL v2
 
-require 'uri'
 require 'rexml/document'
 
 # Wraps NOAA National Weather Service information
index fdb4207dfe1d005ba021d04ca8cccc12c4e2facc..a888ad0c3e9d29a9cd9230366bb3ff600a6d1600 100644 (file)
@@ -1,7 +1,3 @@
-require 'net/http'
-require 'uri'
-Net::HTTP.version_1_2
-
 class WserverPlugin < Plugin
   def help(plugin, topic="")
     "wserver <uri> => try and determine what webserver <uri> is using"