]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
shortenurls plugin: get rid of WWW:: namespace entirely
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 29 May 2008 21:25:13 +0000 (23:25 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 29 May 2008 21:25:17 +0000 (23:25 +0200)
data/rbot/plugins/shortenurls.rb

index 81682581ecf2b2a55cf527ac8508b87b581c0b26..7eeb005f8fce8705569e695e04a1f467d24217d6 100644 (file)
@@ -64,10 +64,10 @@ class ShortenURLs < Plugin
 
     begin
       tried << service
-      raise WWW::InvalidService, "#{service} blacklisted" if @blacklist.include?(service)
-      short = WWW::ShortURL.shorten(url, service)
-      raise WWW::InvalidService, "#{service} returned an empty string for #{url}" unless short and not short.empty?
-    rescue WWW::InvalidService
+      raise InvalidService, "#{service} blacklisted" if @blacklist.include?(service)
+      short = ShortURL.shorten(url, service)
+      raise InvalidService, "#{service} returned an empty string for #{url}" unless short and not short.empty?
+    rescue InvalidService
       pool = services - tried
       if pool.empty?
         m.reply "#{service} failed, and I don't know what else to try next" unless params[:called]