]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
url plugin: bail out early when no urls were found
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 19 Sep 2007 21:19:46 +0000 (21:19 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 19 Sep 2007 21:19:46 +0000 (21:19 +0000)
data/rbot/plugins/url.rb

index 0896c87ee4f7ffd03440f2bdefc3a974d47d6ea1..524b0858aaab183e9d0b440e87fea03c03f1ac6f 100644 (file)
@@ -164,6 +164,7 @@ class UrlPlugin < Plugin
 
     escaped = URI.escape(m.message, OUR_UNSAFE)
     urls = URI.extract(escaped, ['http', 'https'])
+    return if urls.empty?
     Thread.new { handle_urls(m, urls) }
   end